Skip to content

Commit 7cda37a

Browse files
author
Simon Rit
committed
ENH: Update GitHub actions for compatibility with ITK v5.3rc04.post4
1 parent 10429e5 commit 7cda37a

1 file changed

Lines changed: 28 additions & 24 deletions

File tree

.github/workflows/build-test-package.yml

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ name: Build, test, package
33
on: [push,pull_request]
44

55
env:
6-
itk-git-tag: "171fb2ba33a87041f99328a2f26612ff33aa9cc8"
7-
itk-wheel-tag: "v5.3rc04.post3"
6+
itk-git-tag: "abf5fa10522a36bc51f42f20f426a622f42ed90d"
7+
itk-wheel-tag: "v5.3rc04.post4"
88

99
jobs:
1010
build-test-cxx:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
max-parallel: 3
1414
matrix:
15-
os: [self-hosted-linux, self-hosted-windows,ubuntu-20.04, windows-2019, macos-11]
15+
os: [self-hosted-linux, self-hosted-windows, ubuntu-20.04, windows-2022, macos-11]
1616
include:
1717
- os: self-hosted-linux
1818
c-compiler: "gcc"
@@ -26,7 +26,7 @@ jobs:
2626
c-compiler: "gcc"
2727
cxx-compiler: "g++"
2828
cmake-build-type: "MinSizeRel"
29-
- os: windows-2019
29+
- os: windows-2022
3030
c-compiler: "cl.exe"
3131
cxx-compiler: "cl.exe"
3232
cmake-build-type: "Release"
@@ -42,15 +42,15 @@ jobs:
4242
if: matrix.os != 'self-hosted-windows' && matrix.os != 'self-hosted-linux'
4343
uses: actions/setup-python@v2
4444
with:
45-
python-version: 3.8
45+
python-version: "3.8"
4646

4747
- name: Install build dependencies
4848
run: |
4949
python -m pip install --upgrade pip
5050
python -m pip install ninja
5151
5252
- name: Get specific version of CMake, Ninja
53-
uses: lukka/get-cmake@v3.18.3
53+
uses: lukka/get-cmake@v3.22.2
5454

5555
- name: self-hosted cleanup
5656
if: matrix.os == 'self-hosted-windows' || matrix.os == 'self-hosted-linux'
@@ -68,7 +68,7 @@ jobs:
6868
git checkout ${{ env.itk-git-tag }}
6969
7070
- name: Build ITK
71-
if: matrix.os != 'windows-2019' && matrix.os != 'self-hosted-windows'
71+
if: matrix.os != 'windows-2022' && matrix.os != 'self-hosted-windows'
7272
run: |
7373
cd ..
7474
mkdir ITK-build
@@ -77,12 +77,12 @@ jobs:
7777
ninja
7878
7979
- name: Build ITK
80-
if: matrix.os == 'windows-2019'
80+
if: matrix.os == 'windows-2022'
8181
run: |
8282
cd ..
8383
mkdir ITK-build
8484
cd ITK-build
85-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
85+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
8686
cmake -DCMAKE_C_COMPILER:FILEPATH="${{ matrix.c-compiler }}" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake-build-type }} -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
8787
ninja
8888
shell: cmd
@@ -93,7 +93,7 @@ jobs:
9393
cd ..
9494
mkdir ITK-build
9595
cd ITK-build
96-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
96+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
9797
cmake -DCMAKE_C_COMPILER:FILEPATH="${{ matrix.c-compiler }}" -DBUILD_SHARED_LIBS:BOOL=ON -DCMAKE_CXX_COMPILER="${{ matrix.cxx-compiler }}" -DCMAKE_BUILD_TYPE:STRING=${{ matrix.cmake-build-type }} -DBUILD_TESTING:BOOL=OFF -GNinja ../ITK
9898
ninja
9999
shell: cmd
@@ -148,21 +148,21 @@ jobs:
148148
cat dashboard.cmake
149149
150150
- name: Build and test
151-
if: matrix.os != 'windows-2019' && matrix.os != 'self-hosted-windows'
151+
if: matrix.os != 'windows-2022' && matrix.os != 'self-hosted-windows'
152152
run: |
153153
ctest --output-on-failure -j 2 -V -S dashboard.cmake
154154
155155
- name: Build and test
156-
if: matrix.os == 'windows-2019'
156+
if: matrix.os == 'windows-2022'
157157
run: |
158-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
158+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
159159
ctest --output-on-failure -j 2 -V -S dashboard.cmake
160160
shell: cmd
161161

