Skip to content

Commit

Permalink
ENH: Allow ITKPythonPackage update step
Browse files Browse the repository at this point in the history
  • Loading branch information
tbirdso committed Nov 28, 2022
1 parent fbaa0b3 commit 95ae454
Showing 1 changed file with 28 additions and 2 deletions.
30 changes: 28 additions & 2 deletions .github/workflows/build-test-package-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
required: false
type: string
default: 'v5.3.0'
itk-python-package-tag:
required: false
type: string
default: '0f5effc39afbf7cb1ac5ab20faa0996ddb12b34d' # 5.3 patch
secrets:
pypi_password:
required: false # Packages will not be uploaded to PyPI if not set
Expand Down Expand Up @@ -43,7 +47,12 @@ jobs:
- name: 'Fetch build script'
run: |
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
ITK_PYTHON_PACKAGE_GIT_TAG=${{ inputs.itk-python-package-tag }}
if [[ -z ${ITK_PYTHON_PACKAGE_GIT_TAG} ]]; then
ITK_PYTHON_PACKAGE_GIT_TAG="master"
fi
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/${ITK_PYTHON_PACKAGE_GIT_TAG}/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh
- name: 'Build 🐍 Python 📦 package'
Expand Down Expand Up @@ -85,7 +94,12 @@ jobs:

- name: 'Fetch build script'
run: |
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/macpython-download-cache-and-build-module-wheels.sh -O
ITK_PYTHON_PACKAGE_GIT_TAG=${{ inputs.itk-python-package-tag }}
if [[ -z ${ITK_PYTHON_PACKAGE_GIT_TAG} ]]; then
ITK_PYTHON_PACKAGE_GIT_TAG="master"
fi
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/${ITK_PYTHON_PACKAGE_GIT_TAG}/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'
Expand Down Expand Up @@ -139,6 +153,18 @@ jobs:
curl -L "https://data.kitware.com/api/v1/file/5bbf87ba8d777f06b91f27d6/download/grep-win.zip" -o "grep-win.zip"
7z x grep-win.zip -o/c/P/grep -aoa -r
if [[ -n ${{ inputs.itk-python-package-tag }} ]]; then
echo "Updating ITKPythonPackage build scripts to ${{ inputs.itk-python-package-tag }}"
pushd /c/P/IPP
git remote add InsightSoftwareConsortium https://github.com/InsightSoftwareConsortium/ITKPythonPackage.git --tags
git fetch InsightSoftwareConsortium
git checkout ${{ inputs.itk-python-package-tag }}
git status
popd
else
echo "Using ITKPythonPackage scripts included with ITKPythonBuilds archive"
fi
- name: 'Build 🐍 Python 📦 package'
shell: cmd
run: |
Expand Down

0 comments on commit 95ae454

Please sign in to comment.