Skip to content

Commit e1a0a3f

Browse files
committed
Add ARM cross-compilation to CI (#113)
1 parent e1fd795 commit e1a0a3f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

.github/workflows/cross.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on: [push]
2+
3+
name: Cross CI
4+
5+
jobs:
6+
cross:
7+
name: Rust ${{matrix.target}}
8+
runs-on: ubuntu-latest
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
target:
13+
- aarch64-unknown-linux-gnu
14+
steps:
15+
- uses: actions/checkout@v2
16+
- uses: actions-rs/toolchain@v1
17+
with:
18+
toolchain: stable
19+
target: ${{matrix.target}}
20+
override: true
21+
- uses: actions-rs/cargo@v1
22+
with:
23+
use-cross: true
24+
command: test
25+
args: --target ${{matrix.target}}

Cross.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[target.aarch64-unknown-linux-gnu]
2+
pre-build = [
3+
"dpkg --add-architecture $CROSS_DEB_ARCH",
4+
"apt-get update && apt-get --assume-yes install gfortran-aarch64-linux-gnu gcc-aarch64-linux-gnu libssl-dev:$CROSS_DEB_ARCH libssl-dev"
5+
]
6+
[target.aarch64-unknown-linux-gnu.env]
7+
passthrough = [
8+
"OPENBLAS_CC=aarch64-linux-gnu-gcc",
9+
"OPENBLAS_HOSTCC=gcc",
10+
"OPENBLAS_FC=aarch64-linux-gnu-gfortran",
11+
"OPENBLAS_TARGET=NEOVERSEN1"
12+
]

0 commit comments

Comments
 (0)