-
Notifications
You must be signed in to change notification settings - Fork 34
81 lines (66 loc) · 2.03 KB
/
firmware.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Firmware CI Checks
on:
push
env:
CARGO_TERM_COLOR: always
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
building:
name: Build ${{ matrix.platform }} (${{ matrix.target }})
strategy:
matrix:
target: ['debug', 'release']
platform: [b1display, c1minimal, ledmatrix]
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Setup Rust toolchain
run: rustup show
- run: cargo install flip-link
- name: Build release firmware
if: ${{ matrix.target }} == 'release'
run: |
make PLATFORM=${{ matrix.platform }} release
- name: Build debug firmware
if: ${{ matrix.target }} == 'debug'
run: |
cargo build -p ${{ matrix.platform }}
- name: Convert to UF2 file
run: |
sudo apt-get update
sudo apt-get install -y libudev-dev
cargo install elf2uf2-rs
elf2uf2-rs target/thumbv6m-none-eabi/${{ matrix.target }}/${{ matrix.platform }} ${{ matrix.platform }}.uf2
- name: Show hash of firmare
run: |
sha256sum target/thumbv6m-none-eabi/${{ matrix.target }}/${{ matrix.platform }}
sha256sum ${{ matrix.platform }}.uf2
- name: Upload Linux tool
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.platform }}.uf2
path: |
${{ matrix.platform }}.uf2
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Rust toolchain
run: rustup show
- run: |
cargo clippy -p b1display -- --deny=warnings
cargo clippy -p c1minimal -- --deny=warnings
cargo clippy -p ledmatrix -- --deny=warnings
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Rust toolchain
run: rustup show
- run: cargo fmt --all -- --check