Skip to content

Commit

Permalink
ENH: Add packages for AMD64 Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
dzenanz committed Oct 17, 2024
1 parent 854388d commit 343ece6
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,73 @@ jobs:
name: MacOSArmWheel3${{ matrix.python3-minor-version }}
path: dist/*.whl

build-macos-amd-py:
runs-on: macos-13
strategy:
max-parallel: 2
matrix:
python3-minor-version: ["8", "9", "10", "11"]

steps:
- uses: actions/checkout@v4

- name: 'Specific XCode version'
run: |
sudo xcode-select -s "/Applications/Xcode_14.3.1.app"
- name: Get specific version of CMake, Ninja
uses: lukka/[email protected]

- uses: ilammy/setup-nasm@v1

- name: 'Fetch build script'
run: |
IPP_DOWNLOAD_GIT_TAG=${{ env.itk-python-package-tag }}
IPP_DOWNLOAD_ORG=${{ env.itk-python-package-org }}
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
chmod u+x macpython-download-cache-and-build-module-wheels.sh
- name: 'Build 🐍 Python 📦 package'
shell: bash
run: |
rm -rf dist
export ITK_PACKAGE_VERSION=${{ env.itk-wheel-tag }}
export ITKPYTHONPACKAGE_TAG=${{ env.itk-python-package-tag }}
export ITKPYTHONPACKAGE_ORG=${{ env.itk-python-package-org }}
export ITK_MODULE_PREQ=
export MACOSX_DEPLOYMENT_TARGET=11.0
SCMAKE_OPTIONS=""
./macpython-download-cache-and-build-module-wheels.sh $CMAKE_OPTIONS "3.${{ matrix.python3-minor-version }}"
- name: Set up Python 3.11 for Validation
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Validate build output
shell: bash
run: |
python -m pip install twine
ls dist/
WHEEL_PATTERN="dist/itk_*macosx*.whl"
EXPECTED_WHEEL_COUNT=1
WHEEL_COUNT=`(ls ${WHEEL_PATTERN} | wc -l)`
if (( ${WHEEL_COUNT} != ${EXPECTED_WHEEL_COUNT} )); then
echo "Expected ${EXPECTED_WHEEL_COUNT} wheels but found ${WHEEL_COUNT}"
exit 1
fi
python -m twine check ${WHEEL_PATTERN}
- name: Publish Python package as GitHub Artifact
uses: actions/upload-artifact@v4
with:
name: MacOSAmdWheel3${{ matrix.python3-minor-version }}
path: dist/*.whl

build-windows-python-packages:
runs-on: windows-2022
strategy:
Expand Down Expand Up @@ -404,6 +471,7 @@ jobs:
needs:
- build-linux-py
- build-macos-arm-py
- build-macos-amd-py
- build-windows-python-packages
runs-on: ubuntu-22.04

Expand Down

0 comments on commit 343ece6

Please sign in to comment.