Skip to content

Commit

Permalink
ci: Move armhf test to Cirrus CI
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Mar 30, 2023
1 parent 214c58d commit d7b276a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 11 deletions.
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

0 comments on commit d7b276a

Please sign in to comment.