Skip to content

ci: migrate aarch64/Linux CI to GA #2600

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

Merged
merged 2 commits into from
Feb 6, 2025
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,24 +64,3 @@ task:
- . $HOME/.cargo/env
- if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi
before_cache_script: rm -rf $CARGO_HOME/registry/index

# Tasks for Linux aarch64 native builds
task:
matrix:
- name: Linux aarch64 gnu
arm_container:
image: rust:1.69.0
cpu: 1
env:
TARGET: aarch64-unknown-linux-gnu
- name: Linux aarch64 musl
arm_container:
image: rust:1.69.0
cpu: 1
env:
TARGET: aarch64-unknown-linux-musl
setup_script:
- rustup target add $TARGET
- rustup component add clippy
<< : *TEST
before_cache_script: rm -rf $CARGO_HOME/registry/index
48 changes: 42 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
# would fail on 22.04 and 24.04 (at least for now)
# https://github.com/nix-rust/nix/issues/2418
runs-on: ubuntu-20.04
needs: [rustfmt, minver, macos, linux_native_builds, rust_stable]
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -141,9 +141,8 @@ jobs:



# Tasks for Linux native builds
# Only test x86_64 targets on GitHub Action, leave aarch64 one in Cirrus CI.
linux_native_builds:
# Tasks for x86_64 Linux native builds
x86_64_linux_native_builds:
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -178,6 +177,43 @@ jobs:

- name: before_cache_script
run: sudo rm -rf $CARGO_HOME/registry/index;

# Tasks for aarch64 Linux native builds
aarch64_linux_native_builds:
runs-on: ubuntu-24.04-arm
strategy:
fail-fast: false
matrix:
target: [
aarch64-unknown-linux-gnu,
aarch64-unknown-linux-musl,
]

steps:
- name: checkout
uses: actions/checkout@v4

- name: setup Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: '${{ env.MSRV }}'
components: clippy

- name: install targets
run: rustup target add ${{ matrix.target }}

- name: build
uses: ./.github/actions/build
with:
TARGET: '${{ matrix.TARGET }}'

- name: test
uses: ./.github/actions/test
with:
TARGET: '${{ matrix.TARGET }}'

- name: before_cache_script
run: sudo rm -rf $CARGO_HOME/registry/index;

rust_stable:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -210,7 +246,7 @@ jobs:
# Tasks for cross-compiling, but no testing
cross_compiling:
runs-on: ubuntu-latest
needs: [rustfmt, minver, macos, linux_native_builds, rust_stable]
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
env:
BUILD: check
strategy:
Expand Down Expand Up @@ -269,7 +305,7 @@ jobs:

redox:
runs-on: ubuntu-latest
needs: [rustfmt, minver, macos, linux_native_builds, rust_stable]
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
env:
TARGET: x86_64-unknown-redox
CLIPPYFLAGS: -D warnings
Expand Down
15 changes: 8 additions & 7 deletions test/sys/test_socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,9 +917,15 @@ pub fn test_scm_rights() {
close(received_r).unwrap();
}

// Disable the test on emulated platforms due to not enabled support of AF_ALG in QEMU from rust cross
// 1. Disable the test on emulated platforms due to not enabled support of
// AF_ALG in QEMU from rust cross
// 2. Disable the test on aarch64/Linux CI because bind() fails with ENOENT
// https://github.com/nix-rust/nix/issues/1352
#[cfg(linux_android)]
#[cfg_attr(qemu, ignore)]
#[cfg_attr(
any(qemu, all(target_os = "linux", target_arch = "aarch64")),
ignore
)]
#[test]
pub fn test_af_alg_cipher() {
use nix::sys::socket::sockopt::AlgSetKey;
Expand All @@ -930,11 +936,6 @@ pub fn test_af_alg_cipher() {
use nix::unistd::read;
use std::io::IoSlice;

skip_if_cirrus!("Fails for an unknown reason Cirrus CI. Bug #1352");
// Travis's seccomp profile blocks AF_ALG
// https://docs.docker.com/engine/security/seccomp/
skip_if_seccomp!(test_af_alg_cipher);

let alg_type = "skcipher";
let alg_name = "ctr-aes-aesni";
// 256-bits secret key
Expand Down