@@ -309,111 +309,3 @@ jobs:
309309 env :
310310 MATRIX_RUN : ${{ matrix.run }}
311311 MATRIX_LIBC : ${{ matrix.libc }}
312-
313- build-1 :
314- needs :
315- - generate-matrix
316- - crate-build
317- - image
318- # Permissions used for actions/attest-build-provenance
319- permissions :
320- id-token : write
321- attestations : write
322- runs-on : ${{ matrix.runner }}
323- strategy :
324- matrix : ${{ fromJson(needs.generate-matrix.outputs.python-build-matrix-1) }}
325- fail-fast : false
326- name : ${{ matrix.target_triple }} / ${{ matrix.python }} / ${{ matrix.build_options }}
327- steps :
328- - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
329- with :
330- fetch-depth : 0
331- persist-credentials : false
332-
333- - name : Install Python
334- uses : actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
335- with :
336- python-version : " 3.11"
337-
338- - name : Download pythonbuild
339- uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
340- with :
341- name : ${{ matrix.crate_artifact_name }}
342- path : build
343-
344- - name : Download images
345- uses : actions/download-artifact@634f93cb2916e3fdff6788551b99b062d0335ce0 # v5.0.0
346- with :
347- pattern : image-*
348- path : build
349- merge-multiple : true
350-
351- - name : Cache downloads
352- uses : actions/cache@0400d5f644dc74513175e3cd8d07132dd4860809 # v4.2.4
353- with :
354- path : build/downloads
355- key : ${{ matrix.target_triple }}-${{ hashFiles('pythonbuild/downloads.py')}}
356- restore-keys : |
357- ${{ matrix.target_triple }}-${{ hashFiles('pythonbuild/downloads.py')}}
358- ${{ matrix.target_triple }}-
359-
360- - name : Load Docker Images
361- run : |
362- for f in build/image-*.tar.zst; do
363- echo "decompressing $f"
364- zstd -d --rm ${f}
365- done
366-
367- for f in build/image-*.tar; do
368- echo "loading $f"
369- docker load --input $f
370- done
371-
372- - name : Build
373- if : ${{ ! matrix.dry-run }}
374- run : |
375- # Do empty target so all generated files are touched.
376- ./build-linux.py --make-target empty
377-
378- # Touch mtimes of all images so they are newer than autogenerated files above.
379- touch build/image-*
380-
381- ./build-linux.py --target-triple ${MATRIX_TARGET_TRIPLE} --python cpython-${MATRIX_PYTHON} --options ${MATRIX_BUILD_OPTIONS}
382- env :
383- MATRIX_TARGET_TRIPLE : ${{ matrix.target_triple }}
384- MATRIX_PYTHON : ${{ matrix.python }}
385- MATRIX_BUILD_OPTIONS : ${{ matrix.build_options }}
386-
387- - name : Generate attestations
388- uses : actions/attest-build-provenance@977bb373ede98d70efdf65b84cb5f73e068dcc2a # v3.0.0
389- if : ${{ github.ref == 'refs/heads/main' }}
390- with :
391- subject-path : dist/*
392-
393- - name : Upload Distribution
394- if : ${{ ! matrix.dry-run }}
395- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
396- with :
397- name : cpython-${{ matrix.python }}-${{ matrix.target_triple }}-${{ matrix.build_options }}
398- path : dist/*
399-
400- - name : Validate Distribution
401- if : ${{ ! matrix.dry-run }}
402- run : |
403- chmod +x build/pythonbuild
404-
405- if [ "${MATRIX_RUN}" == "true" ]; then
406- if [ "${MATRIX_LIBC}" == "musl" ]; then
407- sudo apt install musl-dev
408-
409- # GitHub's setup-python action sets `LD_LIBRARY_PATH` which overrides `RPATH`
410- # as used in the musl builds.
411- unset LD_LIBRARY_PATH
412- fi
413- EXTRA_ARGS="--run"
414- fi
415-
416- build/pythonbuild validate-distribution ${EXTRA_ARGS} dist/*.tar.zst
417- env :
418- MATRIX_RUN : ${{ matrix.run }}
419- MATRIX_LIBC : ${{ matrix.libc }}
0 commit comments