Skip to content

Commit

Permalink
Merge pull request #110 from pfxuan/fix-windows-2022-cuda
Browse files Browse the repository at this point in the history
Fix windows 2022 build
  • Loading branch information
pierotofy authored Jun 25, 2024
2 parents d8a55ac + 1a7f421 commit 7c9a9cc
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,23 @@ jobs:
os: [windows-2019, windows-2022] # [windows-2019, windows-2022]
arch: [x64] # [x64, x86]
torch-version: [2.3.1, 2.2.1, 2.1.2] # [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.1.1] # [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]
cuda-version: [12.4.0, 12.1.1] # [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.10.0, 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'
exclude:
- os: windows-2019
cuda-version: 12.4.0
- os: windows-2022
cuda-version: 12.1.1
- os: windows-2019
opencv-version: 4.10.0
- os: windows-2022
opencv-version: 4.9.0
env:
CCACHE_DIR: ${{ github.workspace }}\ccache
CCACHE_BASEDIR: ${{ github.workspace }}
Expand Down Expand Up @@ -109,7 +118,11 @@ jobs:
- name: Install LibTorch
if: ${{ steps.libtorch-cache.outputs.cache-hit != 'true' }}
run: |
$LIBTORCH_URL = "https://download.pytorch.org/libtorch/$env:CUDA_VER_SHORT/libtorch-win-shared-with-deps-${{ matrix.torch-version }}%2B$($env:CUDA_VER_SHORT).zip"
if ("${{ matrix.cuda-version }}" -eq "12.4.0") {
$LIBTORCH_URL = "https://download.pytorch.org/libtorch/nightly/cu124/libtorch-win-shared-with-deps-latest.zip"
} else {
$LIBTORCH_URL = "https://download.pytorch.org/libtorch/$env:CUDA_VER_SHORT/libtorch-win-shared-with-deps-${{ matrix.torch-version }}%2B$($env:CUDA_VER_SHORT).zip"
}
echo $LIBTORCH_URL
Invoke-WebRequest $LIBTORCH_URL -OutFile libtorch.zip
Expand-Archive -Path .\libtorch.zip -DestinationPath ${{ github.workspace }}
Expand Down

0 comments on commit 7c9a9cc

Please sign in to comment.