38
38
uses : taiki-e/workflows/.github/workflows/tidy-rust.yml@main
39
39
40
40
test :
41
+ env :
42
+ CARGO_CAREFUL_VERSION : 0.3.0
41
43
strategy :
42
44
fail-fast : false
43
45
matrix :
@@ -57,10 +59,31 @@ jobs:
57
59
- run : rustup target add thumbv6m-none-eabi
58
60
- uses : taiki-e/install-action@cargo-hack
59
61
- 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'
60
78
- run : cargo test --workspace --all-features --tests --no-run
61
79
if : matrix.rust != 'nightly'
62
80
- run : cargo test --workspace --all-features
63
81
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'
64
87
- run : cargo build --manifest-path tests/no-std/Cargo.toml --target thumbv6m-none-eabi
65
88
- run : cargo minimal-versions build --workspace --all-features --ignore-private
66
89
75
98
- run : cargo miri test --workspace --all-features
76
99
env :
77
100
MIRIFLAGS : -Zmiri-strict-provenance -Zmiri-symbolic-alignment-check -Zmiri-retag-fields
101
+ RUSTDOCFLAGS : ${{ env.RUSTDOCFLAGS }} -Z randomize-layout
78
102
RUSTFLAGS : ${{ env.RUSTFLAGS }} -Z randomize-layout
79
103
80
104
# ALL THE PREVIOUS JOBS NEEDS TO BE ADDED TO THE `needs` SECTION OF THIS JOB!
0 commit comments