Skip to content

Commit 003bfe4

Browse files
authored
ci: migrate aarch64/Linux CI to GA (#2600)
* ci: migrate aarch64/Linux CI to GA * test: skip test_af_alg_cipher() on aarch64/Linux
1 parent 746cb95 commit 003bfe4

File tree

3 files changed

+50
-34
lines changed

3 files changed

+50
-34
lines changed

.cirrus.yml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,24 +64,3 @@ task:
6464
- . $HOME/.cargo/env
6565
- if [ -z "$NOHACK" ]; then cargo hack check --each-feature --target i686-unknown-freebsd; fi
6666
before_cache_script: rm -rf $CARGO_HOME/registry/index
67-
68-
# Tasks for Linux aarch64 native builds
69-
task:
70-
matrix:
71-
- name: Linux aarch64 gnu
72-
arm_container:
73-
image: rust:1.69.0
74-
cpu: 1
75-
env:
76-
TARGET: aarch64-unknown-linux-gnu
77-
- name: Linux aarch64 musl
78-
arm_container:
79-
image: rust:1.69.0
80-
cpu: 1
81-
env:
82-
TARGET: aarch64-unknown-linux-musl
83-
setup_script:
84-
- rustup target add $TARGET
85-
- rustup component add clippy
86-
<< : *TEST
87-
before_cache_script: rm -rf $CARGO_HOME/registry/index

.github/workflows/ci.yml

Lines changed: 42 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ jobs:
8282
# would fail on 22.04 and 24.04 (at least for now)
8383
# https://github.com/nix-rust/nix/issues/2418
8484
runs-on: ubuntu-20.04
85-
needs: [rustfmt, minver, macos, linux_native_builds, rust_stable]
85+
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
8686
strategy:
8787
fail-fast: false
8888
matrix:
@@ -141,9 +141,8 @@ jobs:
141141

142142

143143

144-
# Tasks for Linux native builds
145-
# Only test x86_64 targets on GitHub Action, leave aarch64 one in Cirrus CI.
146-
linux_native_builds:
144+
# Tasks for x86_64 Linux native builds
145+
x86_64_linux_native_builds:
147146
runs-on: ubuntu-latest
148147
strategy:
149148
fail-fast: false
@@ -178,6 +177,43 @@ jobs:
178177

179178
- name: before_cache_script
180179
run: sudo rm -rf $CARGO_HOME/registry/index;
180+
181+
# Tasks for aarch64 Linux native builds
182+
aarch64_linux_native_builds:
183+
runs-on: ubuntu-24.04-arm
184+
strategy:
185+
fail-fast: false
186+
matrix:
187+
target: [
188+
aarch64-unknown-linux-gnu,
189+
aarch64-unknown-linux-musl,
190+
]
191+
192+
steps:
193+
- name: checkout
194+
uses: actions/checkout@v4
195+
196+
- name: setup Rust
197+
uses: dtolnay/rust-toolchain@master
198+
with:
199+
toolchain: '${{ env.MSRV }}'
200+
components: clippy
201+
202+
- name: install targets
203+
run: rustup target add ${{ matrix.target }}
204+
205+
- name: build
206+
uses: ./.github/actions/build
207+
with:
208+
TARGET: '${{ matrix.TARGET }}'
209+
210+
- name: test
211+
uses: ./.github/actions/test
212+
with:
213+
TARGET: '${{ matrix.TARGET }}'
214+
215+
- name: before_cache_script
216+
run: sudo rm -rf $CARGO_HOME/registry/index;
181217

182218
rust_stable:
183219
runs-on: ubuntu-latest
@@ -210,7 +246,7 @@ jobs:
210246
# Tasks for cross-compiling, but no testing
211247
cross_compiling:
212248
runs-on: ubuntu-latest
213-
needs: [rustfmt, minver, macos, linux_native_builds, rust_stable]
249+
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
214250
env:
215251
BUILD: check
216252
strategy:
@@ -269,7 +305,7 @@ jobs:
269305

270306
redox:
271307
runs-on: ubuntu-latest
272-
needs: [rustfmt, minver, macos, linux_native_builds, rust_stable]
308+
needs: [rustfmt, minver, macos, x86_64_linux_native_builds, rust_stable]
273309
env:
274310
TARGET: x86_64-unknown-redox
275311
CLIPPYFLAGS: -D warnings

test/sys/test_socket.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -917,9 +917,15 @@ pub fn test_scm_rights() {
917917
close(received_r).unwrap();
918918
}
919919

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

933-
skip_if_cirrus!("Fails for an unknown reason Cirrus CI. Bug #1352");
934-
// Travis's seccomp profile blocks AF_ALG
935-
// https://docs.docker.com/engine/security/seccomp/
936-
skip_if_seccomp!(test_af_alg_cipher);
937-
938939
let alg_type = "skcipher";
939940
let alg_name = "ctr-aes-aesni";
940941
// 256-bits secret key

0 commit comments

Comments
 (0)