Skip to content

Commit

Permalink
Add ARM cross-compilation to CI (#113)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkobeaga committed Feb 9, 2024
1 parent e1fd795 commit e1a0a3f
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/cross.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on: [push]

name: Cross CI

jobs:
cross:
name: Rust ${{matrix.target}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{matrix.target}}
override: true
- uses: actions-rs/cargo@v1
with:
use-cross: true
command: test
args: --target ${{matrix.target}}
12 changes: 12 additions & 0 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[target.aarch64-unknown-linux-gnu]
pre-build = [
"dpkg --add-architecture $CROSS_DEB_ARCH",
"apt-get update && apt-get --assume-yes install gfortran-aarch64-linux-gnu gcc-aarch64-linux-gnu libssl-dev:$CROSS_DEB_ARCH libssl-dev"
]
[target.aarch64-unknown-linux-gnu.env]
passthrough = [
"OPENBLAS_CC=aarch64-linux-gnu-gcc",
"OPENBLAS_HOSTCC=gcc",
"OPENBLAS_FC=aarch64-linux-gnu-gfortran",
"OPENBLAS_TARGET=NEOVERSEN1"
]

0 comments on commit e1a0a3f

Please sign in to comment.