From 82eb2ad252c9bf810084df8e02e23f05d1ad4726 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 27 Dec 2022 21:33:50 +0900 Subject: [PATCH] Run cargo-careful in CI https://github.com/RalfJung/cargo-careful --- .github/workflows/ci.yml | 11 +++++++++++ ci/careful.sh | 8 ++++++++ 2 files changed, 19 insertions(+) create mode 100755 ci/careful.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e90c48596..856ed4df7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -167,6 +167,17 @@ jobs: - name: miri run: ./ci/miri.sh + 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 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