162162
- name: Build and test
163163
if: matrix.os == 'self-hosted-windows'
164164
run: |
165-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
165+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
166166
ctest --output-on-failure -j 2 -V -S dashboard.cmake
167167
shell: cmd
168168

@@ -171,7 +171,7 @@ jobs:
171171
strategy:
172172
max-parallel: 2
173173
matrix:
174-
python-version: [37, 38, 39, 310]
174+
python-version: ["37", "38", "39", "310", "311"]
175175

176176
steps:
177177
- uses: actions/checkout@v2
@@ -210,26 +210,30 @@ jobs:
210210
strategy:
211211
max-parallel: 2
212212
matrix:
213-
python-version: [37, 38, 39, 310]
213+
python-version: ["37", "38", "39", "310", "311"]
214214

215215
steps:
216216
- uses: actions/checkout@v2
217217

218218
- name: 'Fetch build script'
219219
run: |
220220
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
221+
sed -i "s/^rm/\#rm/g" dockcross-manylinux-download-cache-and-build-module-wheels.sh
221222
chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh
222223
223224
- name: 'Build 🐍 Python 📦 package'
224225
run: |
225226
export ITK_PACKAGE_VERSION=${{ env.itk-wheel-tag }}
226227
export LD_LIBRARY_PATH="/home/srit/Downloads/cuda116:/home/srit/Downloads/cuda116/targets/x86_64-linux/lib:/home/srit/Downloads/cuda116/lib64/stubs"
228+
if test -e ../../ITKPythonBuilds-linux-manylinux2014.tar.zst ; then
229+
mv ../../*zst .
230+
fi
227231
for tarball in "-manylinux_2_28" "-manylinux2014"; do
228232
rm -rf ITKPythonPackage
229233
export TARBALL_SPECIALIZATION=${tarball}
230234
./dockcross-manylinux-download-cache-and-build-module-wheels.sh -c "-DCUDAToolkit_ROOT=/usr/lib64/cuda116 -DCMAKE_CUDA_COMPILER=/usr/lib64/cuda116/bin/nvcc -DRTK_CUDA_VERSION=11.6" -x "libcuda.so;libcuda.so.1;libcudart.so;libcudart.so.11.0;libcublas.so;libcublas.so.11;libcublasLt.so;libcublasLt.so.11;libcufft.so;libcufft.so.10" cp${{ matrix.python-version }}
231235
done
232-
236+
mv *zst ../..
233237
234238
- name: Publish Python package as GitHub Artifact
235239
uses: actions/upload-artifact@v1
@@ -247,7 +251,7 @@ jobs:
247251

248252
- name: 'Specific XCode version'
249253
run: |
250-
sudo xcode-select -s "/Applications/Xcode_11.7.app"
254+
sudo xcode-select -s "/Applications/Xcode_13.2.1.app"
251255
252256
- name: Get specific version of CMake, Ninja
253257
uses: lukka/get-cmake@v3.18.3
@@ -270,11 +274,11 @@ jobs:
270274
path: dist
271275

272276
build-windows-python-packages:
273-
runs-on: windows-2019
277+
runs-on: windows-2022
274278
strategy:
275279
max-parallel: 2
276280
matrix:
277-
python-version-minor: [7, 8, 9, 10]
281+
python-version-minor: ["7", "8", "9", "10", "11"]
278282

279283
steps:
280284
- name: Get specific version of CMake, Ninja
@@ -306,7 +310,7 @@ jobs:
306310
shell: cmd
307311
run: |
308312
cd ../../im
309-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
313+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
310314
set PATH=C:\P\grep;%PATH%
311315
set CC=cl.exe
312316
set CXX=cl.exe
@@ -323,7 +327,7 @@ jobs:
323327
strategy:
324328
max-parallel: 2
325329
matrix:
326-
python-version-minor: [7, 8, 9, 10]
330+
python-version-minor: ["7", "8", "9", "10", "11"]
327331

328332
steps:
329333
- uses: actions/checkout@v2
@@ -357,7 +361,7 @@ jobs:
357361
shell: cmd
358362
run: |
359363
cd ../../im
360-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
364+
call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat"
361365
set PATH=C:\P\grep;%PATH%
362366
set CC=cl.exe
363367
set CXX=cl.exe
@@ -394,7 +398,7 @@ jobs:
394398
395399
- name: Publish 🐍 Python 📦 package to PyPI
396400
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
397-
uses: pypa/gh-action-pypi-publish@master
401+
uses: pypa/gh-action-pypi-publish@v1.5.1
398402
with:
399403
user: __token__
400404
password: ${{ secrets.pypi_password }}

0 commit comments

Comments
 (0)