-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (52 loc) · 1.85 KB
/
build.yaml
File metadata and controls
58 lines (52 loc) · 1.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Rust ARM64 Build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04-arm
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
target: aarch64-unknown-linux-gnu
- name: Install ARM64 dependencies
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu libclang-dev
pwd
DD=$(pwd)
cd ${HOME}/work/bbn_rust_sandbox/bbn_rust_sandbox/rust_i2c_imu/
git clone --depth=1 https://github.com/seandepagnier/RTIMULib2
cd RTIMULib2/RTIMULib
mkdir build
cd build
cmake ..
make -j 4
sudo make install
ls -l
ls -l *
cp ../*.h ../IMUDrivers/
cd $DD
- name: Build the project
run: |
for d in `find . -type d -name rust_i2c\* -not -name rust_i2c_bme680`; do
echo $d
cd $d
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc
pwd
ls
if [ -d RTIMULib2 ]; then ln -s ${HOME}/work/bbn_rust_sandbox/bbn_rust_sandbox/rust_i2c_imu/RTIMULib2/RTIMULib ${HOME}/.cargo/registry/src/RTIMULib; fi
if [ -d RTIMULib2 ]; then ln -s ${HOME}/work/bbn_rust_sandbox/bbn_rust_sandbox/rust_i2c_imu/RTIMULib2/RTIMULib/IMUDrivers ${HOME}/.cargo/registry/src/IMUDrivers; fi
if [ -d RTIMULib2 ]; then ln -s ${HOME}/work/bbn_rust_sandbox/bbn_rust_sandbox/rust_i2c_imu/RTIMULib2/RTIMULib/IMUDrivers ${HOME}/.cargo/registry/src/IMUDrivers/IMUDrivers; fi
RUST_BACKTRACE=full cargo build --release --target aarch64-unknown-linux-gnu
cd ..
done