Skip to content

Commit cfeb06d

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 eeb5279 commit cfeb06d

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
@@ -327,30 +327,34 @@ jobs:
327327
- name: Test (nextest)
328328
run: cargo nextest run --target $env:TARGET --workspace --no-fail-fast size
329329

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

337335
strategy:
338336
matrix:
339-
moniker: [ android, s390x ]
337+
target: [ armv7-linux-androideabi, s390x-unknown-linux-gnu ]
340338
fail-fast: false
341339

342340
steps:
343341
- uses: actions/checkout@v4
344-
- uses: dtolnay/rust-toolchain@stable
342+
- name: Install Rust
343+
uses: dtolnay/rust-toolchain@master
344+
with:
345+
toolchain: stable
346+
targets: ${{ matrix.target }}
345347
- uses: extractions/setup-just@v3
346348
- name: Install cross
347349
uses: taiki-e/install-action@v2
348350
with:
349351
tool: cross
352+
- name: Build cross image
353+
run: just cross-image ${{ matrix.target }}
350354
- name: Test (unit)
351355
env:
352356
RUST_BACKTRACE: '1'
353-
run: just cross-test-${{ matrix.moniker }}
357+
run: just cross-test ${{ matrix.target }}
354358

355359
lint:
356360
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)