Skip to content

Commit 3bf4be1

Browse files
authored
Merge pull request #43 from tbirdso/bump-itk
ENH: Bump ITK to v5.3rc04.post3 and reference ITK CI workflow
2 parents 0a40f5c + 449f2b1 commit 3bf4be1

File tree

2 files changed

+8
-271
lines changed

2 files changed

+8
-271
lines changed

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

Lines changed: 6 additions & 269 deletions
Original file line numberDiff line numberDiff line change
@@ -2,274 +2,11 @@ name: Build, test, package
22

33
on: [push,pull_request]
44

5-
env:
6-
itk-git-tag: "835dc01388d22c4b4c9a46b01dbdfe394ec23511"
7-
itk-wheel-tag: "v5.3rc04.post2" # Same ITK C++ reference commit, different tag name
8-
95
jobs:
10-
build-test-cxx:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
max-parallel: 3
14-
matrix:
15-
os: [ubuntu-18.04, windows-2019, macos-10.15]
16-
include:
17-
- os: ubuntu-18.04
18-
c-compiler: "gcc"
19-
cxx-compiler: "g++"
20-
cmake-build-type: "MinSizeRel"
21-
- os: windows-2019
22-
c-compiler: "cl.exe"
23-
cxx-compiler: "cl.exe"
24-
cmake-build-type: "Release"
25-
- os: macos-10.15
26-
c-compiler: "clang"
27-
cxx-compiler: "clang++"
28-
cmake-build-type: "MinSizeRel"
29-
30-
steps:
31-
- uses: actions/checkout@v1
32-
33-
- name: Set up Python 3.8
34-
uses: actions/setup-python@v2
35-
with:
36-
python-version: 3.8
37-
38-
- name: Install build dependencies
39-
run: |
40-
python -m pip install --upgrade pip
41-
python -m pip install ninja
42-
43-
- name: Get specific version of CMake, Ninja
44-
uses: lukka/get-cmake@v3.18.3
45-
46-
- name: Download ITK
47-
run: |
48-
cd ..
49-
git clone https://github.com/InsightSoftwareConsortium/ITK.git
50-
cd ITK
51-
git checkout ${{ env.itk-git-tag }}
52-
53-
- name: Build ITK
54-
if: matrix.os != 'windows-2019'
55-
run: |
56-
cd ..
57-
mkdir ITK-build
58-
cd ITK-build
59-
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
60-
ninja
61-
62-
- name: Build ITK
63-
if: matrix.os == 'windows-2019'
64-
run: |
65-
cd ..
66-
mkdir ITK-build
67-
cd ITK-build
68-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
69-
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
70-
ninja
71-
shell: cmd
72-
73-
- name: Fetch CTest driver script
74-
run: |
75-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/dashboard/itk_common.cmake -O
76-
77-
- name: Configure CTest script
78-
shell: bash
79-
run: |
80-
operating_system="${{ matrix.os }}"
81-
cat > dashboard.cmake << EOF
82-
set(CTEST_SITE "GitHubActions")
83-
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/.." CTEST_DASHBOARD_ROOT)
84-
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/" CTEST_SOURCE_DIRECTORY)
85-
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../build" CTEST_BINARY_DIRECTORY)
86-
set(dashboard_source_name "${GITHUB_REPOSITORY}")
87-
if(ENV{GITHUB_REF} MATCHES "master")
88-
set(branch "-master")
89-
set(dashboard_model "Continuous")
90-
else()
91-
set(branch "-${GITHUB_REF}")
92-
set(dashboard_model "Experimental")
93-
endif()
94-
set(CTEST_BUILD_NAME "${GITHUB_REPOSITORY}-${operating_system}-\${branch}")
95-
set(CTEST_UPDATE_VERSION_ONLY 1)
96-
set(CTEST_TEST_ARGS \${CTEST_TEST_ARGS} PARALLEL_LEVEL \${PARALLEL_LEVEL})
97-
set(CTEST_BUILD_CONFIGURATION "Release")
98-
set(CTEST_CMAKE_GENERATOR "Ninja")
99-
set(CTEST_CUSTOM_WARNING_EXCEPTION
100-
\${CTEST_CUSTOM_WARNING_EXCEPTION}
101-
# macOS Azure VM Warning
102-
"ld: warning: text-based stub file"
103-
)
104-
set(dashboard_no_clean 1)
105-
set(ENV{CC} ${{ matrix.c-compiler }})
106-
set(ENV{CXX} ${{ matrix.cxx-compiler }})
107-
if(WIN32)
108-
set(ENV{PATH} "\${CTEST_DASHBOARD_ROOT}/ITK-build/bin;\$ENV{PATH}")
109-
endif()
110-
set(dashboard_cache "
111-
ITK_DIR:PATH=\${CTEST_DASHBOARD_ROOT}/ITK-build
112-
BUILD_TESTING:BOOL=ON
113-
")
114-
string(TIMESTAMP build_date "%Y-%m-%d")
115-
message("CDash Build Identifier: \${build_date} \${CTEST_BUILD_NAME}")
116-
message("CTEST_SITE = \${CTEST_SITE}")
117-
include(\${CTEST_SCRIPT_DIRECTORY}/itk_common.cmake)
118-
EOF
119-
cat dashboard.cmake
120-
121-
- name: Build and test
122-
if: matrix.os != 'windows-2019'
123-
run: |
124-
ctest --output-on-failure -j 2 -V -S dashboard.cmake
125-
126-
- 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-
140-
steps:
141-
- uses: actions/checkout@v2
142-
143-
- name: 'Free up disk space'
144-
run: |
145-
# Workaround for https://github.com/actions/virtual-environments/issues/709
146-
df -h
147-
sudo apt-get clean
148-
sudo rm -rf "/usr/local/share/boost"
149-
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
150-
df -h
151-
152-
- name: 'Fetch build script'
153-
run: |
154-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
155-
chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh
156-
157-
- name: 'Build 🐍 Python 📦 package'
158-
run: |
159-
export ITK_PACKAGE_VERSION=${{ env.itk-wheel-tag }}
160-
./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp${{ matrix.python-version }}
161-
162-
- name: Publish Python package as GitHub Artifact
163-
uses: actions/upload-artifact@v1
164-
with:
165-
name: LinuxWheel${{ matrix.python-version }}
166-
path: dist
167-
168-
build-macos-python-packages:
169-
runs-on: macos-10.15
170-
strategy:
171-
max-parallel: 2
172-
173-
steps:
174-
- uses: actions/checkout@v2
175-
176-
- name: 'Specific XCode version'
177-
run: |
178-
sudo xcode-select -s "/Applications/Xcode_11.7.app"
179-
180-
- name: Get specific version of CMake, Ninja
181-
uses: lukka/get-cmake@v3.18.3
182-
183-
- name: 'Fetch build script'
184-
run: |
185-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/macpython-download-cache-and-build-module-wheels.sh -O
186-
chmod u+x macpython-download-cache-and-build-module-wheels.sh
187-
188-
- name: 'Build 🐍 Python 📦 package'
189-
run: |
190-
export ITK_PACKAGE_VERSION=${{ env.itk-wheel-tag }}
191-
export MACOSX_DEPLOYMENT_TARGET=10.9
192-
./macpython-download-cache-and-build-module-wheels.sh
193-
194-
- name: Publish Python package as GitHub Artifact
195-
uses: actions/upload-artifact@v1
196-
with:
197-
name: MacOSWheels
198-
path: dist
199-
200-
build-windows-python-packages:
201-
runs-on: windows-2019
202-
strategy:
203-
max-parallel: 2
204-
matrix:
205-
python-version-minor: [7, 8, 9, 10]
206-
207-
steps:
208-
- name: Get specific version of CMake, Ninja
209-
uses: lukka/get-cmake@v3.18.3
210-
211-
- uses: actions/checkout@v2
212-
with:
213-
path: "im"
214-
215-
- name: 'Install Python'
216-
run: |
217-
$pythonArch = "64"
218-
$pythonVersion = "3.${{ matrix.python-version-minor }}"
219-
iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/scikit-build/scikit-ci-addons/master/windows/install-python.ps1'))
220-
221-
- name: 'Fetch build dependencies'
222-
shell: bash
223-
run: |
224-
mv im ../../
225-
cd ../../
226-
curl -L "https://github.com/InsightSoftwareConsortium/ITKPythonBuilds/releases/download/${{ env.itk-wheel-tag }}/ITKPythonBuilds-windows.zip" -o "ITKPythonBuilds-windows.zip"
227-
7z x ITKPythonBuilds-windows.zip -o/c/P -aoa -r
228-
curl -L "https://data.kitware.com/api/v1/file/5c0ad59d8d777f2179dd3e9c/download" -o "doxygen-1.8.11.windows.bin.zip"
229-
7z x doxygen-1.8.11.windows.bin.zip -o/c/P/doxygen -aoa -r
230-
curl -L "https://data.kitware.com/api/v1/file/5bbf87ba8d777f06b91f27d6/download/grep-win.zip" -o "grep-win.zip"
231-
7z x grep-win.zip -o/c/P/grep -aoa -r
232-
233-
- name: 'Build 🐍 Python 📦 package'
234-
shell: cmd
235-
run: |
236-
cd ../../im
237-
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
238-
set PATH=C:\P\grep;%PATH%
239-
set CC=cl.exe
240-
set CXX=cl.exe
241-
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
242-
243-
- name: Publish Python package as GitHub Artifact
244-
uses: actions/upload-artifact@v1
245-
with:
246-
name: WindowsWheel3.${{ matrix.python-version-minor }}
247-
path: ../../im/dist
248-
249-
publish-python-packages-to-pypi:
250-
needs:
251-
- build-linux-python-packages
252-
- build-macos-python-packages
253-
- build-windows-python-packages
254-
runs-on: ubuntu-18.04
255-
256-
steps:
257-
- name: Download Python Packages
258-
uses: actions/download-artifact@v2
259-
260-
- name: Prepare packages for upload
261-
run: |
262-
ls -R
263-
for d in */; do
264-
mv ${d}/*.whl .
265-
done
266-
mkdir dist
267-
mv *.whl dist/
268-
ls dist
6+
cxx-build-workflow:
7+
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-cxx.yml@v5.3rc04.post3
2698

270-
- name: Publish 🐍 Python 📦 package to PyPI
271-
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
272-
uses: pypa/gh-action-pypi-publish@master
273-
with:
274-
user: __token__
275-
password: ${{ secrets.pypi_password }}
9+
python-build-workflow:
10+
uses: InsightSoftwareConsortium/ITKRemoteModuleBuildTestPackageAction/.github/workflows/build-test-package-python.yml@v5.3rc04.post3
11+
secrets:
12+
pypi_password: ${{ secrets.pypi_password }}

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
setup(
1515
name='itk-higherorderaccurategradient',
16-
version='1.1.4',
16+
version='1.1.5',
1717
author='Matthew M. McCormick',
1818
author_email='matt.mccormick@kitware.com',
1919
packages=['itk'],
@@ -48,6 +48,6 @@
4848
keywords='ITK Higher-order Derivative Gradient',
4949
url=r'https://github.com/InsightSoftwareConsortium/ITKHigherOrderAccurateGradient',
5050
install_requires=[
51-
r'itk>=v5.3rc04.post2'
51+
r'itk>=v5.3rc04.post3'
5252
]
5353
)

0 commit comments

Comments
 (0)