Skip to content

Commit

Permalink
ci: Test AArch64 Linux on ubuntu-24.04-arm runner
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jan 17, 2025
1 parent 17fb841 commit 2f5ad00
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 37 deletions.
12 changes: 0 additions & 12 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,6 @@ env:
RUSTFLAGS: -D warnings
RUSTUP_MAX_RETRIES: '10'

aarch64_linux_task:
name: test ($TARGET)
env:
TARGET: aarch64-unknown-linux-gnu
arm_container:
image: rust
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

aarch64_macos_task:
name: test ($TARGET)
env:
Expand Down
57 changes: 32 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,17 @@ jobs:
RUST_TARGET: ${{ matrix.target }}
strategy:
fail-fast: false
# macOS is tested on Cirrus CI due to GitHub-hosted macOS runners are slow.
matrix:
# aarch64/x86_64 macOS and aarch64 Linux are tested on Cirrus CI
rust:
- '1.63'
- stable
- nightly
os:
- ubuntu-latest
- ubuntu-24.04-arm
- windows-latest
include:
- rust: '1.63'
os: ubuntu-latest
- rust: '1.63'
os: windows-latest
- rust: stable
os: ubuntu-latest
- rust: stable
os: windows-latest
- rust: nightly
os: ubuntu-latest
- rust: nightly
os: windows-latest
- rust: nightly
os: ubuntu-latest
target: i686-unknown-linux-gnu
Expand All @@ -69,10 +65,15 @@ jobs:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
# https://github.com/orgs/community/discussions/148648#discussioncomment-11867019
- name: Workaround for AArch64 Linux runner bug
run: for var in PATH XDG_CONFIG_HOME; do sed -Ee "s/^/${var}=/" -e 's/(runner)admin/\1/g' <<< "${!var}"; done | tee -a -- "${GITHUB_ENV}"
if: endsWith(matrix.os, '-arm')
- uses: taiki-e/checkout-action@v1
- name: Install Rust
# --no-self-update is necessary because the windows environment cannot self-update rustup.exe.
run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }}
uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
- uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
Expand All @@ -95,7 +96,9 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
uses: taiki-e/github-actions/install-rust@main
with:
toolchain: ${{ matrix.rust }}
if: matrix.rust != 'msrv'
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
Expand All @@ -109,7 +112,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update nightly && rustup default nightly
uses: taiki-e/github-actions/install-rust@nightly
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Install cargo-minimal-versions
Expand All @@ -127,7 +130,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update stable
uses: taiki-e/github-actions/install-rust@stable
- run: ci/no_atomic.sh
- run: git add -N . && git diff --exit-code
if: github.repository_owner != 'crossbeam-rs' || github.event_name != 'schedule'
Expand Down Expand Up @@ -161,7 +164,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update stable
uses: taiki-e/github-actions/install-rust@stable
- name: rustfmt
run: cargo fmt --all --check

Expand All @@ -172,7 +175,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update stable
uses: taiki-e/github-actions/install-rust@stable
- name: clippy
run: cargo clippy --all --all-features --tests --examples

Expand All @@ -189,7 +192,9 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup toolchain install nightly --component miri && rustup default nightly
uses: taiki-e/github-actions/install-rust@nightly
with:
component: miri
- name: miri
run: ci/miri.sh ${{ matrix.group }}

Expand All @@ -200,7 +205,9 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup toolchain install nightly --component rust-src && rustup default nightly
uses: taiki-e/github-actions/install-rust@nightly
with:
component: rust-src
- uses: taiki-e/install-action@cargo-careful
- name: Run cargo-careful
run: ci/careful.sh
Expand All @@ -212,7 +219,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update nightly && rustup default nightly
uses: taiki-e/github-actions/install-rust@nightly
# https://github.com/google/sanitizers/issues/1716 / https://github.com/actions/runner-images/issues/9491
- run: sudo sysctl vm.mmap_rnd_bits=28
- name: Run sanitizers
Expand All @@ -225,7 +232,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update stable
uses: taiki-e/github-actions/install-rust@stable
- name: loom
run: ci/crossbeam-epoch-loom.sh

Expand All @@ -236,7 +243,7 @@ jobs:
steps:
- uses: taiki-e/checkout-action@v1
- name: Install Rust
run: rustup update nightly && rustup default nightly
uses: taiki-e/github-actions/install-rust@nightly
- name: docs
run: cargo doc --no-deps --all --all-features

Expand Down

0 comments on commit 2f5ad00

Please sign in to comment.