-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.04 KB
/
rpi.yml
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
name: Cross-compilation Raspberry Pi
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
container:
image: debian:11
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- run: apt-get update && apt-get install -y rustup
- run: rustup default stable
- name: Rust build and test
run: cargo test
- name: Set up cross-compilation toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: arm-unknown-linux-gnueabihf
- run: rustup target add arm-unknown-linux-gnueabihf
- run: apt-get install -y gcc-arm-linux-gnueabihf libc6-dev-armhf-cross
- name: Build cross-compilation binary
run: cargo build --release --target=arm-unknown-linux-gnueabihf
- name: Upload binary
uses: actions/upload-artifact@v3
with:
name: boiler-watch-api_arm-linux-gnueabihf
path: target/arm-unknown-linux-gnueabihf/release/boiler-watch-api