-
-
Notifications
You must be signed in to change notification settings - Fork 29
120 lines (112 loc) · 3.41 KB
/
ci.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: ci
on:
pull_request:
push:
branches:
- dev
- main
env:
CARGO_INCREMENTAL: 0
# do not set RUSTFLAGES, would overrides .cargo/config (linker script, flip-link)
jobs:
build-lpc55:
runs-on: ubuntu-latest
strategy:
matrix:
board:
- board-lpcxpresso55
- board-solo2
# - board-okdoe1
rust:
- stable
defaults:
run:
working-directory: runners/lpc55
steps:
- uses: actions/checkout@v1
- name: Install littlefs2-sys/micro-ecc-sys build dependencies
shell: bash
run: |
apt-get update && apt-get install sudo
env && pwd && sudo apt-get update -y -qq && sudo apt-get install -y -qq llvm libc6-dev-i386 libclang-dev clang git
- uses: fiam/[email protected]
with:
release: "9-2020-q2"
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: thumbv8m.main-none-eabi
override: true
components: llvm-tools-preview
# Use precompiled binutils
- name: cargo install cargo-binutils
uses: actions-rs/[email protected]
with:
crate: cargo-binutils
version: latest
use-tool-cache: true
- name: cargo install flip-link
uses: actions-rs/[email protected]
with:
crate: flip-link
version: latest
use-tool-cache: true
- name: Build
run: |
cargo build --release --features ${{ matrix.board }}
- name: Size
run: |
cargo size --release --features ${{ matrix.board }}
- name: Artifacts for firmware bundle
run: |
cargo objcopy --release --features ${{ matrix.board }} -- -O binary firmware-${{ matrix.board }}.bin
sudo cp *.bin /
- name: Upload Firmware
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: Firmware
path: runners/lpc55/target/thumbv8m.main-none-eabi/release/runner
- name: Build Provisioner
run: |
cargo build --release --features ${{ matrix.board }},provisioner-app,admin-app,trussed/clients-2,provisioner-app/test-attestation
- name: Upload Provisioner
uses: actions/upload-artifact@v2
continue-on-error: true
with:
name: Provisioner
path: runners/lpc55/target/thumbv8m.main-none-eabi/release/runner
build-pc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
# TODO: some build issue currently
# - macos-latest
rust:
- stable
defaults:
run:
working-directory: runners/pc
steps:
- uses: actions/checkout@v1
- name: Install Linux build dependencies
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
apt-get update && apt-get install sudo
sudo apt update -y -qq && sudo apt install -y -qq llvm libclang-dev build-essential clang
# this is already installed
# - name: Install macOS build dependencies
# if: matrix.os == 'macos-latest'
# shell: bash
# run: brew install llvm
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Build
run: cargo build --release