Skip to content

Commit f6bd716

Browse files
committed
1 parent 67cb945 commit f6bd716

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ jobs:
3838
uses: taiki-e/workflows/.github/workflows/tidy-rust.yml@main
3939

4040
test:
41+
env:
42+
CARGO_CAREFUL_VERSION: 0.3.0
4143
strategy:
4244
fail-fast: false
4345
matrix:
@@ -57,10 +59,31 @@ jobs:
5759
- run: rustup target add thumbv6m-none-eabi
5860
- uses: taiki-e/install-action@cargo-hack
5961
- uses: taiki-e/install-action@cargo-minimal-versions
62+
- name: Pre Cache cargo-careful
63+
run: |
64+
mkdir -p .github/caching
65+
echo "${CARGO_CAREFUL_VERSION}" > .github/caching/cargo-careful.lock
66+
echo "${{ runner.tool_cache }}/cargo-careful/bin" >> "${GITHUB_PATH}"
67+
if: matrix.rust == 'nightly'
68+
- name: Cache cargo-careful
69+
id: cache-cargo-careful
70+
uses: actions/cache@v3
71+
with:
72+
path: ${{ runner.tool_cache }}/cargo-careful/bin
73+
key: cargo-careful-bin-${{ hashFiles('.github/caching/cargo-careful.lock') }}
74+
if: matrix.rust == 'nightly'
75+
- name: Install cargo-careful
76+
run: cargo install -f cargo-careful --root "${{ runner.tool_cache }}/cargo-careful" --locked --version "${CARGO_CAREFUL_VERSION}"
77+
if: matrix.rust == 'nightly' && steps.cache-cargo-careful.outputs.cache-hit != 'true'
6078
- run: cargo test --workspace --all-features --tests --no-run
6179
if: matrix.rust != 'nightly'
6280
- run: cargo test --workspace --all-features
6381
if: matrix.rust == 'nightly'
82+
- run: cargo careful test --workspace --all-features
83+
env:
84+
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -Z randomize-layout
85+
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout
86+
if: matrix.rust == 'nightly'
6487
- run: cargo build --manifest-path tests/no-std/Cargo.toml --target thumbv6m-none-eabi
6588
- run: cargo minimal-versions build --workspace --all-features --ignore-private
6689

@@ -75,6 +98,7 @@ jobs:
7598
- run: cargo miri test --workspace --all-features
7699
env:
77100
MIRIFLAGS: -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-retag-fields
101+
RUSTDOCFLAGS: ${{ env.RUSTDOCFLAGS }} -Z randomize-layout
78102
RUSTFLAGS: ${{ env.RUSTFLAGS }} -Z randomize-layout
79103

80104
# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!

0 commit comments

Comments
 (0)