|
20 | 20 | required: false |
21 | 21 | type: string |
22 | 22 | # v5.4.3 |
23 | | - default: 'v5.4.3' |
| 23 | + default: 'c8abf82ce0198110a8226bec311c4bf6ccb7fb8f' |
24 | 24 | itk-python-package-org: |
25 | 25 | description: 'Github organization name for fetching ITKPythonPackage build scripts' |
26 | 26 | required: false |
@@ -206,6 +206,79 @@ jobs: |
206 | 206 | name: LinuxWheel3${{ matrix.python3-minor-version }}_2_28-aarch64 |
207 | 207 | path: dist/*.whl |
208 | 208 |
|
| 209 | + build-macos-py: |
| 210 | + runs-on: macos-13 |
| 211 | + strategy: |
| 212 | + max-parallel: 2 |
| 213 | + matrix: |
| 214 | + python3-minor-version: ${{ fromJSON(inputs.python3-minor-versions) }} |
| 215 | + |
| 216 | + steps: |
| 217 | + - uses: actions/checkout@v4 |
| 218 | + |
| 219 | + - name: 'Specific XCode version' |
| 220 | + run: | |
| 221 | + sudo xcode-select -s "/Applications/Xcode_15.2.0.app" |
| 222 | +
|
| 223 | + - name: Get specific version of CMake, Ninja |
| 224 | + |
| 225 | + |
| 226 | + - name: 'Fetch build script' |
| 227 | + run: | |
| 228 | + IPP_DOWNLOAD_GIT_TAG=${{ inputs.itk-python-package-tag }} |
| 229 | + IPP_DOWNLOAD_ORG=${{ inputs.itk-python-package-org }} |
| 230 | + 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 |
| 231 | + chmod u+x macpython-download-cache-and-build-module-wheels.sh |
| 232 | +
|
| 233 | + - name: 'Build 🐍 Python 📦 package' |
| 234 | + shell: bash |
| 235 | + run: | |
| 236 | + rm -rf dist |
| 237 | +
|
| 238 | + export ITK_PACKAGE_VERSION=${{ inputs.itk-wheel-tag }} |
| 239 | + export ITKPYTHONPACKAGE_TAG=${{ inputs.itk-python-package-tag }} |
| 240 | + export ITKPYTHONPACKAGE_ORG=${{ inputs.itk-python-package-org }} |
| 241 | + export ITK_MODULE_PREQ=${{ inputs.itk-module-deps }} |
| 242 | + if [ -z ${{ inputs.macosx-deployment-target }} ]; then |
| 243 | + export MACOSX_DEPLOYMENT_TARGET=10.9 |
| 244 | + else |
| 245 | + export MACOSX_DEPLOYMENT_TARGET=${{ inputs.macosx-deployment-target }} |
| 246 | + fi |
| 247 | + if [ -z ${{ inputs.cmake-options }} ]; then |
| 248 | + CMAKE_OPTIONS="" |
| 249 | + else |
| 250 | + CMAKE_OPTIONS="--cmake_options ${{ inputs.cmake-options }}" |
| 251 | + fi |
| 252 | + ./macpython-download-cache-and-build-module-wheels.sh $CMAKE_OPTIONS "3.${{ matrix.python3-minor-version }}" |
| 253 | +
|
| 254 | + - name: Set up Python 3.11 for Validation |
| 255 | + uses: actions/setup-python@v5 |
| 256 | + with: |
| 257 | + python-version: "3.11" |
| 258 | + |
| 259 | + - name: Validate build output |
| 260 | + shell: bash |
| 261 | + run: | |
| 262 | + python -m pip install twine |
| 263 | + ls dist/ |
| 264 | +
|
| 265 | + WHEEL_PATTERN="dist/itk_*macosx*.whl" |
| 266 | + EXPECTED_WHEEL_COUNT=1 |
| 267 | +
|
| 268 | + WHEEL_COUNT=`(ls ${WHEEL_PATTERN} | wc -l)` |
| 269 | + if (( ${WHEEL_COUNT} != ${EXPECTED_WHEEL_COUNT} )); then |
| 270 | + echo "Expected ${EXPECTED_WHEEL_COUNT} wheels but found ${WHEEL_COUNT}" |
| 271 | + exit 1 |
| 272 | + fi |
| 273 | +
|
| 274 | + python -m twine check ${WHEEL_PATTERN} |
| 275 | +
|
| 276 | + - name: Publish Python package as GitHub Artifact |
| 277 | + uses: actions/upload-artifact@v4 |
| 278 | + with: |
| 279 | + name: MacOSWheel3${{ matrix.python3-minor-version }} |
| 280 | + path: dist/*.whl |
| 281 | + |
209 | 282 | build-macos-arm-py: |
210 | 283 | runs-on: macos-14 |
211 | 284 | strategy: |
@@ -410,6 +483,7 @@ jobs: |
410 | 483 | needs: |
411 | 484 | - build-linux-py |
412 | 485 | - build-linux-arm-py |
| 486 | + - build-macos-py |
413 | 487 | - build-macos-arm-py |
414 | 488 | - build-windows-python-packages |
415 | 489 | runs-on: ubuntu-22.04 |
|
0 commit comments