Skip to content

Commit

Permalink
Cross-build for aarch64/glibc
Browse files Browse the repository at this point in the history
  • Loading branch information
hillu committed Mar 1, 2024
1 parent f38393d commit c49a163
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[target."aarch64-unknown-linux-gnu"]
linker = "aarch64-linux-gnu-gcc"

29 changes: 29 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,35 @@ jobs:
- run: cargo bench --no-run
- run: make -C contrib/selinux

build_aarch64:
runs-on: ubuntu-latest
container: debian:bullseye
steps:
- uses: actions/checkout@v2
- name: Install dependency
run: |
dpkg --add-architecture arm64
apt-get -qq update
apt-get -qqy dist-upgrade
apt-get -qqy install curl build-essential libclang-dev gcc-aarch64-linux-gnu libacl1-dev:arm64
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-unknown-linux-gnu

- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: "${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}"

- run: cargo build --target=aarch64-unknown-linux-gnu

build_static_musl:
runs-on: ubuntu-latest
container: alpine:3.18
Expand Down

0 comments on commit c49a163

Please sign in to comment.