Skip to content

Commit

Permalink
Test windows-2019 with MSVC16
Browse files Browse the repository at this point in the history
  • Loading branch information
pfxuan committed Feb 26, 2024
1 parent de537de commit 7289f1c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2022] # [windows-2019, windows-2022]
os: [windows-2019] # [windows-2019, windows-2022]
arch: [x64] # [x64, x86]
generator: ['Visual Studio 17 2022'] # ['Visual Studio 16 2019', 'Visual Studio 17 2022']
torch-version: [2.2.1] # [1.12.0, 1.13.0, 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.2.0, 2.2.1]
cuda-version: [11.8.0] # [12.3.1, 12.1.1, 11.8.0, 11.7.1, 11.6.2, 11.5.2,11.4.4, 11.3.1, 11.2.2, 11.1.1, 11.0.3, cpu]
opencv-version: [4.9.0] # [4.7.0, 4.8.1, 4.9.0]
cmake-build-type: [ Release ] # [Debug, ClangTidy]
include:
# - os: windows-2019
# generator: 'Visual Studio 16 2019'
- os: windows-2022
generator: 'Visual Studio 17 2022'
- os: windows-2019
generator: 'Visual Studio 16 2019'
# - os: windows-2022
# generator: 'Visual Studio 17 2022'
env:
CCACHE_DIR: ${{ github.workspace }}\ccache
CCACHE_BASEDIR: ${{ github.workspace }}
Expand Down Expand Up @@ -63,7 +62,7 @@ jobs:
uses: actions/cache@v4
id: cuda-cache
with:
key: cuda-${{matrix.CUDA-VERSION}}-${{ matrix.os }}
key: cuda-${{matrix.CUDA-VERSION}}-windows-2022
path: |
C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA*
C:\Program Files\NVIDIA Corporation\NvToolsExt
Expand Down Expand Up @@ -96,15 +95,15 @@ jobs:
if [[ $generator == 'Visual Studio 17 2022' ]]; then
cp -R "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v${CUDA_VER}\\extras\\visual_studio_integration\\MSBuildExtensions\\." "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\MSBuild\Microsoft\VC\v170\BuildCustomizations"
else
cp -R "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v${CUDA_VER}\\extras\\visual_studio_integration\\MSBuildExtensions\\." "C:\Program Files\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations"
cp -R "C:\\Program Files\\NVIDIA GPU Computing Toolkit\\CUDA\\v${CUDA_VER}\\extras\\visual_studio_integration\\MSBuildExtensions\\." "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations"
fi
fi
- name: Restore LibTorch Cache
uses: actions/cache@v4
id: libtorch-cache
with:
key: libtorch-${{ matrix.torch-version }}-${{env.CUDA_VER_SHORT}}-${{ matrix.os }}
key: libtorch-${{ matrix.torch-version }}-${{env.CUDA_VER_SHORT}}-windows-2022
path: |
${{ github.workspace }}\libtorch
Expand All @@ -131,6 +130,7 @@ jobs:
mkdir build
cd build
cmake .. `
-G"${{ matrix.generator }}" `
-DCMAKE_BUILD_TYPE=${{ matrix.cmake-build-type }} `
-DCMAKE_C_COMPILER_LAUNCHER:FILEPATH=ccache `
-DCMAKE_CXX_COMPILER_LAUNCHER:FILEPATH=ccache `
Expand Down

0 comments on commit 7289f1c

Please sign in to comment.