@@ -472,6 +472,64 @@ jobs:
472
472
- name : Tests
473
473
run : xvfb-run make test
474
474
475
+ build_tsan_free_threading :
476
+ name : ' Thread sanitizer (free-threading)'
477
+ runs-on : ubuntu-20.04
478
+ timeout-minutes : 60
479
+ needs : check_source
480
+ if : needs.check_source.outputs.run_tests == 'true'
481
+ env :
482
+ OPENSSL_VER : 3.0.13
483
+ PYTHONSTRICTEXTENSIONBUILD : 1
484
+ ASAN_OPTIONS : detect_leaks=0:allocator_may_return_null=1:handle_segv=0
485
+ steps :
486
+ - uses : actions/checkout@v4
487
+ - name : Runner image version
488
+ run : echo "IMAGE_VERSION=${ImageVersion}" >> $GITHUB_ENV
489
+ - name : Restore config.cache
490
+ uses : actions/cache@v4
491
+ with :
492
+ path : config.cache
493
+ key : ${{ github.job }}-${{ runner.os }}-${{ env.IMAGE_VERSION }}-${{ needs.check_source.outputs.config_hash }}
494
+ - name : Register gcc problem matcher
495
+ run : echo "::add-matcher::.github/problem-matchers/gcc.json"
496
+ - name : Install Dependencies
497
+ run : sudo ./.github/workflows/posix-deps-apt.sh
498
+ - name : Set up GCC-10 for TSAN
499
+ uses : egor-tensin/setup-gcc@v1
500
+ with :
501
+ version : 10
502
+ - name : Configure OpenSSL env vars
503
+ run : |
504
+ echo "MULTISSL_DIR=${GITHUB_WORKSPACE}/multissl" >> $GITHUB_ENV
505
+ echo "OPENSSL_DIR=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}" >> $GITHUB_ENV
506
+ echo "LD_LIBRARY_PATH=${GITHUB_WORKSPACE}/multissl/openssl/${OPENSSL_VER}/lib" >> $GITHUB_ENV
507
+ - name : ' Restore OpenSSL build'
508
+ id : cache-openssl
509
+ uses : actions/cache@v4
510
+ with :
511
+ path : ./multissl/openssl/${{ env.OPENSSL_VER }}
512
+ key : ${{ runner.os }}-multissl-openssl-${{ env.OPENSSL_VER }}
513
+ - name : Install OpenSSL
514
+ if : steps.cache-openssl.outputs.cache-hit != 'true'
515
+ run : python3 Tools/ssl/multissltests.py --steps=library --base-directory $MULTISSL_DIR --openssl $OPENSSL_VER --system Linux
516
+ - name : Add ccache to PATH
517
+ run : |
518
+ echo "PATH=/usr/lib/ccache:$PATH" >> $GITHUB_ENV
519
+ - name : Configure ccache action
520
+ uses :
hendrikmuhs/[email protected]
521
+ with :
522
+ save : ${{ github.event_name == 'push' }}
523
+ max-size : " 200M"
524
+ - name : Configure CPython
525
+ run : ./configure --config-cache --with-thread-sanitizer --disable-gil
526
+ - name : Build CPython
527
+ run : make -j4
528
+ - name : Display build info
529
+ run : make pythoninfo
530
+ - name : Tests
531
+ run : xvfb-run make test
532
+
475
533
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
476
534
cifuzz :
477
535
name : CIFuzz
0 commit comments