Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Move armhf test to Cirrus CI #970

Merged
merged 1 commit into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
29 changes: 22 additions & 7 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ env:
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: '10'

linux_task:
name: test (aarch64-unknown-linux-gnu)
aarch64_linux_task:
name: test ($TARGET)
env:
TARGET: aarch64-unknown-linux-gnu
arm_container:
Expand All @@ -22,18 +22,33 @@ linux_task:
- cargo test --all --all-features --exclude benchmarks -- --test-threads=1
- cargo test --all --all-features --exclude benchmarks --release -- --test-threads=1

arm_linux_task:
name: test ($TARGET)
env:
TARGET: armv7-unknown-linux-gnueabihf
arm_container:
image: rust:latest
setup_script:
- rustup toolchain add nightly --no-self-update --component rust-src && rustup default nightly
- rustup target add "$TARGET"
- dpkg --add-architecture armhf
- apt-get -o Acquire::Retries=10 -qq update && apt-get -o Acquire::Retries=10 -qq install -y --no-install-recommends gcc-arm-linux-gnueabihf libc6-dev-armhf-cross libc6:armhf
test_script:
- export CARGO_TARGET_ARMV7_UNKNOWN_LINUX_GNUEABIHF_LINKER=arm-linux-gnueabihf-gcc
- cargo test --all --all-features --exclude benchmarks --target "$TARGET" -Z doctest-xcompile -- --test-threads=1
- cargo test --all --all-features --exclude benchmarks --target "$TARGET" -Z doctest-xcompile --release -- --test-threads=1

macos_task:
name: test ($TARGET)
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
matrix:
- name: test (aarch64-apple-darwin)
env:
- env:
TARGET: aarch64-apple-darwin
- name: test (x86_64-apple-darwin)
env:
- env:
TARGET: x86_64-apple-darwin
setup_script:
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain nightly
- curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal --default-toolchain none
- source $HOME/.cargo/env
- rustup toolchain add nightly-$TARGET && rustup default nightly-$TARGET
test_script:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
strategy:
fail-fast: false
matrix:
# aarch64/x86_64 macOS and aarch64 linux are tested on Cirrus CI
# aarch64/x86_64 macOS and aarch64/arm linux are tested on Cirrus CI
include:
- rust: '1.38'
os: ubuntu-latest
Expand All @@ -55,9 +55,6 @@ jobs:
- rust: nightly
os: ubuntu-latest
target: i686-unknown-linux-gnu
- rust: nightly
os: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
# Test 32-bit target that does not have AtomicU64/AtomicI64.
- rust: nightly
os: ubuntu-latest
Expand Down