-
Notifications
You must be signed in to change notification settings - Fork 5
143 lines (130 loc) · 6.03 KB
/
ZeDMD.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
name: ZeDMD
on:
push:
pull_request:
jobs:
version:
name: Detect version
runs-on: ubuntu-latest
outputs:
tag: ${{ steps.version.outputs.tag }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- id: version
run: |
VERSION_MAJOR=$(grep -Eo "ZEDMD_VERSION_MAJOR\s+[0-9]+" src/version.h | grep -Eo "[0-9]+")
VERSION_MINOR=$(grep -Eo "ZEDMD_VERSION_MINOR\s+[0-9]+" src/version.h | grep -Eo "[0-9]+")
VERSION_PATCH=$(grep -Eo "ZEDMD_VERSION_PATCH\s+[0-9]+" src/version.h | grep -Eo "[0-9]+")
TAG="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}"
echo "${TAG}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
pio-run:
runs-on: ubuntu-latest
needs: [ version ]
strategy:
matrix:
panels: ['128x32', '256x64', '128x64', 'S3-N16R8_128x32', 'S3-N16R8_128x32_UART', 'S3-N16R8_256x64', 'S3-N16R8_256x64_UART', 'S3-N16R8_128x64', 'S3-N16R8_128x64_UART', 'LilygoS3Amoled_128x32', 'LilygoS3Amoled_128x32_wifi']
name: ZeDMD ${{ matrix.panels }}
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Cache PlatformIO
uses: actions/cache@v4
with:
path: ~/.platformio
key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }}
- name: Install PlatformIO
run: |
python -m pip install --upgrade pip
pip install --upgrade platformio
- if: (matrix.panels == '128x32' || matrix.panels == '256x64'|| matrix.panels == '128x64')
name: Build ZeDMD
run: |
pio run -e ${{ matrix.panels }}
pio run -e ${{ matrix.panels }} -t buildfs
python ~/.platformio/packages/tool-esptoolpy/esptool.py --chip esp32 merge_bin -o ZeDMD.bin --flash_mode dio --flash_size 4MB \
0x1000 .pio/build/${{ matrix.panels }}/bootloader.bin \
0x8000 .pio/build/${{ matrix.panels }}/partitions.bin \
0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \
0x10000 .pio/build/${{ matrix.panels }}/firmware.bin \
0x210000 .pio/build/${{ matrix.panels }}/littlefs.bin
- if: (matrix.panels == 'S3-N16R8_128x32' || matrix.panels == 'S3-N16R8_256x64' || matrix.panels == 'S3-N16R8_128x64' || matrix.panels == 'S3-N16R8_128x32_UART' || matrix.panels == 'S3-N16R8_256x64_UART' || matrix.panels == 'S3-N16R8_128x64_UART' || matrix.panels == 'LilygoS3Amoled_128x32' || matrix.panels == 'LilygoS3Amoled_128x32_wifi')
name: Build ZeDMD S3
run: |
pio run -e ${{ matrix.panels }}
pio run -e ${{ matrix.panels }} -t buildfs
python ~/.platformio/packages/tool-esptoolpy/esptool.py --chip esp32s3 merge_bin -o ZeDMD.bin --flash_mode dio --flash_size 16MB \
0x0000 .pio/build/${{ matrix.panels }}/bootloader.bin \
0x8000 .pio/build/${{ matrix.panels }}/partitions.bin \
0xe000 ~/.platformio/packages/framework-arduinoespressif32/tools/partitions/boot_app0.bin \
0x10000 .pio/build/${{ matrix.panels }}/firmware.bin \
0x650000 .pio/build/${{ matrix.panels }}/littlefs.bin
- uses: actions/upload-artifact@v4
with:
name: ZeDMD-${{ matrix.panels }}
path: ZeDMD.bin
post-build:
runs-on: ubuntu-latest
needs: [ version, pio-run ]
name: Release
steps:
- uses: actions/download-artifact@v4
- name: Package
if: startsWith(github.ref, 'refs/tags/')
run: |
cd ZeDMD-128x32
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-128x32.zip ZeDMD.bin version.txt
cd ../ZeDMD-256x64
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-256x64.zip ZeDMD.bin version.txt
cd ../ZeDMD-128x64
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-128x64.zip ZeDMD.bin version.txt
cd ../ZeDMD-S3-N16R8_128x32
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-S3-N16R8_128x32.zip ZeDMD.bin version.txt
cd ../ZeDMD-S3-N16R8_128x32_UART
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-S3-N16R8_128x32_UART.zip ZeDMD.bin version.txt
cd ../ZeDMD-S3-N16R8_256x64
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-S3-N16R8_256x64.zip ZeDMD.bin version.txt
cd ../ZeDMD-S3-N16R8_256x64_UART
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-S3-N16R8_256x64_UART.zip ZeDMD.bin version.txt
cd ../ZeDMD-S3-N16R8_128x64
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-S3-N16R8_128x64.zip ZeDMD.bin version.txt
cd ../ZeDMD-S3-N16R8_128x64_UART
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-S3-N16R8_128x64_UART.zip ZeDMD.bin version.txt
cd ../ZeDMD-LilygoS3Amoled_128x32
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-LilygoS3Amoled_128x32.zip ZeDMD.bin version.txt
cd ../ZeDMD-LilygoS3Amoled_128x32_wifi
echo "${{ needs.version.outputs.tag }}" > version.txt
zip ../ZeDMD-LilygoS3Amoled_128x32_wifi.zip ZeDMD.bin version.txt
cd ..
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
files: |
ZeDMD-128x32.zip
ZeDMD-256x64.zip
ZeDMD-128x64.zip
ZeDMD-S3-N16R8_128x32.zip
ZeDMD-S3-N16R8_256x64.zip
ZeDMD-S3-N16R8_128x64.zip
ZeDMD-S3-N16R8_128x32_UART.zip
ZeDMD-S3-N16R8_256x64_UART.zip
ZeDMD-S3-N16R8_128x64_UART.zip
ZeDMD-LilygoS3Amoled_128x32.zip
ZeDMD-LilygoS3Amoled_128x32_wifi.zip