Skip to content

Commit 7e5f78c

Browse files
authored
Merge pull request #109 from thewtex/itk-5.4.2
ENH: Update Python packages to build against ITK 5.4.2
2 parents bba02e2 + 4533c8b commit 7e5f78c

File tree

1 file changed

+4
-79
lines changed

1 file changed

+4
-79
lines changed

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

Lines changed: 4 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,13 @@ on:
1313
description: 'Github release version tag for the ITKPythonBuilds build archive to use'
1414
required: false
1515
type: string
16-
default: 'v5.4.0'
16+
default: 'v5.4.2.post1'
1717
itk-python-package-tag:
1818
# See https://github.com/InsightSoftwareConsortium/ITKPythonPackage
1919
description: 'Git tag or commit hash for ITKPythonPackage build scripts to use'
2020
required: false
2121
type: string
22-
# v5.4.0 + fixes
23-
default: 'ca1a7e5809dd9dbc1ac3486ff601b5eb1b58184b'
22+
default: 'v5.4.2.post1'
2423
itk-python-package-org:
2524
description: 'Github organization name for fetching ITKPythonPackage build scripts'
2625
required: false
@@ -35,7 +34,7 @@ on:
3534
description: 'JSON-formatted array of Python 3.x minor version wheel targets'
3635
required: false
3736
type: string
38-
default: '["8","9","10","11"]'
37+
default: '["9","10","11"]'
3938
manylinux-platforms:
4039
description: 'JSON-formatted array of "<manylinux-image>-<arch>" specializations'
4140
required: false
@@ -132,79 +131,6 @@ jobs:
132131
name: LinuxWheel3${{ matrix.python3-minor-version }}${{ matrix.manylinux-platform }}
133132
path: dist/*.whl
134133

135-
build-macos-py:
136-
runs-on: macos-12
137-
strategy:
138-
max-parallel: 2
139-
matrix:
140-
python3-minor-version: ${{ fromJSON(inputs.python3-minor-versions) }}
141-
142-
steps:
143-
- uses: actions/checkout@v4
144-
145-
- name: 'Specific XCode version'
146-
run: |
147-
sudo xcode-select -s "/Applications/Xcode_13.2.1.app"
148-
149-
- name: Get specific version of CMake, Ninja
150-
uses: lukka/get-cmake@v3.29.0
151-
152-
- name: 'Fetch build script'
153-
run: |
154-
IPP_DOWNLOAD_GIT_TAG=${{ inputs.itk-python-package-tag }}
155-
IPP_DOWNLOAD_ORG=${{ inputs.itk-python-package-org }}
156-
curl -L https://raw.githubusercontent.com/${IPP_DOWNLOAD_ORG:=InsightSoftwareConsortium}/ITKPythonPackage/${IPP_DOWNLOAD_GIT_TAG:=master}/scripts/macpython-download-cache-and-build-module-wheels.sh -O
157-
chmod u+x macpython-download-cache-and-build-module-wheels.sh
158-
159-
- name: 'Build 🐍 Python 📦 package'
160-
shell: bash
161-
run: |
162-
rm -rf dist
163-
164-
export ITK_PACKAGE_VERSION=${{ inputs.itk-wheel-tag }}
165-
export ITKPYTHONPACKAGE_TAG=${{ inputs.itk-python-package-tag }}
166-
export ITKPYTHONPACKAGE_ORG=${{ inputs.itk-python-package-org }}
167-
export ITK_MODULE_PREQ=${{ inputs.itk-module-deps }}
168-
if [ -z ${{ inputs.macosx-deployment-target }} ]; then
169-
export MACOSX_DEPLOYMENT_TARGET=10.9
170-
else
171-
export MACOSX_DEPLOYMENT_TARGET=${{ inputs.macosx-deployment-target }}
172-
fi
173-
if [ -z ${{ inputs.cmake-options }} ]; then
174-
CMAKE_OPTIONS=""
175-
else
176-
CMAKE_OPTIONS="--cmake_options ${{ inputs.cmake-options }}"
177-
fi
178-
./macpython-download-cache-and-build-module-wheels.sh $CMAKE_OPTIONS "3.${{ matrix.python3-minor-version }}"
179-
180-
- name: Set up Python 3.11 for Validation
181-
uses: actions/setup-python@v5
182-
with:
183-
python-version: "3.11"
184-
185-
- name: Validate build output
186-
shell: bash
187-
run: |
188-
python -m pip install twine
189-
ls dist/
190-
191-
WHEEL_PATTERN="dist/itk_*macosx*.whl"
192-
EXPECTED_WHEEL_COUNT=1
193-
194-
WHEEL_COUNT=`(ls ${WHEEL_PATTERN} | wc -l)`
195-
if (( ${WHEEL_COUNT} != ${EXPECTED_WHEEL_COUNT} )); then
196-
echo "Expected ${EXPECTED_WHEEL_COUNT} wheels but found ${WHEEL_COUNT}"
197-
exit 1
198-
fi
199-
200-
python -m twine check ${WHEEL_PATTERN}
201-
202-
- name: Publish Python package as GitHub Artifact
203-
uses: actions/upload-artifact@v4
204-
with:
205-
name: MacOSWheel3${{ matrix.python3-minor-version }}
206-
path: dist/*.whl
207-
208134
build-macos-arm-py:
209135
runs-on: macos-14
210136
strategy:
@@ -363,7 +289,7 @@ jobs:
363289
if: inputs.test-notebooks
364290
needs:
365291
- build-linux-py
366-
runs-on: ubuntu-22.04
292+
runs-on: ubuntu-24.04
367293

368294
steps:
369295
- uses: actions/checkout@v4
@@ -408,7 +334,6 @@ jobs:
408334
publish-python-packages-to-pypi:
409335
needs:
410336
- build-linux-py
411-
- build-macos-py
412337
- build-macos-arm-py
413338
- build-windows-python-packages
414339
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)