-
-
Notifications
You must be signed in to change notification settings - Fork 42
194 lines (178 loc) · 8.31 KB
/
ArduinoBuild.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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: ArduinoBuild
on:
push:
paths:
- '**.ino'
- '**.cpp'
- '**.hpp'
- '**.h'
- '**.c'
- '**ArduinoBuild.yml'
pull_request:
release:
types: [published]
jobs:
matrix_build:
name: ${{ matrix.matrix-context }}@${{ matrix.sdk-version }}
runs-on: ubuntu-latest
strategy:
matrix:
sdk-version:
#- 1.0.6
#- 2.0.0
#- 2.0.1
# - 2.0.2 # has broken SD Support
#- 2.0.3
#- 2.0.4
#- 2.0.5
#- 2.0.6
# - 2.0.7
# - 2.0.8
# - 2.0.9
- 2.0.11
- 2.0.12
- 2.0.13
matrix-context:
- M5Core2-test
- M5Stack-test
- M5StickC-test
- LGFX-test
- M5Unified-test
- S3Box-Test
#- TTGO-LoRa32-V2-test
- M5Stack
- M5Core2
- M5Fire
- OdroidGo
- SdFat-test
#exclude:
#- sdk-version: 2.0.2 # has broken SD Support
# There's no esp32s3box support before 2.0.3
#- { matrix-context: S3Box-Test, sdk-version: 1.0.6 }
#- { matrix-context: S3Box-Test, sdk-version: 2.0.0 }
#- { matrix-context: S3Box-Test, sdk-version: 2.0.1 }
#- { matrix-context: S3Box-Test sdk-version: 2.0.2 }
#- { matrix-context: S3Box-Test, sdk-version: 2.0.4 } # will be fixed in 2.0.5 https://github.com/espressif/arduino-esp32/pull/6962/files
#- { matrix-context: M5Core2-test, sdk-version: 1.0.6 } # M5Core2.h suddenly ceased to support espressif package 1.0.6/2.0.0 (I2S and I2C broken)
include:
# buildable sdk versions
#- sdk-version: 1.0.6
#- sdk-version: 2.0.0
#- sdk-version: 2.0.1
#- sdk-version: 2.0.5
#- sdk-version: 2.0.6
# - sdk-version: 2.0.7
# - sdk-version: 2.0.8
# - sdk-version: 2.0.9
- sdk-version: 2.0.11
- sdk-version: 2.0.12
- sdk-version: 2.0.13
# library health test sketches
- { matrix-context: M5Core2-test, arduino-board: m5stack-core2, sketch-names: M5Core2-SDLoader-Snippet.ino, required-libraries: "M5Core2", ... }
- { matrix-context: M5Stack-test, arduino-board: m5stack-core-esp32, sketch-names: M5Stack-SDLoader-Snippet.ino, required-libraries: "ESP32-Chimera-Core,LovyanGFX", ... }
- { matrix-context: S3Box-Test, arduino-board: esp32s3box, sketch-names: M5Stack-SDLoader-Snippet.ino, required-libraries: "ESP32-Chimera-Core,LovyanGFX", ... }
- { matrix-context: M5Unified-test, arduino-board: m5stack-core2, sketch-names: M5Unified.ino, required-libraries: "M5GFX,M5Unified", ... }
- { matrix-context: M5StickC-test, arduino-board: m5stick-c, sketch-names: M5StickC-SPIFFS-Loader-Snippet.ino, required-libraries: "M5StickC", ... }
- { matrix-context: LGFX-test, arduino-board: m5stack-core-esp32, sketch-names: LGFX-SDLoader-Snippet.ino, required-libraries: "LovyanGFX", ... }
- { matrix-context: SdFat-test, arduino-board: m5stack-core2, sketch-names: SdFatUpdater.ino, required-libraries: "SdFat,M5GFX,M5Unified", ... }
# Launcher and Appstore
- matrix-context: M5Stack
arduino-board: m5stack-core-esp32
sketch-names: M5Stack-SD-Menu.ino,AppStore.ino
launcher-name: M5stack-Launcher
appstore-name: M5stack-AppStore
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"
- matrix-context: M5Core2
arduino-board: m5stack-core2
sketch-names: M5Stack-SD-Menu.ino,AppStore.ino
launcher-name: M5Core2-Launcher
appstore-name: M5Core2-AppStore
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"
- matrix-context: M5Fire
arduino-board: m5stack-fire
sketch-names: M5Stack-SD-Menu.ino,AppStore.ino
launcher-name: M5Fire-Launcher
appstore-name: M5Fire-AppStore
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"
- matrix-context: OdroidGo
arduino-board: odroid_esp32
sketch-names: M5Stack-SD-Menu.ino,AppStore.ino
launcher-name: OdroidGo-Launcher
appstore-name: OdroidGo-AppStore
extra-fqbn: ":PartitionScheme=min_spiffs"
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson,Button2"
#- matrix-context: TTGO-LoRa32-V2-test
#arduino-board: ttgo-lora32-v2
#sketch-names: TTGO-test.ino
#required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson"
- matrix-context: M5Atom
sdk-version: 2.0.13
arduino-board: m5stack-atom
sketch-names: M5Stack-SD-Menu.ino
launcher-name: M5Atom-Launcher
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson,Button2"
- matrix-context: M5CoreS3
sdk-version: 2.0.13
arduino-board: m5stack-cores3
sketch-names: M5Stack-SD-Menu.ino,M5Stack-FW-Menu.ino
launcher-name: M5CoreS3-Launcher
factory-name: M5CoreS3-FW-Launcher
required-libraries: "ESP32-Chimera-Core,LovyanGFX,ArduinoJson,Button2"
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: ${{ matrix.matrix-context }}
uses: ArminJo/arduino-test-compile@v3.2.0
with:
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
#platform-url: ${{ matrix.platform-url }}
arduino-board-fqbn: esp32:esp32:${{ matrix.arduino-board}}${{ matrix.extra-fqbn }}
arduino-platform: esp32:esp32@${{ matrix.sdk-version }}
required-libraries: ESP32-targz,${{ matrix.required-libraries }}
extra-arduino-lib-install-args: --no-deps
# extra-arduino-cli-args: ${{ matrix.extra-arduino-cli-args }}
extra-arduino-cli-args: "--warnings default " # see https://github.com/ArminJo/arduino-test-compile/issues/28
sketch-names: ${{ matrix.sketch-names }}
set-build-path: true
build-properties: ${{ toJson(matrix.build-properties) }}
#debug-install: true
- name: Copy compiled binaries
if: startsWith(matrix.sketch-names, 'M5Stack-SD-Menu')
run: |
cp examples/M5Stack-SD-Menu/build/M5Stack-SD-Menu.ino.bin examples/M5Stack-SD-Menu/build/${{ matrix.launcher-name }}-${{ matrix.sdk-version }}.bin
FILE=examples/AppStore/build/AppStore.ino.bin && [ -f "$FILE" ] && cp $FILE examples/M5Stack-SD-Menu/build/${{ matrix.appstore-name }}-${{ matrix.sdk-version }}.bin || true
FILE=examples/M5Stack-FW-Menu/build/M5Stack-FW-Menu.ino.bin && [ -f "$FILE" ] && cp $FILE examples/M5Stack-SD-Menu/build/${{ matrix.factory-name }}-${{ matrix.sdk-version }}.bin || true
- name: Upload artifact ${{ matrix.matrix-context }}
uses: actions/upload-artifact@v3
if: startsWith(matrix.sketch-names, 'M5Stack-SD-Menu')
with:
name: ${{ matrix.matrix-context }}
path: |
examples/M5Stack-SD-Menu/build/${{ matrix.launcher-name }}-${{ matrix.sdk-version }}.bin
examples/M5Stack-SD-Menu/build/${{ matrix.appstore-name }}-${{ matrix.sdk-version }}.bin
examples/M5Stack-SD-Menu/build/${{ matrix.factory-name }}-${{ matrix.sdk-version }}.bin
post_build:
name: Gather Artefacts
runs-on: ubuntu-latest
# wait until matrix jobs are all finished
needs: matrix_build
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create artifacts dir
#if: startsWith(github.ref, 'refs/tags/')
run: mkdir -p /home/runner/builds
- name: Download artifacts
uses: actions/download-artifact@v3
#if: startsWith(github.ref, 'refs/tags/')
with:
path: builds
- name: Release check
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
/home/runner/work/M5Stack-SD-Updater/M5Stack-SD-Updater/builds/**