-
Notifications
You must be signed in to change notification settings - Fork 73
63 lines (49 loc) · 1.43 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
name: CI
on:
push:
branches: [master]
pull_request:
jobs:
lint:
runs-on: ubuntu-22.04
outputs:
boards: ${{ steps.board-matrix.outputs.boards }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: ./scripts/deps.sh
- name: Check SPDX tags
run: ./scripts/lint/01-spdx-tags.sh
- name: Check formatting
run: ./scripts/lint/02-clang-format.sh
- name: Check shell scripts
run: ./scripts/lint/03-shellcheck.sh
- name: Generate board matrix
id: board-matrix
run: echo "boards=$(make list-boards | jq -sRc 'split("\n")[:-1]')" >> $GITHUB_OUTPUT
tool:
strategy:
matrix:
include:
- features:
- features: --no-default-features --features="redox_hwio"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: ./scripts/deps.sh
- name: Build tool
run: cargo build ${{ matrix.features }} --release --manifest-path tool/Cargo.toml
ec:
runs-on: ubuntu-22.04
needs: lint
strategy:
matrix:
boards: ${{ fromJson(needs.lint.outputs.boards) }}
# TODO: Conditionally build based on files changed?
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: ./scripts/deps.sh
- name: Build firmware
run: make BOARD=${{ matrix.boards }} VERBOSE=1