3939 with :
4040 components : rust-src
4141 - run : git config user.name "github-runner" && git config user.email "<>"
42- - run : git rebase --exec 'cargo doc --no-deps' --root
42+ - run : git rebase --exec 'cargo doc --all-features -- no-deps' --root
4343 clippy :
4444 runs-on : ubuntu-latest
4545 steps :
5252 components : clippy
5353 - run : cargo install cargo-hack
5454 - run : git config user.name "github-runner" && git config user.email "<>"
55- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --locked' --exec 'cargo clean' --root
55+ # examples and tests require `alloc`, since they make extensive use of `Box` etc.
56+ - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --all-targets --locked --features alloc' --exec 'cargo clean' --root
57+ # the core lib does not, so also check that without the alloc feature.
58+ - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --lib --locked' --exec 'cargo clean' --root
5659 test :
5760 runs-on : ubuntu-latest
5861 steps :
@@ -62,10 +65,15 @@ jobs:
6265 components : rust-src
6366 - run : cargo install cargo-expand
6467 - run : git config user.name "github-runner" && git config user.email "<>"
65- - run : git rebase --exec 'cargo test --locked' --root
68+ - run : git rebase --exec 'cargo test --locked --all-targets' --root
69+ # doctests are strangely not included in --all-targets
70+ - run : git rebase --exec 'cargo test --locked --doc' --root
6671 miri :
6772 runs-on : ubuntu-latest
68- name : " miri"
73+ name : " miri (${{matrix.MIRIFLAGS}})"
74+ strategy :
75+ matrix :
76+ MIRIFLAGS : ["", "-Zmiri-tree-borrows", "-Zmiri-strict-provenance", "-Zmiri-tree-borrows -Zmiri-strict-provenance"]
6977 steps :
7078 - uses : actions/checkout@v4
7179 with :
@@ -80,18 +88,18 @@ jobs:
8088 components : miri, rust-src
8189 - run : cargo install cargo-expand
8290 - run : git config user.name "github-runner" && git config user.email "<>"
83- - run : git rebase --exec 'cargo miri test --locked' --root
84- - run : git rebase --exec 'cargo miri test --locked' --root
85- env :
86- MIRIFLAGS : " -Zmiri-tree-borrows"
87- - run : git rebase --exec 'cargo miri test --locked' --root
91+ - run : git rebase --exec 'cargo miri test --locked --all-targets' --root
8892 env :
89- MIRIFLAGS : " -Zmiri-strict-provenance"
90- - run : git rebase --exec 'cargo miri test --locked' --root
93+ MIRIFLAGS : ${{matrix.MIRIFLAGS}}
94+ # doctests are strangely not included in --all-targets
95+ - run : git rebase --exec 'cargo miri test --locked --doc' --root
9196 env :
92- MIRIFLAGS : " -Zmiri-tree-borrows -Zmiri-strict-provenance "
97+ MIRIFLAGS : ${{matrix.MIRIFLAGS}}
9398 sanitizers :
9499 runs-on : ubuntu-latest
100+ strategy :
101+ matrix :
102+ targets : ["--doc", "--all-targets"]
95103 steps :
96104 - uses : actions/checkout@v4
97105 with :
@@ -109,7 +117,17 @@ jobs:
109117 env :
110118 ASAN_OPTIONS : " detect_odr_violation=0:detect_leaks=0"
111119 RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address"
112- - run : git rebase --exec 'cargo test --target x86_64-unknown-linux-gnu' --root
120+ # sed because of https://github.com/japaric/rust-san#unrealiable-leaksanitizer
121+ # doctests are strangely not included in --all-targets
122+ - 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
123+ env :
124+ ASAN_OPTIONS : " detect_odr_violation=0:detect_leaks=0"
125+ RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address"
126+ - run : git rebase --exec 'cargo test --all-targets --target x86_64-unknown-linux-gnu' --root
127+ env :
128+ RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak"
129+ # doctests are strangely not included in --all-targets
130+ - run : git rebase --exec 'cargo test --doc --target x86_64-unknown-linux-gnu' --root
113131 env :
114132 RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak"
115133 msrv :
@@ -122,7 +140,7 @@ jobs:
122140 - uses : dtolnay/rust-toolchain@stable
123141 - run : cargo install cargo-hack
124142 - run : git config user.name "github-runner" && git config user.email "<>"
125- - 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
143+ - 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
126144 nightly-msrv :
127145 runs-on : ubuntu-latest
128146 steps :
@@ -136,7 +154,7 @@ jobs:
136154 - run : cargo install cargo-hack
137155 - run : cargo install cargo-expand
138156 - run : git config user.name "github-runner" && git config user.email "<>"
139- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset --version-range 1.78.. --clean-per-version check --locked' --exec 'cargo clean' --root
157+ - 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
140158 env :
141159 RUSTC_BOOTSTRAP : 1
142160 os-check :
@@ -156,7 +174,9 @@ jobs:
156174 components : rust-src
157175 - run : cargo install cargo-expand
158176 - run : git config user.name "github-runner" && git config user.email "<>"
159- - run : git rebase --exec 'cargo test --locked' --root
177+ - run : git rebase --exec 'cargo test --all-targets --locked' --root
178+ # doctests are strangely not included in --all-targets
179+ - run : git rebase --exec 'cargo test --doc --locked' --root
160180 signed-off-by :
161181 runs-on : ubuntu-latest
162182 steps :
@@ -207,4 +227,4 @@ jobs:
207227 components : rust-src
208228 - run : sudo apt-get install -y linkchecker
209229 - run : git config user.name "github-runner" && git config user.email "<>"
210- - run : git rebase --exec 'cargo doc --no-deps && linkchecker target/doc/*/*.html' --root
230+ - run : git rebase --exec 'cargo doc --all-features -- no-deps && linkchecker target/doc/*/*.html' --root
0 commit comments