Skip to content

Commit f4d5b35

Browse files
committed
Trying to add tsan.
1 parent 9983149 commit f4d5b35

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

.github/workflows/linux-tsan.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Linux CI tsan
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
jobs:
10+
tsan:
11+
runs-on: ubuntu-latest
12+
container:
13+
image: ghcr.io/grumpycoders/pcsx-redux-build:latest
14+
env:
15+
TEST_RESULTS: /tmp/test-results
16+
BUILD: tsan
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
submodules: recursive
21+
set-safe-directory: true
22+
- uses: n1hility/cancel-previous-runs@v2
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}
25+
- run: |
26+
make -j 2 all pcsx-redux-tests
27+
make -C src/mips/openbios -j 2 BUILD=Release
28+
cp src/mips/openbios/openbios.bin .
29+
make -C src/mips/openbios clean
30+
make -C src/mips/tests -j 2 PCSX_TESTS=true BUILD=Release
31+
cp ./openbios.bin src/mips/openbios/
32+
- name: Test
33+
run: |
34+
xvfb-run ./pcsx-redux-tests

Makefile

+2
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ else
5757
CPPFLAGS_Coverage += -fprofile-arcs -ftest-coverage
5858
endif
5959
CPPFLAGS_asan += -O1 -fsanitize=address -fno-omit-frame-pointer
60+
CPPFLAGS_tsan += -O3 -fsanitize=thread -fno-omit-frame-pointer
6061
CPPFLAGS_ubsan += -O1 -fsanitize=undefined -fno-omit-frame-pointer
6162
CPPFLAGS_ReleaseWithTracy += -O3 -DTRACY_ENABLE
6263

@@ -92,6 +93,7 @@ else
9293
LDFLAGS_Coverage += -fprofile-arcs -ftest-coverage
9394
endif
9495
LDFLAGS_asan += -fsanitize=address
96+
LDFLAGS_tsan += -fsanitize=thread
9597
LDFLAGS_ubsan += -fsanitize=undefined
9698

9799
CPPFLAGS += $(CPPFLAGS_$(BUILD)) -pthread

0 commit comments

Comments
 (0)