@@ -2,55 +2,55 @@ name: Build, test, package
22
33on : [push,pull_request]
44
5+ env :
6+ itk-git-tag : " v5.3.0"
7+
58jobs :
69 build-test-cxx :
710 runs-on : ${{ matrix.os }}
811 strategy :
912 max-parallel : 3
1013 matrix :
11- os : [ubuntu-18 .04, windows-2019 , macos-10.15 ]
14+ os : [ubuntu-20 .04, windows-2022 , macos-11 ]
1215 include :
13- - os : ubuntu-18 .04
16+ - os : ubuntu-20 .04
1417 c-compiler : " gcc"
1518 cxx-compiler : " g++"
16- itk-git-tag : " d6acfd26bfcdec606d605beb1301bddfb17c05a6"
1719 cmake-build-type : " MinSizeRel"
18- - os : windows-2019
20+ - os : windows-2022
1921 c-compiler : " cl.exe"
2022 cxx-compiler : " cl.exe"
21- itk-git-tag : " d6acfd26bfcdec606d605beb1301bddfb17c05a6"
2223 cmake-build-type : " Release"
23- - os : macos-10.15
24+ - os : macos-11
2425 c-compiler : " clang"
2526 cxx-compiler : " clang++"
26- itk-git-tag : " d6acfd26bfcdec606d605beb1301bddfb17c05a6"
2727 cmake-build-type : " MinSizeRel"
2828
2929 steps :
30- - uses : actions/checkout@v1
30+ - uses : actions/checkout@v3
3131
3232 - name : Set up Python 3.8
3333 uses : actions/setup-python@v2
3434 with :
35- python-version : 3.8
35+ python-version : " 3.8"
3636
3737 - name : Install build dependencies
3838 run : |
3939 python -m pip install --upgrade pip
4040 python -m pip install ninja
4141
4242 - name : Get specific version of CMake, Ninja
43- uses : lukka/get-cmake@v3.18.3
43+ uses : lukka/get-cmake@v3.22.2
4444
4545 - name : Download ITK
4646 run : |
4747 cd ..
4848 git clone https://github.com/InsightSoftwareConsortium/ITK.git
4949 cd ITK
50- git checkout ${{ matrix .itk-git-tag }}
50+ git checkout ${{ env .itk-git-tag }}
5151
5252 - name : Build ITK
53- if : matrix.os != 'windows-2019 '
53+ if : matrix.os != 'windows-2022 '
5454 run : |
5555 cd ..
5656 mkdir ITK-b
@@ -59,15 +59,15 @@ jobs:
5959 ninja
6060
6161 - name : Build ITK
62- if : matrix.os == 'windows-2019'
62+ if : matrix.os == 'windows-2022'
63+ shell : cmd
6364 run : |
6465 cd ..
6566 mkdir ITK-b
6667 cd ITK-b
67- call "C:\Program Files (x86) \Microsoft Visual Studio\2019 \Enterprise\VC\Auxiliary\Build\vcvars64.bat"
68+ call "C:\Program Files\Microsoft Visual Studio\2022 \Enterprise\VC\Auxiliary\Build\vcvars64.bat"
6869 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 -DModule_RLEImage:BOOL=ON -GNinja ../ITK
6970 ninja
70- shell : cmd
7171
7272 - name : Fetch CTest driver script
7373 run : |
8383 file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/" CTEST_SOURCE_DIRECTORY)
8484 file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../build" CTEST_BINARY_DIRECTORY)
8585 set(dashboard_source_name "${GITHUB_REPOSITORY}")
86- if(ENV{GITHUB_REF } MATCHES "master")
86+ if(( ENV{GITHUB_REF_NAME } MATCHES "master" OR ENV{GITHUB_REF_NAME} MATCHES "main") )
8787 set(branch "-master")
8888 set(dashboard_model "Continuous")
8989 else()
@@ -119,164 +119,18 @@ jobs:
119119 cat dashboard.cmake
120120
121121 - name : Build and test
122- if : matrix.os != 'windows-2019 '
122+ if : matrix.os != 'windows-2022 '
123123 run : |
124124 ctest --output-on-failure -j 2 -V -S dashboard.cmake
125125
126126 - name : Build and test
127- if : matrix.os == 'windows-2019'
128- run : |
129- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
130- ctest --output-on-failure -j 2 -V -S dashboard.cmake
131- shell : cmd
132-
133- build-linux-python-packages :
134- runs-on : ubuntu-20.04
135- strategy :
136- max-parallel : 2
137- matrix :
138- python-version : [37, 38, 39, 310]
139- include :
140- - itk-python-git-tag : " v5.3rc04"
141-
142- steps :
143- - uses : actions/checkout@v2
144-
145- - name : ' Free up disk space'
146- run : |
147- # Workaround for https://github.com/actions/virtual-environments/issues/709
148- df -h
149- sudo apt-get clean
150- sudo rm -rf "/usr/local/share/boost"
151- sudo rm -rf "$AGENT_TOOLSDIRECTORY"
152- df -h
153-
154- - name : ' Fetch build script'
155- run : |
156- curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
157- chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh
158-
159- - name : ' Build 🐍 Python 📦 package'
160- run : |
161- export ITK_PACKAGE_VERSION=${{ matrix.itk-python-git-tag }}
162- ./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp${{ matrix.python-version }}
163-
164- - name : Publish Python package as GitHub Artifact
165- uses : actions/upload-artifact@v1
166- with :
167- name : LinuxWheel${{ matrix.python-version }}
168- path : dist
169-
170- build-macos-python-packages :
171- runs-on : macos-10.15
172- strategy :
173- max-parallel : 2
174- matrix :
175- include :
176- - itk-python-git-tag : " v5.3rc04"
177-
178- steps :
179- - uses : actions/checkout@v2
180-
181- - name : ' Specific XCode version'
182- run : |
183- sudo xcode-select -s "/Applications/Xcode_11.7.app"
184-
185- - name : Get specific version of CMake, Ninja
186- 187-
188- - name : ' Fetch build script'
189- run : |
190- curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/macpython-download-cache-and-build-module-wheels.sh -O
191- chmod u+x macpython-download-cache-and-build-module-wheels.sh
192-
193- - name : ' Build 🐍 Python 📦 package'
194- run : |
195- export ITK_PACKAGE_VERSION=${{ matrix.itk-python-git-tag }}
196- export MACOSX_DEPLOYMENT_TARGET=10.9
197- ./macpython-download-cache-and-build-module-wheels.sh
198-
199- - name : Publish Python package as GitHub Artifact
200- uses : actions/upload-artifact@v1
201- with :
202- name : MacOSWheels
203- path : dist
204-
205- build-windows-python-packages :
206- runs-on : windows-2019
207- strategy :
208- max-parallel : 2
209- matrix :
210- python-version-minor : [7, 8, 9, 10]
211- include :
212- - itk-python-git-tag : " v5.3rc04"
213-
214- steps :
215- - name : Get specific version of CMake, Ninja
216- 217-
218- - uses : actions/checkout@v2
219- with :
220- path : " im"
221-
222- - name : ' Install Python'
223- run : |
224- $pythonArch = "64"
225- $pythonVersion = "3.${{ matrix.python-version-minor }}"
226- iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-python.ps1'))
227-
228- - name : ' Fetch build dependencies'
229- shell : bash
230- run : |
231- mv im ../../
232- cd ../../
233- curl -L "https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${{ matrix.itk-python-git-tag }}/ITKPythonBuilds-windows.zip" -o "ITKPythonBuilds-windows.zip"
234- 7z x ITKPythonBuilds-windows.zip -o/c/P -aoa -r
235- curl -L "https://data.kitware.com/api/v1/file/5c0ad59d8d777f2179dd3e9c/download" -o "doxygen-1.8.11.windows.bin.zip"
236- 7z x doxygen-1.8.11.windows.bin.zip -o/c/P/doxygen -aoa -r
237- curl -L "https://data.kitware.com/api/v1/file/5bbf87ba8d777f06b91f27d6/download/grep-win.zip" -o "grep-win.zip"
238- 7z x grep-win.zip -o/c/P/grep -aoa -r
239-
240- - name : ' Build 🐍 Python 📦 package'
127+ if : matrix.os == 'windows-2022'
241128 shell : cmd
242129 run : |
243- cd ../../im
244- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
245- set PATH=C:\P\grep;%PATH%
246- set CC=cl.exe
247- set CXX=cl.exe
248- C:\Python3${{ matrix.python-version-minor }}-x64\python.exe C:\P\IPP\scripts\windows_build_module_wheels.py --py-envs "3${{ matrix.python-version-minor }}-x64" --no-cleanup
249-
250- - name : Publish Python package as GitHub Artifact
251- uses : actions/upload-artifact@v1
252- with :
253- name : WindowsWheel3.${{ matrix.python-version-minor }}
254- path : ../../im/dist
255-
256- publish-python-packages-to-pypi :
257- needs :
258- - build-linux-python-packages
259- - build-macos-python-packages
260- - build-windows-python-packages
261- runs-on : ubuntu-18.04
262-
263- steps :
264- - name : Download Python Packages
265- uses : actions/download-artifact@v2
266-
267- - name : Prepare packages for upload
268- run : |
269- ls -R
270- for d in */; do
271- mv ${d}/*.whl .
272- done
273- mkdir dist
274- mv *.whl dist/
275- ls dist
130+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
131+ ctest --output-on-failure -j 2 -V -S dashboard.cmake
276132
277- - name : Publish 🐍 Python 📦 package to PyPI
278- if : github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
279- uses : pypa/gh-action-pypi-publish@master
280- with :
281- user : __token__
282- password : ${{ secrets.pypi_password }}
133+ python-build-workflow :
134+ uses : InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@b114bdd01a16855f57df0a973e665e61ac83355d
135+ secrets :
136+ pypi_password : ${{ secrets.pypi_password }}
0 commit comments