Skip to content

Commit 8f789df

Browse files
committed
Apply TSAN to the default build too
1 parent 34cd372 commit 8f789df

File tree

1 file changed

+24
-5
lines changed

1 file changed

+24
-5
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,27 @@ jobs:
484484
- name: Tests
485485
run: xvfb-run make test
486486

487+
build_tsan:
488+
name: 'Thread sanitizer'
489+
runs-on: ubuntu-20.04
490+
timeout-minutes: 60
491+
needs: check_source
492+
if: needs.check_source.outputs.run_tests == 'true'
493+
steps:
494+
- uses: actions/checkout@v4
495+
- name: Install Dependencies
496+
run: sudo ./.github/workflows/posix-deps-apt.sh
497+
- name: TSAN Option Setup
498+
run: echo "TSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/Tools/tsan/supressions.txt" >> $GITHUB_ENV
499+
- name: Configure CPython
500+
run: ./configure --with-thread-sanitizer --without-pymalloc
501+
- name: Build CPython
502+
run: make -j4
503+
- name: Display build info
504+
run: make pythoninfo
505+
- name: Tests
506+
run: ./python -m test --tsan -j4
507+
487508
build_tsan_free_threading:
488509
name: 'Thread sanitizer (free-threading)'
489510
runs-on: ubuntu-20.04
@@ -494,14 +515,10 @@ jobs:
494515
- uses: actions/checkout@v4
495516
- name: Install Dependencies
496517
run: sudo ./.github/workflows/posix-deps-apt.sh
497-
- name: Set up GCC-10 for TSAN
498-
uses: egor-tensin/setup-gcc@v1
499-
with:
500-
version: 10
501518
- name: TSAN Option Setup
502519
run: echo "TSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/Tools/tsan/supressions.txt" >> $GITHUB_ENV
503520
- name: Configure CPython
504-
run: ./configure --disable-gil --with-thread-sanitizer --disable-ipv6
521+
run: ./configure --disable-gil --with-thread-sanitizer
505522
- name: Build CPython
506523
run: make -j4
507524
- name: Display build info
@@ -567,6 +584,7 @@ jobs:
567584
- build_windows_free_threading
568585
- test_hypothesis
569586
- build_asan
587+
- build_tsan
570588
- build_tsan_free_threading
571589
- cifuzz
572590

@@ -601,6 +619,7 @@ jobs:
601619
build_windows,
602620
build_windows_free_threading,
603621
build_asan,
622+
build_tsan,
604623
build_tsan_free_threading,
605624
'
606625
|| ''

0 commit comments

Comments
 (0)