forked from adafruit/tinyuf2
-
Notifications
You must be signed in to change notification settings - Fork 0
158 lines (143 loc) · 4 KB
/
build.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
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
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/[email protected]
- 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:
if: false
needs: set-matrix
uses: ./.github/workflows/build_util.yml
strategy:
fail-fast: false
matrix:
port:
# Alphabetical order
- 'kinetis_k32l2'
- 'lpc55'
- 'mimxrt10xx'
- 'stm32f3'
- 'stm32f4'
- 'stm32l4'
with:
port: ${{ matrix.port }}
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)[matrix.port].board) }}
build-system: 'make'
toolchain: 'arm-gcc'
# ---------------------------------------
# Build ESP
# ---------------------------------------
esp:
#if: false
needs: set-matrix
uses: ./.github/workflows/build_util.yml
secrets: inherit
with:
port: 'espressif'
boards: '["charachorder_lite_s2", "charachorder_x_s2", "charachorder_engine_s2", "charachorder_two_s3", "charachorder_m4g_s3"]'
build-system: 'make'
toolchain: 'esp-idf'
toolchain_version: 'v5.1.4'
# ---------------------------------------
# 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:
if: false
needs: set-matrix
uses: ./.github/workflows/build_ghostfat.yml
with:
boards: ${{ toJSON(fromJSON(needs.set-matrix.outputs.json)['test_ghostfat'].board) }}
# ---------------------------------------
# Build ARM with CMake
# ---------------------------------------
arm-cmake:
if: false
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
# Alphabetical order by family
- 'metro_m7_1011'
# - 'stm32f303disco' # overflows flash
- 'stm32f411ve_discovery'
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true
- name: Fetch tags
run: git fetch --tags
- name: Install ARM GCC
uses: carlosperate/arm-none-eabi-gcc-action@v1
with:
release: '11.2-2022.02'
- name: Get Dependencies
run: |
sudo apt install -y ninja-build
python tools/get_deps.py --board ${{ matrix.board }}
- name: Build
run: |
cmake . -B _build -G Ninja -DCMAKE_BUILD_TYPE=MinSizeRel -DBOARD=${{ matrix.board }}
cmake --build _build