Skip to content

Commit

Permalink
Run tests on real aarch64 hardware
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jul 23, 2022
1 parent 568f558 commit 99fe271
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 7 deletions.
20 changes: 20 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
env:
CARGO_INCREMENTAL: '0'
CARGO_NET_RETRY: '10'
CARGO_TERM_COLOR: always
RUST_BACKTRACE: '1'
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: '10'

test_task:
name: test (aarch64-unknown-linux-gnu)
env:
TARGET: aarch64-unknown-linux-gnu
arm_container:
image: rust:latest
setup_script:
- rustup toolchain add nightly && rustup default nightly
test_script:
- cargo test --all --all-features --exclude benchmarks -- --test-threads=1
- cargo test --all --all-features --exclude benchmarks --release -- --test-threads=1
5 changes: 4 additions & 1 deletion .github/bors.toml
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
status = ["ci"]
status = [
"ci",
"test (aarch64-unknown-linux-gnu)",
]
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,13 @@ on:
- cron: '0 1 * * *'

env:
RUSTFLAGS: -Dwarnings
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUSTDOCFLAGS: -D warnings
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: 10

defaults:
run:
Expand Down
2 changes: 0 additions & 2 deletions ci/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ set -euxo pipefail
IFS=$'\n\t'
cd "$(dirname "$0")"/..

export RUSTDOCFLAGS="-D warnings"

cargo doc --no-deps --all --all-features
6 changes: 3 additions & 3 deletions ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ cd "$(dirname "$0")"/..
if [[ -n "${RUST_TARGET:-}" ]]; then
# If RUST_TARGET is specified, use cross for testing.
cross test --all --target "$RUST_TARGET" --exclude benchmarks -- --test-threads=1
cross test --all --target "$RUST_TARGET" --exclude benchmarks --release -- --test-threads=1

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

# Otherwise, run tests and checks with the host target.
cargo check --all --bins --examples --tests --exclude benchmarks
cargo test --all --all-features --exclude benchmarks -- --test-threads=1
cargo test --all --all-features --exclude benchmarks --release -- --test-threads=1

if [[ "$RUST_VERSION" == "nightly"* ]]; then
# Benchmarks are only checked on nightly because depending on unstable features.
cargo check --all --benches
cargo check --bins --manifest-path crossbeam-channel/benchmarks/Cargo.toml
cargo check --all --all-targets
fi

0 comments on commit 99fe271

Please sign in to comment.