@@ -512,26 +512,59 @@ jobs:
512512 run : xvfb-run make ci
513513
514514 build_tsan :
515- name : ' Thread sanitizer'
515+ name : >-
516+ Thread sanitizer
517+ ${{ fromJSON(matrix.free-threading) && '(free-threading)' || '' }}
516518 needs : check_source
517519 if : needs.check_source.outputs.run_tests == 'true'
520+ strategy :
521+ matrix :
522+ free-threading :
523+ - false
524+ - true
518525 uses : ./.github/workflows/reusable-tsan.yml
519526 with :
520527 config_hash : ${{ needs.check_source.outputs.config_hash }}
521- options : ./configure --config-cache --with-thread-sanitizer --with-pydebug
522- suppressions_path : Tools/tsan/supressions.txt
523- tsan_logs_artifact_name : tsan-logs-default
528+ free-threading : ${{ matrix.free-threading }}
524529
525- build_tsan_free_threading :
526- name : ' Thread sanitizer (free-threading)'
530+ cross-build-linux :
531+ name : Cross build Linux
532+ runs-on : ubuntu-latest
527533 needs : check_source
528534 if : needs.check_source.outputs.run_tests == 'true'
529- uses : ./.github/workflows/reusable-tsan.yml
530- with :
531- config_hash : ${{ needs.check_source.outputs.config_hash }}
532- options : ./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
533- suppressions_path : Tools/tsan/suppressions_free_threading.txt
534- 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
535568
536569 # CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
537570 cifuzz :
@@ -591,7 +624,6 @@ jobs:
591624 - test_hypothesis
592625 - build_asan
593626 - build_tsan
594- - build_tsan_free_threading
595627 - cifuzz
596628
597629 runs-on : ubuntu-latest
@@ -625,7 +657,6 @@ jobs:
625657 build_windows,
626658 build_asan,
627659 build_tsan,
628- build_tsan_free_threading,
629660 '
630661 || ''
631662 }}
0 commit comments