5454 name : Generate build matrix
5555 runs-on : ubuntu-latest
5656 outputs :
57- matrix : ${{ steps.set-matrix.outputs.matrix }}
57+ matrix-x86_64 : ${{ steps.set-matrix.outputs.matrix-x86_64 }}
58+ matrix-i686 : ${{ steps.set-matrix.outputs.matrix-i686 }}
59+ matrix-aarch64 : ${{ steps.set-matrix.outputs.matrix-aarch64 }}
5860 crate-build-matrix : ${{ steps.set-matrix.outputs.crate-build-matrix }}
59- dep-build-matrix : ${{ steps.set-matrix.outputs.dep-build-matrix }}
61+ dependencies-build-matrix-x86_64 : ${{ steps.set-matrix.outputs.dependencies-build-matrix-x86_64 }}
62+ dependencies-build-matrix-i686 : ${{ steps.set-matrix.outputs.dependencies-build-matrix-x86_64 }}
63+ dependencies-build-matrix-aarch64 : ${{ steps.set-matrix.outputs.dependencies-build-matrix-aarch64 }}
6064 any_builds : ${{ steps.set-matrix.outputs.any_builds }}
6165 steps :
6266 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
@@ -93,17 +97,23 @@ jobs:
9397 - name : Generate build matrix
9498 id : set-matrix
9599 run : |
96- uv run ci-matrix.py --platform windows --labels "${STEPS_GET_LABELS_OUTPUTS_LABELS}" ${{ (steps.check-pythonbuild.outputs.changed == 'true' || github.ref == 'refs/heads/main') && '--force-crate-build' || '' }} > matrix.json
100+ uv run ci-matrix.py --platform windows --facet-by-triple -- labels "${STEPS_GET_LABELS_OUTPUTS_LABELS}" ${{ (steps.check-pythonbuild.outputs.changed == 'true' || github.ref == 'refs/heads/main') && '--force-crate-build' || '' }} > matrix.json
97101
98102 # Extract python-build matrix
99- echo "matrix=$(jq -c '."python-build"' matrix.json)" >> $GITHUB_OUTPUT
103+ echo "matrix-x86_64=$(jq -c '."python-build"?["x86_64-pc-windows-msvc"]? // {"include": []}' matrix.json)" >> $GITHUB_OUTPUT
104+ echo "matrix-i686=$(jq -c '."python-build"?["i686-pc-windows-msvc"]? // {"include": []}' matrix.json)" >> $GITHUB_OUTPUT
105+ echo "matrix-aarch64=$(jq -c '."python-build"?["aarch64-pc-windows-msvc"]? // {"include": []}' matrix.json)" >> $GITHUB_OUTPUT
106+
100107 echo "crate-build-matrix=$(jq -c '."crate-build"' matrix.json)" >> $GITHUB_OUTPUT
101- echo "dep-build-matrix=$(jq -c '."deps-build"' matrix.json)" >> $GITHUB_OUTPUT
108+
109+ echo "dependencies-build-matrix-x86_64=$(jq -c '."dependencies-build"?["x86_64-pc-windows-msvc"]? // {"include": []}' matrix.json)" >> $GITHUB_OUTPUT
110+ echo "dependencies-build-matrix-i686=$(jq -c '."dependencies-build"?["i686-pc-windows-msvc"]? // {"include": []}' matrix.json)" >> $GITHUB_OUTPUT
111+ echo "dependencies-build-matrix-aarch64=$(jq -c '."dependencies-build"?["aarch64-pc-windows-msvc"]? // {"include": []}' matrix.json)" >> $GITHUB_OUTPUT
102112
103113 # Display the matrix for debugging too
104114 cat matrix.json | jq
105115
106- if jq -e '."python-build".include | length > 0' matrix.json > /dev/null; then
116+ if jq -e '."python-build" | length > 0' matrix.json > /dev/null; then
107117 # Build matrix has entries
108118 echo "any_builds=true" >> $GITHUB_OUTPUT
109119 else
@@ -113,22 +123,23 @@ jobs:
113123 env :
114124 STEPS_GET_LABELS_OUTPUTS_LABELS : ${{ steps.get-labels.outputs.labels }}
115125
116- build :
126+
127+ build-python-x86_64 :
117128 timeout-minutes : 90
118129 needs :
119130 - generate-matrix
120131 - crate-build
121- - build-dependencies
132+ - build-dependencies-x86_64
122133 # Permissions used for actions/attest-build-provenance
123134 permissions :
124135 id-token : write
125136 attestations : write
126137 runs-on : ${{ matrix.runner }}
127138 strategy :
128- matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
139+ matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix-x86_64 ) }}
129140 fail-fast : false
130141 name : ${{ matrix.target_triple }} / ${{ matrix.python }} / ${{ matrix.build_options }}
131- steps :
142+ steps : &build-python-steps
132143 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
133144 with :
134145 fetch-depth : 0
@@ -196,16 +207,50 @@ jobs:
196207 $Dists = Resolve-Path -Path "dist/*.tar.zst" -Relative
197208 .\pythonbuild.exe validate-distribution --run $Dists
198209
199- build-dependencies :
210+ build-python-i686 :
211+ timeout-minutes : 90
212+ needs :
213+ - generate-matrix
214+ - crate-build
215+ - build-dependencies-i686
216+ # Permissions used for actions/attest-build-provenance
217+ permissions :
218+ id-token : write
219+ attestations : write
220+ runs-on : ${{ matrix.runner }}
221+ strategy :
222+ matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix-i686) }}
223+ fail-fast : false
224+ name : ${{ matrix.target_triple }} / ${{ matrix.python }} / ${{ matrix.build_options }}
225+ steps : *build-python-steps
226+
227+ build-python-aarch64 :
228+ timeout-minutes : 90
229+ needs :
230+ - generate-matrix
231+ - crate-build
232+ - build-dependencies-aarch64
233+ # Permissions used for actions/attest-build-provenance
234+ permissions :
235+ id-token : write
236+ attestations : write
237+ runs-on : ${{ matrix.runner }}
238+ strategy :
239+ matrix : ${{ fromJson(needs.generate-matrix.outputs.matrix-aarch64) }}
240+ fail-fast : false
241+ name : ${{ matrix.target_triple }} / ${{ matrix.python }} / ${{ matrix.build_options }}
242+ steps : *build-python-steps
243+
244+ build-dependencies-x86_64 :
200245 timeout-minutes : 20
201246 needs :
202247 - generate-matrix
203248 runs-on : ${{ matrix.runner }}
204249 strategy :
205- matrix : ${{ fromJson(needs.generate-matrix.outputs.dep -build-matrix) }}
250+ matrix : ${{ fromJson(needs.generate-matrix.outputs.dependencies -build-matrix-x86_64 ) }}
206251 fail-fast : false
207- name : build-deps / ${{ matrix.target_triple }} / ${{ matrix.build_options }}
208- steps :
252+ name : build-dependencies / ${{ matrix.target_triple }} / ${{ matrix.build_options }}
253+ steps : &build-dependencies-steps
209254 - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
210255 with :
211256 fetch-depth : 0
@@ -246,4 +291,26 @@ jobs:
246291 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
247292 with :
248293 name : build-deps-${{ matrix.target_triple }}-${{ matrix.build_options }}
249- path : build/*.tar
294+ path : build/*.tar
295+
296+ build-dependencies-i686 :
297+ timeout-minutes : 20
298+ needs :
299+ - generate-matrix
300+ runs-on : ${{ matrix.runner }}
301+ strategy :
302+ matrix : ${{ fromJson(needs.generate-matrix.outputs.dependencies-build-matrix-i686) }}
303+ fail-fast : false
304+ name : build-dependencies / ${{ matrix.target_triple }} / ${{ matrix.build_options }}
305+ steps : *build-dependencies-steps
306+
307+ build-dependencies-aarch64 :
308+ timeout-minutes : 20
309+ needs :
310+ - generate-matrix
311+ runs-on : ${{ matrix.runner }}
312+ strategy :
313+ matrix : ${{ fromJson(needs.generate-matrix.outputs.dependencies-build-matrix-aarch64) }}
314+ fail-fast : false
315+ name : build-dependencies / ${{ matrix.target_triple }} / ${{ matrix.build_options }}
316+ steps : *build-dependencies-steps
0 commit comments