Skip to content

Commit d6ebf49

Browse files
juntaoclaude
andcommitted
Add aarch64 build job to CI workflow
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2f4225b commit d6ebf49

1 file changed

Lines changed: 45 additions & 0 deletions

File tree

.github/workflows/rust_ci.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,48 @@ jobs:
4141

4242
- name: Build binary
4343
run: cargo build --release
44+
45+
build-aarch64:
46+
name: Build (aarch64)
47+
runs-on: ubuntu-latest
48+
container:
49+
image: debian:bookworm-slim
50+
steps:
51+
- name: Install base dependencies
52+
shell: bash
53+
run: |
54+
set -euo pipefail
55+
export DEBIAN_FRONTEND=noninteractive
56+
dpkg --add-architecture arm64
57+
apt-get update
58+
apt-get install -y --no-install-recommends \
59+
ca-certificates \
60+
pkg-config \
61+
libssl-dev \
62+
libssl-dev:arm64 \
63+
gcc-aarch64-linux-gnu \
64+
libc6-dev-arm64-cross \
65+
build-essential \
66+
git \
67+
curl \
68+
unzip \
69+
cmake
70+
71+
- name: Check out repository
72+
uses: actions/checkout@v4
73+
74+
- name: Set up Rust toolchain
75+
uses: dtolnay/rust-toolchain@stable
76+
77+
- name: Add Rust target
78+
run: rustup target add aarch64-unknown-linux-gnu
79+
80+
- name: Build binary
81+
env:
82+
CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc
83+
AR_aarch64_unknown_linux_gnu: aarch64-linux-gnu-ar
84+
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
85+
PKG_CONFIG_ALLOW_CROSS: "1"
86+
PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig
87+
RUSTFLAGS: "-C target-feature=+fp16"
88+
run: cargo build --release --target aarch64-unknown-linux-gnu

0 commit comments

Comments
 (0)