15
15
with :
16
16
components : rustfmt
17
17
- 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
20
19
readme :
21
20
runs-on : ubuntu-latest
22
21
steps :
40
39
with :
41
40
components : rust-src
42
41
- 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"
44
45
clippy :
45
46
runs-on : ubuntu-latest
46
47
steps :
53
54
components : clippy
54
55
- run : cargo install cargo-hack
55
56
- 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"
57
65
test :
58
66
runs-on : ubuntu-latest
59
67
steps :
@@ -63,10 +71,19 @@ jobs:
63
71
components : rust-src
64
72
- run : cargo install cargo-expand
65
73
- 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"
67
81
miri :
68
82
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"]
70
87
steps :
71
88
- uses : actions/checkout@v4
72
89
with :
@@ -81,18 +98,20 @@ jobs:
81
98
components : miri, rust-src
82
99
- run : cargo install cargo-expand
83
100
- 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
86
102
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
89
107
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}}
94
110
sanitizers :
95
111
runs-on : ubuntu-latest
112
+ strategy :
113
+ matrix :
114
+ targets : ["--doc", "--all-targets"]
96
115
steps :
97
116
- uses : actions/checkout@v4
98
117
with :
@@ -109,10 +128,20 @@ jobs:
109
128
- 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
110
129
env :
111
130
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
114
143
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 "
116
145
msrv :
117
146
runs-on : ubuntu-latest
118
147
steps :
@@ -123,7 +152,9 @@ jobs:
123
152
- uses : dtolnay/rust-toolchain@stable
124
153
- run : cargo install cargo-hack
125
154
- 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"
127
158
nightly-msrv :
128
159
runs-on : ubuntu-latest
129
160
steps :
@@ -137,9 +168,10 @@ jobs:
137
168
- run : cargo install cargo-hack
138
169
- run : cargo install cargo-expand
139
170
- 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
141
172
env :
142
173
RUSTC_BOOTSTRAP : 1
174
+ RUSTFLAGS : " -Dwarnings"
143
175
os-check :
144
176
strategy :
145
177
fail-fast : false
@@ -157,7 +189,13 @@ jobs:
157
189
components : rust-src
158
190
- run : cargo install cargo-expand
159
191
- 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"
161
199
signed-off-by :
162
200
runs-on : ubuntu-latest
163
201
steps :
@@ -208,4 +246,6 @@ jobs:
208
246
components : rust-src
209
247
- run : sudo apt-get install -y linkchecker
210
248
- 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