From f06b05123406a0acef420677f031a6df25af3d9f Mon Sep 17 00:00:00 2001 From: Michal 'vorner' Vaner Date: Sun, 19 Dec 2021 16:26:43 +0100 Subject: [PATCH 1/2] Disable benchmarks on pull requests There's some problem with permissions, needs to be investigated.. but disabling until then. --- .github/workflows/benchmarks.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/benchmarks.yaml b/.github/workflows/benchmarks.yaml index 9aa3f74..bff4402 100644 --- a/.github/workflows/benchmarks.yaml +++ b/.github/workflows/benchmarks.yaml @@ -1,5 +1,6 @@ on: - pull_request: + # For some reason, this fails due to some permissions. + # pull_request: push: branches: - master From d82b9e14a51a047e4283447713ab83541a0eeaa4 Mon Sep 17 00:00:00 2001 From: Jiahao XU Date: Mon, 20 Dec 2021 21:36:06 +1100 Subject: [PATCH 2/2] Add thread sanitizer to test (#72) --- .github/workflows/test.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ed7d068..ec020ac 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -213,3 +213,36 @@ jobs: PROPTEST_CASES: "10" MIRIFLAGS: "-Zmiri-disable-isolation" run: cargo miri test --all-features + + thread_sanitizer-MacOS: + name: Thread Sanitizer checks MacOS + runs-on: macos-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/cache@v2 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ github.event.repository.name }}-${{ runner.os }}-cargo-thread_sanitizer-v2 + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rust-src + - name: Run thread sanitizer + run: | + # Thread sanitizer isn't guaranteed to catch all data races, it can only catch it + # the data race if it happens when running the program. + # + # Running the tests multiple times increase the chances that data races are found + # by the thread sanitizer. + for _ in $(seq 1 10); do cargo +nightly test -Z build-std --target --target $(uname -m)-apple-darwin; done + env: + RUSTDOCFLAGS: "-Zsanitizer=thread" + RUSTFLAGS: "-Zsanitizer=thread"