Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Update the version of tensorstore we use #74

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ include(FetchContent)
FetchContent_Declare(
tensorstore
GIT_REPOSITORY https://github.com/InsightSoftwareConsortium/tensorstore
GIT_TAG 8517bf4987e44035056cb61732d144a827e9d50e
GIT_TAG bb0438fe407da59bded7cc19e19cb325c3cf9c05
)
FetchContent_MakeAvailable(tensorstore)
unset(CMAKE_FOLDER)
Expand Down
Loading