@@ -10,42 +10,72 @@ jobs:
1010 max-parallel : 3
1111 matrix :
1212 os : [ubuntu-22.04]
13- cuda-version : [cu118 , cu126, cu128 ]
13+ cuda-version : [cpu , cu126]
1414 include :
15- - cuda-version : cu118
15+ - cuda-version : cpu
1616 os : ubuntu-22.04
17- cuda_toolkit_version : ' 11 .8.0'
18- libtorch-cuda-url : https://download.pytorch.org/libtorch/cu118 /libtorch-cxx11-abi- shared-with-deps-2.7 .0%2Bcu118 .zip
17+ artifact-version : " linux-libtorch-shared-with-deps-2 .8.0-cpu "
18+ libtorch-cuda-url : https://download.pytorch.org/libtorch/cpu /libtorch-shared-with-deps-2.8 .0%2Bcpu .zip
1919 itk-git-tag : " v5.4.1"
2020 c-compiler : " gcc"
2121 cxx-compiler : " g++"
2222 cmake-build-type : " Release"
2323 libs :
24- - elastix-build/bin/libANNlib-5.2.so
2524 - elastix-build/bin/libANNlib-5.2.so.1
25+ - cuda-version : cpu
26+ os : windows-2022
27+ artifact-version : " win64-libtorch-shared-with-deps-2.8.0-cpu"
28+ libtorch-cuda-url : https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-2.8.0%2Bcpu.zip
29+ itk-git-tag : " v5.4.1"
30+ c-compiler : " cl.exe"
31+ cxx-compiler : " cl.exe"
32+ cmake-build-type : " Release"
33+ libs :
34+ - elastix-build/bin/ANNlib-5.2.dll
35+ vcvars64 : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
2636 - cuda-version : cu126
2737 os : ubuntu-22.04
28- cuda_toolkit_version : ' 12.6.1'
29- libtorch-cuda-url : https://download.pytorch.org/libtorch/cu126/libtorch-cxx11-abi-shared-with-deps-2.7.0%2Bcu126.zip
38+ artifact-version : " linux-libtorch-shared-with-deps-2.8.0-cu126"
39+ cuda_toolkit_version : ' 12.6.0'
40+ libtorch-cuda-url : https://download.pytorch.org/libtorch/cu126/libtorch-shared-with-deps-2.8.0%2Bcu126.zip
3041 itk-git-tag : " v5.4.1"
3142 c-compiler : " gcc"
3243 cxx-compiler : " g++"
3344 cmake-build-type : " Release"
3445 libs :
35- - elastix-build/bin/libANNlib-5.2.so
3646 - elastix-build/bin/libANNlib-5.2.so.1
37- - cuda-version : cu128
38- os : ubuntu-22.04
39- cuda_toolkit_version : ' 12.8.1'
40- libtorch-cuda-url : https://download.pytorch.org/libtorch/cu128/libtorch-cxx11-abi-shared-with-deps-2.7.0%2Bcu128.zip
47+ - cuda-version : cu126
48+ os : windows-2022
49+ artifact-version : " win64-libtorch-shared-with-deps-2.8.0-cu126"
50+ cuda_toolkit_version : ' 12.6.0'
51+ libtorch-cuda-url : https://download.pytorch.org/libtorch/cu126/libtorch-win-shared-with-deps-2.8.0%2Bcu126.zip
4152 itk-git-tag : " v5.4.1"
42- c-compiler : " gcc "
43- cxx-compiler : " g++ "
53+ c-compiler : " cl.exe "
54+ cxx-compiler : " cl.exe "
4455 cmake-build-type : " Release"
4556 libs :
46- - elastix-build/bin/libANNlib -5.2.so
47- - elastix-build/bin/libANNlib-5.2.so.1
57+ - elastix-build/bin/ANNlib -5.2.dll
58+ vcvars64 : " C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat "
4859 steps :
60+ - name : Free disk space
61+ if : matrix.os != 'windows-2022'
62+ run : |
63+ echo "Disk before cleanup:"
64+ df -h
65+
66+ sudo rm -rf /usr/share/dotnet \
67+ /usr/local/lib/android \
68+ /opt/ghc \
69+ /opt/hostedtoolcache
70+
71+ sudo docker system prune -af || true
72+
73+ sudo rm -rf /var/lib/apt/lists/*
74+
75+ echo "Disk after cleanup:"
76+ df -h
77+ shell : bash
78+
4979 - name : Clone elastix
5080 uses : actions/checkout@v3
5181
@@ -73,12 +103,26 @@ jobs:
73103 cmake-build-type : ${{ matrix.cmake-build-type }}
74104 vcvars : ${{ matrix.vcvars64 }}
75105
76- 77- id : cuda-toolkit
106+ - name : Install CUDA Toolkit (Ubuntu)
107+ 108+ if : matrix.cuda-version != 'cpu' && !startsWith(matrix.os, 'windows')
109+ id : cuda-toolkit-Ubuntu
78110 with :
79111 cuda : ${{ matrix.cuda_toolkit_version }}
80112 sub-packages : ' ["toolkit"]'
81113 method : ' network'
114+ log-file-suffix : ' ${{ matrix.os }}-${{ matrix.cuda-version }}.txt'
115+
116+ - name : Install CUDA Toolkit (Windows)
117+ 118+ if : matrix.cuda-version != 'cpu' && startsWith(matrix.os, 'windows')
119+ id : cuda-toolkit-Windows
120+ with :
121+ cuda : ${{ matrix.cuda_toolkit_version }}
122+ method : local
123+ log-file-suffix : ' windows-2022-cu126'
124+ use-github-cache : true
125+ use-local-cache : true
82126
83127 - name : Build elastix
84128 uses : ./.github/actions/build_elastix
92136 uses : ./.github/actions/publish
93137 with :
94138 libs : ${{ join(matrix.libs, ' ') }}
95- upload-name : ${{ matrix.os }} -${{ matrix.cuda -version }}
139+ upload-name : elastix-impact-5.2.0 -${{ matrix.artifact -version }}
96140 docker-username : ${{ secrets.DOCKER_HUB_USERNAME }}
97141 docker-password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
0 commit comments