Skip to content

Commit a9d236c

Browse files
committed
Use setup-cross-toolchain-action instead of cross
1 parent 4a514f4 commit a9d236c

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ jobs:
5656
- rust: nightly
5757
os: ubuntu-latest
5858
target: aarch64-unknown-linux-gnu
59+
- rust: nightly
60+
os: ubuntu-latest
61+
target: armv7-unknown-linux-gnueabihf
5962
# Test 32-bit target that does not have AtomicU64/AtomicI64.
6063
- rust: nightly
6164
os: ubuntu-latest
@@ -67,8 +70,9 @@ jobs:
6770
- name: Install Rust
6871
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
6972
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
70-
- name: Install cross
71-
uses: taiki-e/install-action@cross
73+
- uses: taiki-e/setup-cross-toolchain-action@v1
74+
with:
75+
target: ${{ matrix.target }}
7276
if: matrix.target != ''
7377
- name: Test
7478
run: ci/test.sh

ci/test.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ set -euxo pipefail
33
IFS=$'\n\t'
44
cd "$(dirname "$0")"/..
55

6+
# shellcheck disable=SC2086
67
if [[ -n "${RUST_TARGET:-}" ]]; then
7-
# If RUST_TARGET is specified, use cross for testing.
8-
cross test --all --target "$RUST_TARGET" --exclude benchmarks -- --test-threads=1
8+
cargo test --all --target "$RUST_TARGET" --exclude benchmarks ${DOCTEST_XCOMPILE:-} -- --test-threads=1
99

1010
# For now, the non-host target only runs tests.
1111
exit 0

0 commit comments

Comments
 (0)