-
-
Notifications
You must be signed in to change notification settings - Fork 43
156 lines (144 loc) · 6.96 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
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:
- 2.0.12
- 2.0.13
- 2.0.14
matrix-context:
- M5Core2-test
- M5Stack-test
- M5StickC-test
- LGFX-test
- M5Unified-test
- S3Box-Test
- M5Stack
- M5Core2
- M5Fire
- OdroidGo
- SdFat-test
include:
- sdk-version: 2.0.12
- sdk-version: 2.0.13
- sdk-version: 2.0.14
# 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 # TODO: add https://github.com/shikarunochi/CardputerSimpleLaucher
- 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: M5Atom
sdk-version: 2.0.14
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.14
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@v4
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_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@v4
if: startsWith(matrix.sketch-names, 'M5Stack-SD-Menu')
with:
name: ${{ matrix.matrix-context }}-${{ matrix.sdk-version }}
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@v4
- name: Create artifacts dir
#if: startsWith(github.ref, 'refs/tags/')
run: mkdir -p /home/runner/builds
- name: Download artifacts
uses: actions/download-artifact@v4
#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/**