diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae79de21b..edbb6280a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,6 +175,18 @@ jobs: - name: miri run: ci/miri.sh + # Run cargo-careful. + careful: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install Rust + run: rustup toolchain install nightly --component rust-src && rustup default nightly + - name: Install cargo-careful + run: cargo install cargo-careful --locked --debug + - name: Run cargo-careful + run: ./ci/careful.sh + # Run sanitizers. san: runs-on: ubuntu-latest @@ -233,6 +245,7 @@ jobs: - rustfmt # - clippy - miri + - careful - san - loom - docs diff --git a/ci/careful.sh b/ci/careful.sh new file mode 100755 index 000000000..dffe2e734 --- /dev/null +++ b/ci/careful.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euxo pipefail +IFS=$'\n\t' +cd "$(dirname "$0")"/.. + +export RUSTFLAGS="${RUSTFLAGS:-} -Z randomize-layout" + +cargo careful test --all --all-features --exclude benchmarks -- --test-threads=1