Skip to content

Commit 91fe350

Browse files
committed
Divide up the test-cross CI steps better
Rather than having the last step build the image through the `justfile` recipe dependency, and rather than having it install the `cross` target implicitly due to `cross` finding that it is not yet installed, this performs those actions in preceding steps.
1 parent 2067bb7 commit 91fe350

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -308,30 +308,34 @@ jobs:
308308
GIX_TEST_IGNORE_ARCHIVES: '1'
309309
run: cargo nextest run --workspace --no-fail-fast
310310

311-
# TODO: If this is kept, then remove `fail-fast: false`; run only a subset of the tests, unless
312-
# building and running the whole test suite is fast; install the cross target early via
313-
# `dtolnay/rust-toolchain`, listing it as an additional target; and add a `Swatinem/rust-cache`
314-
# step to cache dependencies.
311+
# FIXME: *If* this is kept, then remove `fail-fast: false`, run only a subset of the tests unless
312+
# building and running the whole test suite is fast, and add a `Swatinem/rust-cache` step.
315313
test-cross:
316314
runs-on: ubuntu-latest
317315

318316
strategy:
319317
matrix:
320-
moniker: [ android, s390x ]
318+
target: [ armv7-linux-androideabi, s390x-unknown-linux-gnu ]
321319
fail-fast: false
322320

323321
steps:
324322
- uses: actions/checkout@v4
325-
- uses: dtolnay/rust-toolchain@stable
323+
- name: Install Rust
324+
uses: dtolnay/rust-toolchain@master
325+
with:
326+
toolchain: stable
327+
targets: ${{ matrix.target }}
326328
- uses: extractions/setup-just@v3
327329
- name: Install cross
328330
uses: taiki-e/install-action@v2
329331
with:
330332
tool: cross
333+
- name: Build cross image
334+
run: just cross-image ${{ matrix.target }}
331335
- name: Test (unit)
332336
env:
333337
RUST_BACKTRACE: '1'
334-
run: just cross-test-${{ moniker }}
338+
run: just cross-test ${{ matrix.target }}
335339

336340
lint:
337341
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)