|
11 | 11 | required: false |
12 | 12 | type: string |
13 | 13 | default: 'v5.3.0' |
| 14 | + itk-python-package-tag: |
| 15 | + required: false |
| 16 | + type: string |
| 17 | + default: '0f5effc39afbf7cb1ac5ab20faa0996ddb12b34d' # 5.3 patch |
14 | 18 | secrets: |
15 | 19 | pypi_password: |
16 | 20 | required: false # Packages will not be uploaded to PyPI if not set |
|
43 | 47 |
|
44 | 48 | - name: 'Fetch build script' |
45 | 49 | 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 |
47 | 56 | chmod u+x dockcross-manylinux-download-cache-and-build-module-wheels.sh |
48 | 57 |
|
49 | 58 | - name: 'Build 🐍 Python 📦 package' |
|
85 | 94 |
|
86 | 95 | - name: 'Fetch build script' |
87 | 96 | 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 |
89 | 103 | chmod u+x macpython-download-cache-and-build-module-wheels.sh |
90 | 104 |
|
91 | 105 | - name: 'Build 🐍 Python 📦 package' |
@@ -139,6 +153,18 @@ jobs: |
139 | 153 | curl -L "https://data.kitware.com/api/v1/file/5bbf87ba8d777f06b91f27d6/download/grep-win.zip" -o "grep-win.zip" |
140 | 154 | 7z x grep-win.zip -o/c/P/grep -aoa -r |
141 | 155 |
|
| 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 | +
|
142 | 168 | - name: 'Build 🐍 Python 📦 package' |
143 | 169 | shell: cmd |
144 | 170 | run: | |
|
0 commit comments