-
Notifications
You must be signed in to change notification settings - Fork 238
138 lines (127 loc) · 3.53 KB
/
build.yml
File metadata and controls
138 lines (127 loc) · 3.53 KB
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: Build
on:
push:
paths:
- 'apps/**'
- 'lib/**'
- 'ports/**'
- 'src/**'
- '.github/actions/**'
- '.github/workflows/build.yml'
- '.github/workflows/build_util.yml'
- '.github/workflows/build_ghostfat.yml'
pull_request:
branches: [ master ]
paths:
- 'apps/**'
- 'lib/**'
- 'ports/**'
- 'src/**'
- '.github/actions/**'
- '.github/workflows/build.yml'
- '.github/workflows/build_util.yml'
- '.github/workflows/build_ghostfat.yml'
repository_dispatch:
release:
types:
- created
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
json: ${{ steps.set-matrix-json.outputs.matrix }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
- name: Generate matrix json
id: set-matrix-json
run: |
MATRIX_JSON=$(python .github/workflows/ci_set_matrix.py)
echo "matrix=$MATRIX_JSON"
echo "matrix=$MATRIX_JSON" >> $GITHUB_OUTPUT
# ---------------------------------------
# Build ARM
# ---------------------------------------
arm-make:
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
port:
# Alphabetical order
- 'kinetis_k32l2'
- 'lpc55'
- 'mimxrt10xx'
- 'stm32f3'
- 'stm32h7'
- 'stm32l4'
with:
port: ${{ matrix.port }}
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
build-system: 'make'
toolchain: 'arm-gcc'
# ---------------------------------------
# Build ARM with CMake
# ---------------------------------------
arm-cmake:
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
port:
# Alphabetical order by family
- 'maxim'
# - 'stm32f303disco' # overflows flash
- 'stm32f4'
- 'stm32h5'
with:
port: ${{ matrix.port }}
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
build-system: 'cmake'
toolchain: 'arm-gcc'
# ---------------------------------------
# Build ESP
# ---------------------------------------
espressif:
needs: set-matrix
uses: ./.github/workflows/build_util.yml
secrets: inherit
with:
port: 'espressif'
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['espressif'].board) }}
build-system: 'make'
toolchain: 'esp-idf'
toolchain_version: 'v5.3.2'
# ---------------------------------------
# Build RISC-V
# ---------------------------------------
riscv:
if: false
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
port:
# Alphabetical order
- 'ch32v20x'
with:
port: ${{ matrix.port }}
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
build-system: 'make'
toolchain: 'riscv-gcc'
# ---------------------------------------
# Unit testing with ghostfat
# ---------------------------------------
ghostfat:
needs: set-matrix
uses: ./.github/workflows/build_ghostfat.yml
with:
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['test_ghostfat'].board) }}