39
39
with :
40
40
components : rust-src
41
41
- 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
43
43
clippy :
44
44
runs-on : ubuntu-latest
45
45
steps :
52
52
components : clippy
53
53
- run : cargo install cargo-hack
54
54
- 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
56
59
test :
57
60
runs-on : ubuntu-latest
58
61
steps :
@@ -62,10 +65,15 @@ jobs:
62
65
components : rust-src
63
66
- run : cargo install cargo-expand
64
67
- 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
66
71
miri :
67
72
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"]
69
77
steps :
70
78
- uses : actions/checkout@v4
71
79
with :
@@ -80,18 +88,18 @@ jobs:
80
88
components : miri, rust-src
81
89
- run : cargo install cargo-expand
82
90
- 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
88
92
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
91
96
env :
92
- MIRIFLAGS : " -Zmiri-tree-borrows -Zmiri-strict-provenance "
97
+ MIRIFLAGS : ${{matrix.MIRIFLAGS}}
93
98
sanitizers :
94
99
runs-on : ubuntu-latest
100
+ strategy :
101
+ matrix :
102
+ targets : ["--doc", "--all-targets"]
95
103
steps :
96
104
- uses : actions/checkout@v4
97
105
with :
@@ -109,7 +117,17 @@ jobs:
109
117
env :
110
118
ASAN_OPTIONS : " detect_odr_violation=0:detect_leaks=0"
111
119
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
113
131
env :
114
132
RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak"
115
133
msrv :
@@ -122,7 +140,7 @@ jobs:
122
140
- uses : dtolnay/rust-toolchain@stable
123
141
- run : cargo install cargo-hack
124
142
- 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
126
144
nightly-msrv :
127
145
runs-on : ubuntu-latest
128
146
steps :
@@ -136,7 +154,7 @@ jobs:
136
154
- run : cargo install cargo-hack
137
155
- run : cargo install cargo-expand
138
156
- 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
140
158
env :
141
159
RUSTC_BOOTSTRAP : 1
142
160
os-check :
@@ -156,7 +174,9 @@ jobs:
156
174
components : rust-src
157
175
- run : cargo install cargo-expand
158
176
- 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
160
180
signed-off-by :
161
181
runs-on : ubuntu-latest
162
182
steps :
@@ -207,4 +227,4 @@ jobs:
207
227
components : rust-src
208
228
- run : sudo apt-get install -y linkchecker
209
229
- 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