Skip to content

Commit 449f277

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 d0a64b9 commit 449f277

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
@@ -307,30 +307,34 @@ jobs:
307307
GIX_TEST_IGNORE_ARCHIVES: '1'
308308
run: cargo nextest run --workspace --no-fail-fast
309309

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

317315
strategy:
318316
matrix:
319-
moniker: [ android, s390x ]
317+
target: [ armv7-linux-androideabi, s390x-unknown-linux-gnu ]
320318
fail-fast: false
321319

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

335339
lint:
336340
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)