@@ -61,14 +61,35 @@ jobs:
61
61
- run : cargo install cargo-hack
62
62
- run : git config user.name "github-runner" && git config user.email "<>"
63
63
# examples and tests require `alloc`, since they make extensive use of `Box` etc.
64
- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --all-targets --locked --features alloc' --exec 'cargo clean' --root
64
+ - run : |
65
+ echo '#!/bin/bash
66
+ set -e
67
+ cargo hack \
68
+ --clean-per-run \
69
+ --feature-powerset \
70
+ clippy \
71
+ --all-targets \
72
+ --locked \
73
+ --features alloc
74
+ cargo clean' > exec.sh
75
+ git rebase --exec 'bash exec.sh' --root
65
76
env:
66
77
RUSTFLAGS: "-Dwarnings"
67
78
# the core lib does not, so also check that without the alloc feature.
68
- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset clippy --lib --locked' --exec 'cargo clean' --root
79
+ - run : |
80
+ echo '#!/bin/bash
81
+ set -e
82
+ cargo hack \
83
+ --clean-per-run \
84
+ --feature-powerset \
85
+ clippy \
86
+ --lib \
87
+ --locked
88
+ cargo clean' > exec.sh
89
+ git rebase --exec "bash exec.sh" --root
69
90
env:
70
91
RUSTFLAGS: "-Dwarnings"
71
- test :
92
+ ui-tests :
72
93
runs-on : ubuntu-latest
73
94
steps :
74
95
- uses : actions/checkout@v4
@@ -80,19 +101,88 @@ jobs:
80
101
components : rust-src
81
102
- run : cargo install cargo-expand
82
103
- run : git config user.name "github-runner" && git config user.email "<>"
83
- - run : git rebase --exec 'cargo test --locked --all-targets' --root
104
+ - run : git rebase --exec 'cargo test ui_ --locked --all-targets' --root
105
+ env :
106
+ RUSTFLAGS : >
107
+ -Dwarnings
108
+ --cfg UI_TESTS
109
+ nightly :
110
+ runs-on : ubuntu-latest
111
+ strategy :
112
+ matrix :
113
+ kind :
114
+ - " check --all-targets"
115
+ - " test --all-targets"
116
+ # doctests are strangely not included in --all-targets
117
+ - " --features default test --doc"
118
+ name : " nightly/${{matrix.kind}}"
119
+ steps :
120
+ - uses : actions/checkout@v4
121
+ with :
122
+ fetch-depth : ${{github.event.pull_request.commits}}
123
+ ref : ${{github.event.pull_request.head.sha}}
124
+ - uses : dtolnay/rust-toolchain@nightly
125
+ with :
126
+ components : rust-src
127
+ - run : cargo install cargo-expand
128
+ - run : cargo install cargo-hack
129
+ - run : git config user.name "github-runner" && git config user.email "<>"
130
+ - run : |
131
+ echo '#!/bin/bash
132
+ set -e
133
+ cargo hack \
134
+ --clean-per-run \
135
+ --feature-powerset \
136
+ ${{matrix.kind}} \
137
+ --locked
138
+ cargo clean' > exec.sh
139
+ git rebase --exec "bash exec.sh" --root
84
140
env:
85
141
RUSTFLAGS: "-Dwarnings"
86
- # doctests are strangely not included in --all-targets
87
- - run : git rebase --exec 'cargo test --locked --doc' --root
142
+ beta :
143
+ runs-on : ubuntu-latest
144
+ strategy :
145
+ matrix :
146
+ kind :
147
+ - " check --all-targets"
148
+ - " test --all-targets"
149
+ # doctests are strangely not included in --all-targets
150
+ - " --features default test --doc"
151
+ name : " beta/${{matrix.kind}}"
152
+ steps :
153
+ - uses : actions/checkout@v4
154
+ with :
155
+ fetch-depth : ${{github.event.pull_request.commits}}
156
+ ref : ${{github.event.pull_request.head.sha}}
157
+ - uses : dtolnay/rust-toolchain@beta
158
+ with :
159
+ components : rust-src
160
+ - run : cargo install cargo-expand
161
+ - run : cargo install cargo-hack
162
+ - run : git config user.name "github-runner" && git config user.email "<>"
163
+ - run : |
164
+ echo '#!/bin/bash
165
+ set -e
166
+ cargo hack \
167
+ --clean-per-run \
168
+ --feature-powerset \
169
+ ${{matrix.kind}} \
170
+ --locked
171
+ cargo clean' > exec.sh
172
+ git rebase --exec "bash exec.sh" --root
88
173
env:
89
174
RUSTFLAGS: "-Dwarnings"
175
+ RUSTC_BOOTSTRAP: 1
90
176
miri :
91
177
runs-on : ubuntu-latest
92
178
name : " miri (${{matrix.MIRIFLAGS}})"
93
179
strategy :
94
180
matrix :
95
- MIRIFLAGS : ["", "-Zmiri-tree-borrows", "-Zmiri-strict-provenance", "-Zmiri-tree-borrows -Zmiri-strict-provenance"]
181
+ MIRIFLAGS :
182
+ - " "
183
+ - " -Zmiri-tree-borrows"
184
+ - " -Zmiri-strict-provenance"
185
+ - " -Zmiri-tree-borrows -Zmiri-strict-provenance"
96
186
steps :
97
187
- uses : actions/checkout@v4
98
188
with :
@@ -134,25 +224,61 @@ jobs:
134
224
sudo apt install llvm
135
225
- run : git config user.name "github-runner" && git config user.email "<>"
136
226
# sed because of https://github.com/japaric/rust-san#unrealiable-leaksanitizer
137
- - 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
227
+ - run : |
228
+ echo "#!/bin/bash
229
+ set -e
230
+ sed -i '/\[features\]/i [profile.dev]' Cargo.toml \
231
+ && sed -i '/profile.dev/a opt-level = 1' Cargo.toml \
232
+ && cargo test --lib --tests --target x86_64-unknown-linux-gnu \
233
+ && git restore Cargo.toml" > exec.sh
234
+ git rebase --exec "bash exec.sh" --root
138
235
env:
139
236
ASAN_OPTIONS: "detect_odr_violation=0:detect_leaks=0"
140
- RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address -Dwarnings"
237
+ RUSTFLAGS: >
238
+ --cfg NO_ALLOC_FAIL_TESTS
239
+ -Z sanitizer=address
240
+ -Dwarnings
141
241
# sed because of https://github.com/japaric/rust-san#unrealiable-leaksanitizer
142
242
# doctests are strangely not included in --all-targets
143
- - 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
243
+ - run : |
244
+ echo "#!/bin/bash
245
+ set -e
246
+ sed -i '/\[features\]/i [profile.dev]' Cargo.toml \
247
+ && sed -i '/profile.dev/a opt-level = 1' Cargo.toml \
248
+ && cargo test --doc --target x86_64-unknown-linux-gnu \
249
+ && git restore Cargo.toml" > exec.sh
250
+ git rebase --exec "bash exec.sh" --root
144
251
env:
145
252
ASAN_OPTIONS: "detect_odr_violation=0:detect_leaks=0"
146
- RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=address -Dwarnings"
147
- - run : git rebase --exec 'cargo test --all-targets --target x86_64-unknown-linux-gnu' --root
253
+ RUSTFLAGS: >
254
+ --cfg NO_ALLOC_FAIL_TESTS
255
+ -Z sanitizer=address
256
+ -Dwarnings
257
+ - run : |
258
+ git rebase --exec \
259
+ 'cargo test --all-targets --target x86_64-unknown-linux-gnu' \
260
+ --root
148
261
env:
149
- RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak -Dwarnings"
262
+ RUSTFLAGS: >
263
+ --cfg NO_ALLOC_FAIL_TESTS
264
+ -Z sanitizer=leak
265
+ -Dwarnings
150
266
# doctests are strangely not included in --all-targets
151
- - run : git rebase --exec 'cargo test --doc --target x86_64-unknown-linux-gnu' --root
267
+ - run : |
268
+ git rebase --exec \
269
+ 'cargo test --doc --target x86_64-unknown-linux-gnu' \
270
+ --root
152
271
env:
153
- RUSTFLAGS : " --cfg NO_UI_TESTS --cfg NO_ALLOC_FAIL_TESTS -Z sanitizer=leak -Dwarnings"
272
+ RUSTFLAGS: >
273
+ --cfg NO_ALLOC_FAIL_TESTS
274
+ -Z sanitizer=leak
275
+ -Dwarnings
154
276
msrv :
155
277
runs-on : ubuntu-latest
278
+ strategy :
279
+ matrix :
280
+ kind : ["check", "test"]
281
+ name : " msrv/${{matrix.kind}}"
156
282
steps :
157
283
- uses : actions/checkout@v4
158
284
with :
@@ -161,7 +287,22 @@ jobs:
161
287
- uses : dtolnay/rust-toolchain@stable
162
288
- run : cargo install cargo-hack
163
289
- run : git config user.name "github-runner" && git config user.email "<>"
164
- - run : git rebase --exec 'cargo hack --clean-per-run --feature-powerset --exclude-features unsafe-pinned --exclude-features alloc --exclude-features default --version-range 1.82.. --clean-per-version check --locked --all-targets' --exec 'cargo clean' --root
290
+ - run : |
291
+ echo '#!/bin/bash
292
+ set -e
293
+ cargo hack \
294
+ --clean-per-run \
295
+ --feature-powerset \
296
+ --exclude-features alloc \
297
+ --exclude-features unsafe-pinned \
298
+ --exclude-features default \
299
+ --version-range 1.82.. \
300
+ --clean-per-version \
301
+ ${{matrix.kind}} \
302
+ --locked \
303
+ --all-targets
304
+ cargo clean' > exec.sh
305
+ git rebase --exec "bash exec.sh" --root
165
306
env:
166
307
RUSTFLAGS: "-Dwarnings"
167
308
nightly-msrv :
@@ -177,7 +318,19 @@ jobs:
177
318
- run : cargo install cargo-hack
178
319
- run : cargo install cargo-expand
179
320
- run : git config user.name "github-runner" && git config user.email "<>"
180
- - 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
321
+ - run : |
322
+ echo '#!/bin/bash
323
+ set -e
324
+ cargo hack \
325
+ --clean-per-run \
326
+ --feature-powerset \
327
+ --version-range 1.78.. \
328
+ --clean-per-version \
329
+ check \
330
+ --locked \
331
+ --all-targets
332
+ cargo clean' > exec.sh
333
+ git rebase --exec "bash exec.sh" --root
181
334
env:
182
335
RUSTC_BOOTSTRAP: 1
183
336
RUSTFLAGS: "-Dwarnings"
@@ -206,15 +359,18 @@ jobs:
206
359
env :
207
360
RUSTFLAGS : " -Dwarnings"
208
361
signed-off-by :
209
- if : github.event_name != 'schedule '
362
+ if : github.event_name == 'pull_request '
210
363
runs-on : ubuntu-latest
211
364
steps :
212
365
- uses : actions/checkout@v4
213
366
with :
214
367
fetch-depth : ${{github.event.pull_request.commits}}
215
368
ref : ${{github.event.pull_request.head.sha}}
216
369
- run : git config user.name "github-runner" && git config user.email "<>"
217
- - run : git rebase --exec 'git log --no-merges -1 --pretty=format:%B | grep -q "^Signed-off-by:"' --root
370
+ - run : |
371
+ git rebase --exec \
372
+ 'git log --no-merges -1 --pretty=format:%B | grep -q "^Signed-off-by:"' \
373
+ --root
218
374
apply :
219
375
runs-on : ubuntu-latest
220
376
steps :
@@ -236,6 +392,10 @@ jobs:
236
392
pushd pin-init
237
393
git config user.name "github-runner" && git config user.email "<>"
238
394
git fetch
395
+ if [ "$(git rev-parse HEAD)" = "$(git rev-parse origin/next)" ]; then
396
+ # when there are no new commits, we can succeed directly
397
+ exit 0
398
+ fi
239
399
if ! yes | bash ./to-kernel.sh ../kernel origin/next; then
240
400
if ! git am --3way; then
241
401
git am --show-current-patch=diff
@@ -256,7 +416,10 @@ jobs:
256
416
components : rust-src
257
417
- run : sudo apt-get install -y linkchecker
258
418
- run : git config user.name "github-runner" && git config user.email "<>"
259
- - run : git rebase --exec 'cargo doc --all-features --no-deps && linkchecker target/doc/*/*.html' --root
419
+ - run : |
420
+ git rebase --exec \
421
+ 'cargo doc --all-features --no-deps && linkchecker target/doc/*/*.html' \
422
+ --root
260
423
env:
261
424
RUSTFLAGS: "-Dwarnings"
262
425
update :
0 commit comments