Skip to content

Commit 95ae454

Browse files
committed
ENH: Allow ITKPythonPackage update step
1 parent fbaa0b3 commit 95ae454

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

.github/workflows/build-test-package-python.yml

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
required: false
1212
type: string
1313
default: 'v5.3.0'
14+
itk-python-package-tag:
15+
required: false
16+
type: string
17+
default: '0f5effc39afbf7cb1ac5ab20faa0996ddb12b34d' # 5.3 patch
1418
secrets:
1519
pypi_password:
1620
required: false # Packages will not be uploaded to PyPI if not set
@@ -43,7 +47,12 @@ jobs:
4347
4448
- name: 'Fetch build script'
4549
run: |
46-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
50+
ITK_PYTHON_PACKAGE_GIT_TAG=${{ inputs.itk-python-package-tag }}
51+
if [[ -z ${ITK_PYTHON_PACKAGE_GIT_TAG} ]]; then
52+
ITK_PYTHON_PACKAGE_GIT_TAG="master"
53+
fi
54+
55+
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/${ITK_PYTHON_PACKAGE_GIT_TAG}/scripts/dockcross-manylinux-download-cache-and-build-module-wheels.sh -O
4756
chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh
4857
4958
- name: 'Build 🐍 Python 📦 package'
@@ -85,7 +94,12 @@ jobs:
8594

8695
- name: 'Fetch build script'
8796
run: |
88-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/master/scripts/macpython-download-cache-and-build-module-wheels.sh -O
97+
ITK_PYTHON_PACKAGE_GIT_TAG=${{ inputs.itk-python-package-tag }}
98+
if [[ -z ${ITK_PYTHON_PACKAGE_GIT_TAG} ]]; then
99+
ITK_PYTHON_PACKAGE_GIT_TAG="master"
100+
fi
101+
102+
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKPythonPackage/${ITK_PYTHON_PACKAGE_GIT_TAG}/scripts/macpython-download-cache-and-build-module-wheels.sh -O
89103
chmod u+x macpython-download-cache-and-build-module-wheels.sh
90104
91105
- name: 'Build 🐍 Python 📦 package'
@@ -139,6 +153,18 @@ jobs:
139153
curl -L "https://data.kitware.com/api/v1/file/5bbf87ba8d777f06b91f27d6/download/grep-win.zip" -o "grep-win.zip"
140154
7z x grep-win.zip -o/c/P/grep -aoa -r
141155
156+
if [[ -n ${{ inputs.itk-python-package-tag }} ]]; then
157+
echo "Updating ITKPythonPackage build scripts to ${{ inputs.itk-python-package-tag }}"
158+
pushd /c/P/IPP
159+
git remote add InsightSoftwareConsortium https://github.com/InsightSoftwareConsortium/ITKPythonPackage.git --tags
160+
git fetch InsightSoftwareConsortium
161+
git checkout ${{ inputs.itk-python-package-tag }}
162+
git status
163+
popd
164+
else
165+
echo "Using ITKPythonPackage scripts included with ITKPythonBuilds archive"
166+
fi
167+
142168
- name: 'Build 🐍 Python 📦 package'
143169
shell: cmd
144170
run: |

0 commit comments

Comments
 (0)