From 343ece62c7161b7f708e520f6b4ac47c2107cfc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=C5=BEenan=20Zuki=C4=87?= Date: Thu, 12 Sep 2024 10:32:13 -0400 Subject: [PATCH] ENH: Add packages for AMD64 Mac --- .github/workflows/build-test-package.yml | 68 ++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/.github/workflows/build-test-package.yml b/.github/workflows/build-test-package.yml index 9dbf73d..3446dbb 100644 --- a/.github/workflows/build-test-package.yml +++ b/.github/workflows/build-test-package.yml @@ -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/get-cmake@v3.29.6 + + - 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: @@ -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