-
Notifications
You must be signed in to change notification settings - Fork 22
140 lines (133 loc) · 4.81 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: ci
on:
push:
branches: [main, mcusigner]
pull_request:
branches: [main, mcusigner]
env:
CARGO_TERM_COLOR: always
jobs:
formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Check formatting
run: cargo fmt -- --check
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v1
- name: device-tree - unit tests
run: |
rustup install nightly
cargo +nightly test --package rustBoot --lib -- --nocapture
- name: rustBoot image parser - unit tests
run: |
cargo +nightly test --package rustBoot --lib --features nrf52840 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features stm32f411 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features stm32f446 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features stm32f469 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features stm32h723 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features stm32f746 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features stm32f334 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features rp2040 -- parser::tests --nocapture
cargo +nightly test --package rustBoot --lib --features nrf9160 -- parser::tests --nocapture
builds:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
target: [thumbv7em-none-eabihf, aarch64-unknown-none-softfloat, thumbv6m-none-eabi]
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install rust for target
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
target: ${{ matrix.target }}
- name: Install flip-link
uses: actions-rs/cargo@v1
with:
use-cross: false
command: install
args: flip-link
- name: Install cargo-binutils
run: |
cargo install cargo-binutils
rustup component add llvm-tools-preview
- name: nrf52840
if: matrix.target == 'thumbv7em-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features nrf52840 -- nrf52840 build rustBoot-only
- name: nrf9160
if: matrix.target == 'thumbv8m.main-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features nrf9160 -- nrf9160 build rustBoot-only
- name: stm32f411
if: matrix.target == 'thumbv7em-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features stm32f411 -- stm32f411 build rustBoot-only
- name: stm32f446
if: matrix.target == 'thumbv7em-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features stm32f446 -- stm32f446 build rustBoot-only
- name: stm32f469
if: matrix.target == 'thumbv7em-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features stm32f469 -- stm32f469 build rustBoot-only
- name: stm32h723
if: matrix.target == 'thumbv7em-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features stm32h723 -- stm32h723 build rustBoot-only
- name: stm32f746
if: matrix.target == 'thumbv7em-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features stm32f746 -- stm32f746 build rustBoot-only
- name: stm32f334
if: matrix.target == 'thumbv7em-none-eabihf'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features stm32f334 -- stm32f334 build rustBoot-only
- name: rp2040
if: matrix.target == 'thumbv6m-none-eabi'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask --features rp2040 -- rp2040 build rustBoot-only
- name: rpi4
if: matrix.target == 'aarch64-unknown-none-softfloat'
uses: actions-rs/cargo@v1
with:
use-cross: false
command: run
args: -p xtask -- rpi4 build rustBoot-only