|
17 | 17 | if: ${{ needs.generate-matrix.outputs.pythonbuild_changed == 'true' || needs.generate-matrix.outputs.any_builds == 'true' || github.ref == 'refs/heads/main' }} |
18 | 18 | needs: |
19 | 19 | - generate-matrix |
20 | | - runs-on: depot-ubuntu-22.04 |
| 20 | + runs-on: ubuntu-22.04 |
21 | 21 | steps: |
22 | 22 | - name: Install System Dependencies |
23 | 23 | run: | |
|
56 | 56 | fail-fast: false |
57 | 57 | matrix: |
58 | 58 | image: |
59 | | - - build |
60 | | - - build.cross |
61 | | - - build.cross-riscv64 |
62 | | - - gcc |
| 59 | + - build.cross-loongarch64 |
63 | 60 | name: ${{ matrix.image }} |
64 | | - runs-on: depot-ubuntu-22.04 |
| 61 | + runs-on: ubuntu-22.04 |
65 | 62 | permissions: |
66 | 63 | packages: write |
67 | 64 | steps: |
@@ -277,103 +274,3 @@ jobs: |
277 | 274 | with: |
278 | 275 | name: cpython-${{ matrix.python }}-${{ matrix.target_triple }}-${{ matrix.build_options }} |
279 | 276 | path: dist/* |
280 | | - |
281 | | - build-1: |
282 | | - needs: |
283 | | - - generate-matrix |
284 | | - - pythonbuild |
285 | | - - image |
286 | | - # Permissions used for actions/attest-build-provenance |
287 | | - permissions: |
288 | | - id-token: write |
289 | | - attestations: write |
290 | | - runs-on: ${{ matrix.runner }} |
291 | | - strategy: |
292 | | - matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix-1) }} |
293 | | - fail-fast: false |
294 | | - name: ${{ matrix.target_triple }} / ${{ matrix.python }} / ${{ matrix.build_options }} |
295 | | - steps: |
296 | | - - uses: actions/checkout@v4 |
297 | | - with: |
298 | | - fetch-depth: 0 |
299 | | - |
300 | | - - name: Install Python |
301 | | - uses: actions/setup-python@v5 |
302 | | - with: |
303 | | - python-version: '3.11' |
304 | | - |
305 | | - - name: Download pythonbuild |
306 | | - uses: actions/download-artifact@v4 |
307 | | - with: |
308 | | - name: pythonbuild |
309 | | - path: build |
310 | | - |
311 | | - - name: Download images |
312 | | - uses: actions/download-artifact@v4 |
313 | | - with: |
314 | | - pattern: image-* |
315 | | - path: build |
316 | | - merge-multiple: true |
317 | | - |
318 | | - - name: Cache downloads |
319 | | - uses: actions/cache@v4 |
320 | | - with: |
321 | | - path: build/downloads |
322 | | - key: ${{ matrix.target_triple }}-${{ hashFiles('pythonbuild/downloads.py')}} |
323 | | - restore-keys: | |
324 | | - ${{ matrix.target_triple }}-${{ hashFiles('pythonbuild/downloads.py')}} |
325 | | - ${{ matrix.target_triple }}- |
326 | | -
|
327 | | - - name: Load Docker Images |
328 | | - run: | |
329 | | - for f in build/image-*.tar.zst; do |
330 | | - echo "decompressing $f" |
331 | | - zstd -d --rm ${f} |
332 | | - done |
333 | | -
|
334 | | - for f in build/image-*.tar; do |
335 | | - echo "loading $f" |
336 | | - docker load --input $f |
337 | | - done |
338 | | -
|
339 | | - - name: Build |
340 | | - if: ${{ ! matrix.dry-run }} |
341 | | - run: | |
342 | | - # Do empty target so all generated files are touched. |
343 | | - ./build-linux.py --make-target empty |
344 | | -
|
345 | | - # Touch mtimes of all images so they are newer than autogenerated files above. |
346 | | - touch build/image-* |
347 | | -
|
348 | | - ./build-linux.py --target-triple ${{ matrix.target_triple }} --python cpython-${{ matrix.python }} --options ${{ matrix.build_options }} |
349 | | -
|
350 | | - - name: Validate Distribution |
351 | | - if: ${{ ! matrix.dry-run }} |
352 | | - run: | |
353 | | - chmod +x build/pythonbuild |
354 | | -
|
355 | | - if [ "${{ matrix.run }}" == "true" ]; then |
356 | | - if [ "${{ matrix.libc }}" == "musl" ]; then |
357 | | - sudo apt install musl-dev |
358 | | -
|
359 | | - # GitHub's setup-python action sets `LD_LIBRARY_PATH` which overrides `RPATH` |
360 | | - # as used in the musl builds. |
361 | | - unset LD_LIBRARY_PATH |
362 | | - fi |
363 | | - EXTRA_ARGS="--run" |
364 | | - fi |
365 | | -
|
366 | | - build/pythonbuild validate-distribution ${EXTRA_ARGS} dist/*.tar.zst |
367 | | -
|
368 | | - - name: Generate attestations |
369 | | - uses: actions/attest-build-provenance@v2 |
370 | | - if: ${{ github.ref == 'refs/heads/main' }} |
371 | | - with: |
372 | | - subject-path: dist/* |
373 | | - |
374 | | - - name: Upload Distribution |
375 | | - if: ${{ ! matrix.dry-run }} |
376 | | - uses: actions/upload-artifact@v4 |
377 | | - with: |
378 | | - name: cpython-${{ matrix.python }}-${{ matrix.target_triple }}-${{ matrix.build_options }} |
379 | | - path: dist/* |
0 commit comments