@@ -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
@@ -509,26 +512,59 @@ jobs:
509512 run : xvfb-run make ci
510513
511514 build_tsan :
512- name : ' Thread sanitizer'
515+ name : >-
516+ Thread sanitizer
517+ ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
513518 needs : check_source
514519 if : needs.check_source.outputs.run_tests == 'true'
520+ strategy :
521+ matrix :
522+ free-threading :
523+ - false
524+ - true
515525 uses : ./.github/workflows/reusable-tsan.yml
516526 with :
517527 config_hash : ${{ needs.check_source.outputs.config_hash }}
518- options : ./configure --config-cache --with-thread-sanitizer --with-pydebug
519- suppressions_path : Tools/tsan/supressions.txt
520- tsan_logs_artifact_name : tsan-logs-default
528+ free-threading : ${{ matrix.free-threading }}
521529
522- build_tsan_free_threading :
523- name : ' Thread sanitizer (free-threading)'
530+ cross-build-linux :
531+ name : Cross build Linux
532+ runs-on : ubuntu-latest
524533 needs : check_source
525534 if : needs.check_source.outputs.run_tests == 'true'
526- uses : ./.github/workflows/reusable-tsan.yml
527- with :
528- config_hash : ${{ needs.check_source.outputs.config_hash }}
529- options : ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
530- suppressions_path : Tools/tsan/suppressions_free_threading.txt
531- 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
532568
533569 # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
534570 cifuzz :
@@ -588,7 +624,6 @@ jobs:
588624 - test_hypothesis
589625 - build_asan
590626 - build_tsan
591- - build_tsan_free_threading
592627 - cifuzz
593628
594629 runs-on : ubuntu-latest
@@ -622,7 +657,6 @@ jobs:
622657 build_windows,
623658 build_asan,
624659 build_tsan,
625- build_tsan_free_threading,
626660 '
627661 || ''
628662 }}
0 commit comments