From 99fe271def8313a3c878c5e01ced97fbf9374254 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Sat, 23 Jul 2022 18:34:24 +0900 Subject: [PATCH] Run tests on real aarch64 hardware --- .cirrus.yml | 20 ++++++++++++++++++++ .github/bors.toml | 5 ++++- .github/workflows/ci.yml | 7 ++++++- ci/docs.sh | 2 -- ci/test.sh | 6 +++--- 5 files changed, 33 insertions(+), 7 deletions(-) create mode 100644 .cirrus.yml diff --git a/.cirrus.yml b/.cirrus.yml new file mode 100644 index 000000000..ca38d0537 --- /dev/null +++ b/.cirrus.yml @@ -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 diff --git a/.github/bors.toml b/.github/bors.toml index 0b9053503..6fe4e718f 100644 --- a/.github/bors.toml +++ b/.github/bors.toml @@ -1 +1,4 @@ -status = ["ci"] +status = [ + "ci", + "test (aarch64-unknown-linux-gnu)", +] diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7bb15f0e1..0e1df94b1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: diff --git a/ci/docs.sh b/ci/docs.sh index 0ad3a0a96..aa41819c5 100755 --- a/ci/docs.sh +++ b/ci/docs.sh @@ -3,6 +3,4 @@ set -euxo pipefail IFS=$'\n\t' cd "$(dirname "$0")"/.. -export RUSTDOCFLAGS="-D warnings" - cargo doc --no-deps --all --all-features diff --git a/ci/test.sh b/ci/test.sh index ecaf162ee..b73b2c145 100755 --- a/ci/test.sh +++ b/ci/test.sh @@ -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