3030 # example: InsightSoftwareConsortium/ITKMeshToPolyData@3ad8f08:InsightSoftwareConsortium/ITKBSplineGradient@0.3.0
3131 required : false
3232 type : string
33+ python3-minor-versions :
34+ description : ' JSON-formatted array of Python 3.x minor version wheel targets'
35+ required : false
36+ type : string
37+ default : ' ["7","8","9","10","11"]'
3338 manylinux-platforms :
3439 description : ' JSON-formatted array of "<manylinux-image>-<arch>" specializations'
3540 required : false
5156 strategy :
5257 max-parallel : 2
5358 matrix :
54- python- version : ["37", "38", "39", "310", "311"]
59+ python3-minor- version : ${{ fromJSON(inputs.python3-minor-versions) }}
5560 manylinux-platform : ${{ fromJSON(inputs.manylinux-platforms) }}
5661
5762 steps :
9499 export MANYLINUX_VERSION=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 1)`
95100 export TARGET_ARCH=`(echo ${MANYLINUX_PLATFORM} | cut -d '-' -f 2)`
96101 echo "Building for manylinux specialization ${MANYLINUX_VERSION} and target architecture ${TARGET_ARCH}"
97- ./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp${{ matrix.python-version }} $CMAKE_OPTIONS
98102
99- - name : Set up Python 3.10
103+ ./dockcross-manylinux-download-cache-and-build-module-wheels.sh cp3${{ matrix.python3-minor-version }} $CMAKE_OPTIONS
104+
105+ - name : Set up Python 3.10 for Validation
100106 uses : actions/setup-python@v4
101107 with :
102108 python-version : " 3.10"
@@ -113,23 +119,23 @@ jobs:
113119 if [[ ${TARGET_ARCH_NAME} == "x64" ]]; then
114120 TARGET_ARCH_NAME="x86_64" # Match auditwheel naming convention
115121 fi
116- WHEEL_PATTERN="dist/itk_*cp ${{ matrix.python -version }}*manylinux${MANYLINUX_VERSION}*${TARGET_ARCH_NAME}.whl"
122+ WHEEL_PATTERN="dist/itk_*cp3 ${{ matrix.python3-minor -version }}*manylinux${MANYLINUX_VERSION}*${TARGET_ARCH_NAME}.whl"
117123
118124 echo "Searching for wheels matching pattern ${WHEEL_PATTERN}"
119125 python -m twine check ${WHEEL_PATTERN}
120126
121127 - name : Publish Python package as GitHub Artifact
122128 uses : actions/upload-artifact@v3
123129 with :
124- name : LinuxWheel ${{ matrix.python -version }}
130+ name : LinuxWheel3 ${{ matrix.python3-minor -version }}
125131 path : dist/*.whl
126132
127133 build-macos-py :
128134 runs-on : macos-12
129135 strategy :
130136 max-parallel : 2
131137 matrix :
132- python- version : ["3.7", "3.8", "3.9", "3.10", "3.11"]
138+ python3-minor- version : ${{ fromJSON(inputs.python3-minor-versions) }}
133139
134140 steps :
135141 - uses : actions/checkout@v3
@@ -163,9 +169,9 @@ jobs:
163169 else
164170 CMAKE_OPTIONS="--cmake_options ${{ inputs.cmake-options }}"
165171 fi
166- ./macpython-download-cache-and-build-module-wheels.sh $CMAKE_OPTIONS "${{ matrix.python -version }}"
172+ ./macpython-download-cache-and-build-module-wheels.sh $CMAKE_OPTIONS "3. ${{ matrix.python3-minor -version }}"
167173
168- - name : Set up Python 3.10
174+ - name : Set up Python 3.10 for Validation
169175 uses : actions/setup-python@v4
170176 with :
171177 python-version : " 3.10"
@@ -190,15 +196,15 @@ jobs:
190196 - name : Publish Python package as GitHub Artifact
191197 uses : actions/upload-artifact@v3
192198 with :
193- name : MacOSWheels
199+ name : MacOSWheel3${{ matrix.python3-minor-version }}
194200 path : dist/*.whl
195201
196202 build-windows-python-packages :
197203 runs-on : windows-2022
198204 strategy :
199205 max-parallel : 2
200206 matrix :
201- python-version- minor: ["7", "8", "9", "10", "11"]
207+ python3- minor-version : ${{ fromJSON(inputs.python3-minor-versions) }}
202208
203209 steps :
204210 - name : Get specific version of CMake, Ninja
@@ -237,31 +243,32 @@ jobs:
237243 $env:ITKPYTHONPACKAGE_TAG = "${{ inputs.itk-python-package-tag }}"
238244 $env:ITKPYTHONPACKAGE_ORG = "${{ inputs.itk-python-package-org }}"
239245 $env:ITK_MODULE_PREQ = "${{ inputs.itk-module-deps }}"
240- ./windows-download-cache-and-build-module-wheels.ps1 "${{ matrix.python-version-minor }}" -cmake_options "${{ inputs.cmake-options }}"
246+
247+ ./windows-download-cache-and-build-module-wheels.ps1 "${{ matrix.python3-minor-version }}" -cmake_options "${{ inputs.cmake-options }}"
241248
242249 mkdir -p '${{ github.workspace }}\dist'
243250 cp 'dist\*.whl' '${{ github.workspace }}\dist'
244251
245- - name : Set up Python 3.10
252+ - name : Set up Python 3.10 for Validation
246253 uses : actions/setup-python@v4
247254 with :
248255 python-version : " 3.10"
249256
250257 - name : Validate build output
251- shell : bash
258+ shell : pwsh
252259 run : |
253260 python -m pip install twine
254261 ls dist/
255262
256- WHEEL_PATTERN= "dist/itk_*cp3${{ matrix.python-version- minor }}*win*.whl"
263+ $ WHEEL_PATTERN = "dist/itk_*cp3${{ matrix.python3- minor-version }}*win*.whl"
257264 echo "Searching for wheels matching pattern ${WHEEL_PATTERN}"
258265
259266 python -m twine check ${WHEEL_PATTERN}
260267
261268 - name : Publish Python package as GitHub Artifact
262269 uses : actions/upload-artifact@v3
263270 with :
264- name : WindowsWheel3. ${{ matrix.python-version- minor }}
271+ name : WindowsWheel3${{ matrix.python3- minor-version }}
265272 path : dist/*.whl
266273
267274 test-linux-notebooks :
@@ -275,7 +282,7 @@ jobs:
275282
276283 - uses : actions/setup-python@v4
277284 with :
278- python-version : ' 3.10 '
285+ python-version : " 3.${{ fromJSON(inputs.python3-minor-versions)[0] }} "
279286
280287 - name : Install build dependencies
281288 shell : bash
@@ -290,12 +297,12 @@ jobs:
290297 - name : Download Python Package Artifacts
291298 uses : actions/download-artifact@v3
292299 with :
293- name : LinuxWheel310
300+ name : LinuxWheel3${{ fromJSON(inputs.python3-minor-versions)[0] }}
294301
295302 - name : Install Python Package Artifact
296303 run : |
297304 ls .
298- wheel_name_full=`(find . -name "*cp310 -manylinux_2_28_x86_64.whl")`
305+ wheel_name_full=`(find . -name "*cp3${{ fromJSON(inputs.python3-minor-versions)[0] }}* -manylinux_2_28_x86_64.whl")`
299306 echo "wheel_name_full ${wheel_name_full}"
300307 # extract wheel name which may be an abbreviation of the module name
301308 # ex. ./itk_splitcomponents-cp310..._64.whl -> itk-splitcomponents
0 commit comments