Update windows_build.yml

This commit is contained in:
izzy2lost
2025-08-08 13:20:04 -04:00
committed by GitHub
parent 44c73b7a7d
commit d3f44a1b97
+10 -17
View File
@@ -8,24 +8,17 @@ jobs:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
- name: Build Visual Studio
if: ${{ matrix.generate == 'Visual Studio 17 2022' }}
- name: Configure CMake (Visual Studio 17 2022, x64)
run: |
cmake -S . -B "build/${{ matrix.arch }}" -G "${{ matrix.generate }}" -DCMAKE_TOOLCHAIN_FILE="cmake/toolchain/${{ matrix.toolchain }}.cmake" -DCMAKE_GENERATOR_PLATFORM=${{ matrix.arch }} -DCMAKE_BUILD_TYPE:STRING=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake --build ./build/${{ matrix.arch }}
- name: Setup Variables
if: ${{ matrix.generate == 'Ninja' }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: Build Ninja
if: ${{ matrix.generate == 'Ninja' }}
cmake -S . -B build/x64 -G "Visual Studio 17 2022" -DCMAKE_GENERATOR_PLATFORM=x64
- name: Build torch.exe
run: |
cmake -S . -B "build/${{ matrix.arch }}" -G "${{ matrix.generate }}" -DCMAKE_TOOLCHAIN_FILE="cmake/toolchain/${{ matrix.toolchain }}.cmake" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.config }} -DUSE_STANDALONE=${{ matrix.standalone }}
cmake --build ./build/${{ matrix.arch }}
- name: Publish packaged artifacts
if: ${{ matrix.config == 'Release' && matrix.generate == 'Visual Studio 17 2022' && matrix.standalone == 'ON' }}
cmake --build build/x64 --config Release
- name: Publish packaged artifact
uses: actions/upload-artifact@v4
with:
name: torch-windows-${{ matrix.arch }}-${{ matrix.toolchain }}
path: build/${{ matrix.arch }}/Release/torch.exe
name: torch-windows-x64
path: build/x64/Release/torch.exe