Skip to content

Commit ce58542

Browse files
committed
ci: rename tests to nightly & add strategy + use cargo hack
Signed-off-by: Benno Lossin <lossin@kernel.org>
1 parent 8836711 commit ce58542

File tree

1 file changed

+20
-9
lines changed

1 file changed

+20
-9
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,16 @@ jobs:
106106
RUSTFLAGS: >
107107
-Dwarnings
108108
--cfg UI_TESTS
109-
tests:
109+
nightly:
110110
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}}"
111119
steps:
112120
- uses: actions/checkout@v4
113121
with:
@@ -117,15 +125,18 @@ jobs:
117125
with:
118126
components: rust-src
119127
- run: cargo install cargo-expand
128+
- run: cargo install cargo-hack
120129
- run: git config user.name "github-runner" && git config user.email "<>"
121-
- run: git rebase --exec 'cargo check --locked --all-targets' --root
122-
env:
123-
RUSTFLAGS: "-Dwarnings"
124-
- run: git rebase --exec 'cargo test --locked --all-targets' --root
125-
env:
126-
RUSTFLAGS: "-Dwarnings"
127-
# doctests are strangely not included in --all-targets
128-
- run: git rebase --exec 'cargo test --locked --doc' --root
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
129140
env:
130141
RUSTFLAGS: "-Dwarnings"
131142
miri:

0 commit comments

Comments
 (0)