-
Notifications
You must be signed in to change notification settings - Fork 173
248 lines (228 loc) · 6.9 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
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
name: ESPixelStick CI
on: [push, pull_request, workflow_dispatch]
env:
VERSION_BASE: "4.0"
jobs:
firmware:
strategy:
matrix:
include:
# ESPixelStick V3
- target: "espsv3"
chip: "esp8266"
# Wemos D1 Mini ESP8266
- target: "d1_mini"
chip: "esp8266"
# Wemos D1 Mini PRO ESP8266
- target: "d1_mini_pro"
chip: "esp8266"
# Wemos D1 Mini ESP8266 Plus LoLinSD Card
- target: "d1_mini_lolinsd"
chip: "esp8266"
# ESP01S
- target: "esp01s"
chip: "esp8266"
# Wemos D1 Mini ESP32
- target: "d1_mini32"
chip: "esp32"
# Wemos D1 Mini ESP32
- target: "d1_mini32_eth"
chip: "esp32"
# Lolin D32 Pro
- target: "d32_pro"
chip: "esp32"
# ESP32 Bong69
- target: "esp32_bong69"
chip: "esp32"
# ESP32 CAM
- target: "esp32_cam"
chip: "esp32"
# Lolin D32 Pro eth
- target: "d32_pro_eth"
chip: "esp32"
# TTGO T8
- target: "esp32_ttgo_t8"
chip: "esp32"
# WT 32 Ethernet Board
- target: "esp32_wt32eth01"
chip: "esp32"
# QuinLed QUAD Dig OCTA
- target: "esp32_quinled_dig_octa"
chip: "esp32"
# QuinLed QUAD
- target: "esp32_quinled_quad"
chip: "esp32"
# QuinLed QUAD AE+
- target: "esp32_quinled_quad_ae_plus"
chip: "esp32"
# QuinLed QUAD AE+ 8
- target: "esp32_quinled_quad_ae_plus_8"
chip: "esp32"
# QuinLed QUAD Eth
- target: "esp32_quinled_quad_eth"
chip: "esp32"
# QuinLed UNO
- target: "esp32_quinled_uno"
chip: "esp32"
# QuinLed UNO AE +
- target: "esp32_quinled_uno_ae_plus"
chip: "esp32"
# QuinLed UNO Eth
- target: "esp32_quinled_uno_eth"
chip: "esp32"
# QuinLed UNO Eth
- target: "esp32_quinled_uno_eth_espsv3"
chip: "esp32"
# Wasatch
- target: "esp32_wasatch"
chip: "esp32"
# mh et esp32 mini kit
- target: "d1_mini_mhetesp32minikit"
chip: "esp32"
# Olimex ESP32 Gateway
- target: "olimex_esp32_gw"
chip: "esp32"
# Twilight Lord
- target: "d1_mini_twilightlord"
chip: "esp32"
# Twilight Lord ETH
- target: "d1_mini_twilightlord_eth"
chip: "esp32"
# DEVKITC
- target: "esp32_devkitc"
chip: "esp32"
# M5Stack Atom
- target: "m5stack_atom"
chip: "esp32"
#
- target: "esp3deuxquatro_dmx"
chip: "esp32"
#
- target: "esp32_quinled_uno_espsv3"
chip: "esp32"
#
- target: "esp32_tetra2go"
chip: "esp32"
#
- target: "esp32_octa2go"
chip: "esp32"
# KR Lights
- target: "esp32_kr_lights_msm"
chip: "esp32"
#
- target: "esp32_ka"
chip: "esp32"
#
- target: "esp32_breakdancev2"
chip: "esp32"
runs-on: ubuntu-latest
steps:
# Checkout ESPixelStick
- uses: actions/checkout@v4
- name: Create version file
run: |
mkdir firmware
echo "${VERSION_BASE}-ci${GITHUB_RUN_ID}" > firmware/VERSION
- name: Tagged version release
if: startsWith(github.ref, 'refs/tags/v')
run: |
echo "${GITHUB_REF#refs/*/v}" > firmware/VERSION
- name: Cache pip
uses: actions/cache@v4
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
# Build and move / rename firmware files
# Make sure to update bootloader and boot_app0.bin location when the ESP32 core updates
- name: Compile for ${{ matrix.target }}
env:
chip: ${{ matrix.chip }}
run: |
pio run -e ${{ matrix.target }}
ls -al ./firmware/${{ matrix.chip }}
ls -al ./debug/${{ matrix.chip }}
- name: Upload Firmware Artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-binary-${{ matrix.target }}
path: firmware
- name: Upload Debugging Artifacts
uses: actions/upload-artifact@v4
with:
name: firmware-debug-${{ matrix.target }}
path: debug
package:
needs: firmware
runs-on: ubuntu-latest
steps:
# Checkout ESPixelStick
- uses: actions/checkout@v4
- name: Set release flag
if: startsWith(github.ref, 'refs/tags/v')
run: |
echo "ESPS_RELEASE=''" >> $GITHUB_ENV
# Download firmware binary artifact
- uses: actions/download-artifact@v4
with:
path: dist/firmware
pattern: firmware-binary-*
merge-multiple: true
# Install Node
- uses: actions/setup-node@v4
with:
node-version: "20"
- run: npm install
# Build and move the web pages
- name: Compile Web Pages
run: |
gulp
gulp md
if [ -z "$ESPS_RELEASE" ]; then
gulp ci
fi
mv data/* dist/fs
- name: Set release archive filename
run: |
_VERSION=$(< dist/firmware/VERSION)
echo "ARCHFILE=ESPixelStick_Firmware-${_VERSION}.zip" >> $GITHUB_ENV
- name: Update firmware.json
run: python .scripts/ci-firmware.py
- name: Create Release Archive
run: zip -r ../${{ env.ARCHFILE }} *
working-directory: dist
- name: Upload Release Artifact
uses: actions/upload-artifact@v4
with:
name: Release Archive
path: ${{ env.ARCHFILE }}
release:
needs: package
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download Package
uses: actions/download-artifact@v4
with:
name: Release Archive
- name: Create Draft Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
prerelease: true
files: ESPixelStick_Firmware*.zip