Skip to content

Commit

Permalink
ENH: Update CI: Remove Perl and Python 3.8, add packages for AMD64 Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
dzenanz committed Sep 12, 2024
1 parent fa4324d commit 1484e15
Showing 1 changed file with 70 additions and 9 deletions.
79 changes: 70 additions & 9 deletions .github/workflows/build-test-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ jobs:
with:
python-version: "3.11"

- uses: shogo82148/actions-setup-perl@v1
- uses: ilammy/setup-nasm@v1

- name: Get specific version of CMake, Ninja
Expand Down Expand Up @@ -175,7 +174,7 @@ jobs:
strategy:
max-parallel: 2
matrix:
python3-minor-version: ["8", "9", "10", "11"]
python3-minor-version: ["9", "10", "11"]
manylinux-platform: ["_2_28-x64"]

steps:
Expand All @@ -189,7 +188,6 @@ jobs:
with:
large-packages: false

- uses: shogo82148/actions-setup-perl@v1
- uses: ilammy/setup-nasm@v1

- name: 'Fetch build script'
Expand Down Expand Up @@ -270,7 +268,6 @@ jobs:
- name: Get specific version of CMake, Ninja
uses: lukka/[email protected]

- uses: shogo82148/actions-setup-perl@v1
- uses: ilammy/setup-nasm@v1

- name: 'Fetch build script'
Expand All @@ -282,7 +279,6 @@ jobs:
chmod u+x macpython-download-cache-and-build-module-wheels.sh
- name: 'Build 🐍 Python 📦 package'
if: matrix.python3-minor-version != '8'
shell: bash
run: |
rm -rf dist
Expand All @@ -301,7 +297,6 @@ jobs:
python-version: "3.11"

- name: Validate build output
if: matrix.python3-minor-version != '8'
shell: bash
run: |
python -m pip install twine
Expand All @@ -319,18 +314,84 @@ jobs:
python -m twine check ${WHEEL_PATTERN}
- name: Publish Python package as GitHub Artifact
if: matrix.python3-minor-version != '8'
uses: actions/upload-artifact@v4
with:
name: MacOSArmWheel3${{ matrix.python3-minor-version }}
path: dist/*.whl

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

steps:
- uses: actions/checkout@v4

- name: 'Specific XCode version'
run: |
sudo xcode-select -s "/Applications/Xcode_15.0.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:
max-parallel: 2
matrix:
python3-minor-version: ["8", "9", "10", "11"]
python3-minor-version: ["9", "10", "11"]

steps:
- name: Get specific version of CMake, Ninja
Expand All @@ -356,7 +417,6 @@ jobs:
echo "Fetching $SCRIPT_UPSTREAM"
(new-object net.webclient).DownloadString($SCRIPT_UPSTREAM) > windows-download-cache-and-build-module-wheels.ps1
- uses: shogo82148/actions-setup-perl@v1
- uses: ilammy/setup-nasm@v1

- name: 'Build 🐍 Python 📦 package'
Expand Down Expand Up @@ -404,6 +464,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 1484e15

Please sign in to comment.