1515 with :
1616 components : rustfmt
1717 - run : git config user.name "github-runner" && git config user.email "<>"
18- - run : git rebase --exec 'cargo fmt --check' --root
19- - run : git rebase --exec 'cd internal && cargo fmt --check' --root
18+ - run : git rebase --exec 'cargo fmt --check --all' --root
2019 readme :
2120 runs-on : ubuntu-latest
2221 steps :
4039 with :
4140 components : rust-src
4241 - run : git config user.name "github-runner" && git config user.email "<>"
43- - run : git rebase --exec 'cargo doc --no-deps' --root
42+ - run : git rebase --exec 'cargo doc --all-features --no-deps' --root
43+ env :
44+ RUSTFLAGS : " -Dwarnings"
4445 clippy :
4546 runs-on : ubuntu-latest
4647 steps :
5354 components : clippy
5455 - run : cargo install cargo-hack
5556 - run : git config user.name "github-runner" && git config user.email "<>"
56- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --locked' --exec 'cargo clean' --root
57+ # examples and tests require `alloc`, since they make extensive use of `Box` etc.
58+ - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --all-targets --locked --features alloc' --exec 'cargo clean' --root
59+ env :
60+ RUSTFLAGS : " -Dwarnings"
61+ # the core lib does not, so also check that without the alloc feature.
62+ - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --lib --locked' --exec 'cargo clean' --root
63+ env :
64+ RUSTFLAGS : " -Dwarnings"
5765 test :
5866 runs-on : ubuntu-latest
5967 steps :
@@ -63,10 +71,19 @@ jobs:
6371 components : rust-src
6472 - run : cargo install cargo-expand
6573 - run : git config user.name "github-runner" && git config user.email "<>"
66- - run : git rebase --exec 'cargo test --locked' --root
74+ - run : git rebase --exec 'cargo test --locked --all-targets' --root
75+ env :
76+ RUSTFLAGS : " -Dwarnings"
77+ # doctests are strangely not included in --all-targets
78+ - run : git rebase --exec 'cargo test --locked --doc' --root
79+ env :
80+ RUSTFLAGS : " -Dwarnings"
6781 miri :
6882 runs-on : ubuntu-latest
69- name : " miri"
83+ name : " miri (${{matrix.MIRIFLAGS}})"
84+ strategy :
85+ matrix :
86+ MIRIFLAGS : ["", "-Zmiri-tree-borrows", "-Zmiri-strict-provenance", "-Zmiri-tree-borrows -Zmiri-strict-provenance"]
7087 steps :
7188 - uses : actions/checkout@v4
7289 with :
@@ -81,18 +98,20 @@ jobs:
8198 components : miri, rust-src
8299 - run : cargo install cargo-expand
83100 - run : git config user.name "github-runner" && git config user.email "<>"
84- - run : git rebase --exec 'cargo miri test --locked' --root
85- - run : git rebase --exec 'cargo miri test --locked' --root
101+ - run : git rebase --exec 'cargo miri test --locked --all-targets' --root
86102 env :
87- MIRIFLAGS : " -Zmiri-tree-borrows"
88- - run : git rebase --exec 'cargo miri test --locked' --root
103+ RUSTFLAGS : " -Dwarnings"
104+ MIRIFLAGS : ${{matrix.MIRIFLAGS}}
105+ # doctests are strangely not included in --all-targets
106+ - run : git rebase --exec 'cargo miri test --locked --doc' --root
89107 env :
90- MIRIFLAGS : " -Zmiri-strict-provenance"
91- - run : git rebase --exec 'cargo miri test --locked' --root
92- env :
93- MIRIFLAGS : " -Zmiri-tree-borrows -Zmiri-strict-provenance"
108+ RUSTFLAGS : " -Dwarnings"
109+ MIRIFLAGS : ${{matrix.MIRIFLAGS}}
94110 sanitizers :
95111 runs-on : ubuntu-latest
112+ strategy :
113+ matrix :
114+ targets : ["--doc", "--all-targets"]
96115 steps :
97116 - uses : actions/checkout@v4
98117 with :
@@ -109,10 +128,20 @@ jobs:
109128 - run : git rebase --exec "sed -i '/\[features\]/i [profile.dev]' Cargo.toml && sed -i '/profile.dev/a opt-level = 1' Cargo.toml && cargo test --lib --tests --target x86_64-unknown-linux-gnu && git restore Cargo.toml" --root
110129 env :
111130 ASAN_OPTIONS : " detect_odr_violation=0:detect_leaks=0"
112- RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address"
113- - run : git rebase --exec 'cargo test --target x86_64-unknown-linux-gnu' --root
131+ RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address -Dwarnings"
132+ # sed because of https://github.com/japaric/rust-san#unrealiable-leaksanitizer
133+ # doctests are strangely not included in --all-targets
134+ - run : git rebase --exec "sed -i '/\[features\]/i [profile.dev]' Cargo.toml && sed -i '/profile.dev/a opt-level = 1' Cargo.toml && cargo test --doc --target x86_64-unknown-linux-gnu && git restore Cargo.toml" --root
135+ env :
136+ ASAN_OPTIONS : " detect_odr_violation=0:detect_leaks=0"
137+ RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address -Dwarnings"
138+ - run : git rebase --exec 'cargo test --all-targets --target x86_64-unknown-linux-gnu' --root
139+ env :
140+ RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak -Dwarnings"
141+ # doctests are strangely not included in --all-targets
142+ - run : git rebase --exec 'cargo test --doc --target x86_64-unknown-linux-gnu' --root
114143 env :
115- RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak"
144+ RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak -Dwarnings "
116145 msrv :
117146 runs-on : ubuntu-latest
118147 steps :
@@ -123,7 +152,9 @@ jobs:
123152 - uses : dtolnay/rust-toolchain@stable
124153 - run : cargo install cargo-hack
125154 - run : git config user.name "github-runner" && git config user.email "<>"
126- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset --exclude-features alloc --exclude-features default --version-range 1.82.. --clean-per-version check --locked' --exec 'cargo clean' --root
155+ - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset --exclude-features alloc --exclude-features default --version-range 1.82.. --clean-per-version check --locked --all-targets' --exec 'cargo clean' --root
156+ env :
157+ RUSTFLAGS : " -Dwarnings"
127158 nightly-msrv :
128159 runs-on : ubuntu-latest
129160 steps :
@@ -137,9 +168,10 @@ jobs:
137168 - run : cargo install cargo-hack
138169 - run : cargo install cargo-expand
139170 - run : git config user.name "github-runner" && git config user.email "<>"
140- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset --version-range 1.78.. --clean-per-version check --locked' --exec 'cargo clean' --root
171+ - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset --version-range 1.78.. --clean-per-version check --locked --all-targets ' --exec 'cargo clean' --root
141172 env :
142173 RUSTC_BOOTSTRAP : 1
174+ RUSTFLAGS : " -Dwarnings"
143175 os-check :
144176 strategy :
145177 fail-fast : false
@@ -157,7 +189,13 @@ jobs:
157189 components : rust-src
158190 - run : cargo install cargo-expand
159191 - run : git config user.name "github-runner" && git config user.email "<>"
160- - run : git rebase --exec 'cargo test --locked' --root
192+ - run : git rebase --exec 'cargo test --all-targets --locked' --root
193+ env :
194+ RUSTFLAGS : " -Dwarnings"
195+ # doctests are strangely not included in --all-targets
196+ - run : git rebase --exec 'cargo test --doc --locked' --root
197+ env :
198+ RUSTFLAGS : " -Dwarnings"
161199 signed-off-by :
162200 runs-on : ubuntu-latest
163201 steps :
@@ -208,4 +246,6 @@ jobs:
208246 components : rust-src
209247 - run : sudo apt-get install -y linkchecker
210248 - run : git config user.name "github-runner" && git config user.email "<>"
211- - run : git rebase --exec 'cargo doc --no-deps && linkchecker target/doc/*/*.html' --root
249+ - run : git rebase --exec 'cargo doc --all-features --no-deps && linkchecker target/doc/*/*.html' --root
250+ env :
251+ RUSTFLAGS : " -Dwarnings"
0 commit comments