From e844dc1bb6d9f4f71ed787033ae6e6f24068a7e2 Mon Sep 17 00:00:00 2001 From: Miriam Zimmerman Date: Wed, 2 Oct 2024 10:43:42 -0400 Subject: [PATCH] Cross-compile for aarch64-linux. This architecture has a different c_char: u8, rather than i8. Due to https://github.com/rust-lang/rust/issues/113735, this causes a build breakage, since CStr::from_ptr was documented to take an i8 but actually takes a c_char. --- .github/workflows/build.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7fe0d14..3cc3adc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -66,3 +66,24 @@ jobs: shell: bash run: rustup run ${{ matrix.rust }} cargo run -p systest + build_arm_linux: + name: Cross-compile for aarch64 linux + + runs-on: ubuntu-20.04 + + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install Rust + shell: bash + run: rustup target add aarch64-unknown-linux-gnu + + - name: Install crossbuild headers + shell: bash + run: sudo apt-get update && sudo apt-get install -y crossbuild-essential-arm64 + + - name: Build cross compile aarch64 + shell: bash + run: cargo build --all --target aarch64-unknown-linux-gnu