Skip to content

Commit

Permalink
Add custom environment for ARM Linux cross-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
jrose-signal authored and nox committed Dec 14, 2023
1 parent 2f62df4 commit 16327cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ jobs:
- check_only: false
- extra_test_args: ''
- apt_packages: ''
- custom_env: {}
- thing: stable
target: x86_64-unknown-linux-gnu
rust: stable
Expand Down Expand Up @@ -136,12 +137,20 @@ jobs:
os: ubuntu-latest
apt_packages: gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
check_only: true
custom_env:
CC: arm-linux-gnueabi-gcc
CXX: arm-linux-gnueabi-g++
CARGO_TARGET_ARM_UNKNOWN_LINUX_GNUEABI_LINKER: arm-linux-gnueabi-g++
- thing: aarch64-linux
target: aarch64-unknown-linux-gnu
rust: stable
os: ubuntu-latest
apt_packages: crossbuild-essential-arm64
check_only: true
custom_env:
CC: aarch64-linux-gnu-gcc
CXX: aarch64-linux-gnu-g++
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-g++
- thing: x86_64-mingw
target: x86_64-pc-windows-gnu
rust: stable
Expand Down Expand Up @@ -187,10 +196,12 @@ jobs:
- if: "!matrix.check_only"
run: cargo test --target ${{ matrix.target }} ${{ matrix.extra_test_args }}
name: Run tests
env: ${{ matrix.custom_env }}
- if: matrix.check_only
# We `build` because we want the linker to verify we are cross-compiling correctly.
run: cargo build --target ${{ matrix.target }} --tests
name: Build tests
env: ${{ matrix.custom_env }}
- name: Test boring-sys cargo publish
# Running `cargo publish --dry-run` tests two things:
#
Expand Down

0 comments on commit 16327cf

Please sign in to comment.