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 CI
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
env:
EADKP_PRIMARY_BUILD: 1
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Install ARM Toolchain
run: |
sudo apt-get update
sudo apt-get install -y gcc-arm-none-eabi libnewlib-arm-none-eabi
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: thumbv7em-none-eabihf
- name: Build library (host)
run: cargo +nightly build --lib --release
- name: Build library (thumbv7em-none-eabihf)
run: cargo +nightly build --lib --release --target thumbv7em-none-eabihf
- name: Build NWA example (host)
run: cargo +nightly build --release --example simulator
- name: Build NWA example (thumbv7em-none-eabihf)
run: cargo +nightly build --release --example device --target thumbv7em-none-eabihf
- name: Show NWA output info
run: |
ls -lah target/thumbv7em-none-eabihf/release/examples/device
file target/thumbv7em-none-eabihf/release/examples/device
sha256sum target/thumbv7em-none-eabihf/release/examples/device