@@ -18,6 +18,9 @@ concurrency:
1818 group : ${{ github.workflow }}-${{ github.head_ref || github.run_id }}-reusable
1919 cancel-in-progress : true
2020
21+ env :
22+ FORCE_COLOR : 1
23+
2124jobs :
2225 check_source :
2326 name : Change detection
@@ -231,24 +234,31 @@ jobs:
231234 name : >-
232235 Ubuntu
233236 ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
237+ ${{ fromJSON(matrix.bolt) && '(bolt)' || '' }}
234238 needs : check_source
235239 if : needs.check_source.outputs.run_tests == 'true'
236240 strategy :
237241 matrix :
242+ bolt :
243+ - false
244+ - true
238245 free-threading :
239246 - false
240247 - true
241248 os :
242249 - ubuntu-24.04
243- - ubuntu-24.04-aarch64
244- is-fork : # only used for the exclusion trick
245- - ${{ github.repository_owner != 'python' }}
250+ - ubuntu-24.04-arm
246251 exclude :
247- - os : ubuntu-24.04-aarch64
248- is-fork : true
252+ # Do not test BOLT with free-threading, to conserve resources
253+ - bolt : true
254+ free-threading : true
255+ # BOLT currently crashes during instrumentation on aarch64
256+ - os : ubuntu-24.04-arm
257+ bolt : true
249258 uses : ./.github/workflows/reusable-ubuntu.yml
250259 with :
251260 config_hash : ${{ needs.check_source.outputs.config_hash }}
261+ bolt-optimizations : ${{ matrix.bolt }}
252262 free-threading : ${{ matrix.free-threading }}
253263 os : ${{ matrix.os }}
254264
@@ -502,26 +512,59 @@ jobs:
502512 run : xvfb-run make ci
503513
504514 build_tsan :
505- name : ' Thread sanitizer'
515+ name : >-
516+ Thread sanitizer
517+ ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
506518 needs : check_source
507519 if : needs.check_source.outputs.run_tests == 'true'
520+ strategy :
521+ matrix :
522+ free-threading :
523+ - false
524+ - true
508525 uses : ./.github/workflows/reusable-tsan.yml
509526 with :
510527 config_hash : ${{ needs.check_source.outputs.config_hash }}
511- options : ./configure --config-cache --with-thread-sanitizer --with-pydebug
512- suppressions_path : Tools/tsan/supressions.txt
513- tsan_logs_artifact_name : tsan-logs-default
528+ free-threading : ${{ matrix.free-threading }}
514529
515- build_tsan_free_threading :
516- name : ' Thread sanitizer (free-threading)'
530+ cross-build-linux :
531+ name : Cross build Linux
532+ runs-on : ubuntu-latest
517533 needs : check_source
518534 if : needs.check_source.outputs.run_tests == 'true'
519- uses : ./.github/workflows/reusable-tsan.yml
520- with :
521- config_hash : ${{ needs.check_source.outputs.config_hash }}
522- options : ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
523- suppressions_path : Tools/tsan/suppressions_free_threading.txt
524- tsan_logs_artifact_name : tsan-logs-free-threading
535+ steps :
536+ - uses : actions/checkout@v4
537+ with :
538+ persist-credentials : false
539+ - name : Runner image version
540+ run : echo "IMAGE_VERSION=${ImageVersion}" >> "$GITHUB_ENV"
541+ - name : Restore config.cache
542+ uses : actions/cache@v4
543+ with :
544+ path : config.cache
545+ key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
546+ - name : Register gcc problem matcher
547+ run : echo "::add-matcher::.github/problem-matchers/gcc.json"
548+ - name : Set build dir
549+ run :
550+ # an absolute path outside of the working directoy
551+ echo "BUILD_DIR=$(realpath ${{ github.workspace }}/../build)" >> "$GITHUB_ENV"
552+ - name : Install Dependencies
553+ run : sudo ./.github/workflows/posix-deps-apt.sh
554+ - name : Configure host build
555+ run : ./configure --prefix="$BUILD_DIR/host-python"
556+ - name : Install host Python
557+ run : make -j8 install
558+ - name : Run test subset with host build
559+ run : |
560+ "$BUILD_DIR/host-python/bin/python3" -m test test_sysconfig test_site test_embed
561+ - name : Configure cross build
562+ run : ./configure --prefix="$BUILD_DIR/cross-python" --with-build-python="$BUILD_DIR/host-python/bin/python3"
563+ - name : Install cross Python
564+ run : make -j8 install
565+ - name : Run test subset with host build
566+ run : |
567+ "$BUILD_DIR/cross-python/bin/python3" -m test test_sysconfig test_site test_embed
525568
526569 # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
527570 cifuzz :
@@ -581,7 +624,6 @@ jobs:
581624 - test_hypothesis
582625 - build_asan
583626 - build_tsan
584- - build_tsan_free_threading
585627 - cifuzz
586628
587629 runs-on : ubuntu-latest
@@ -615,7 +657,6 @@ jobs:
615657 build_windows,
616658 build_asan,
617659 build_tsan,
618- build_tsan_free_threading,
619660 '
620661 || ''
621662 }}
0 commit comments