-
Notifications
You must be signed in to change notification settings - Fork 41
200 lines (173 loc) · 7.77 KB
/
release.yaml
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
name: ESPSomfy-RTS Release
on:
release:
types: [published]
env:
ARDUINO_BOARD_MANAGER_ADDITIONAL_URLS: "https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json"
ARDUINO_CLI_VERSION: "0.x"
ARDUINO_ESP32_VERSION: "2.0.17"
ARDUINO_JSON_VERSION: "6.21.5"
ESPTOOL_VERSION: "4.7"
LITTLEFS_VERSION: "v2.5.1"
MKLITTLEFS_VERSION: "3.1.0"
PUB_SUB_CLIENT_VERSION: "2.8.0"
PYTHON_VERSION: "3.10"
SMARTRC_CC1101_VERSION: "2.5.7"
WEB_SOCKET_VERSION: "2.4.0"
jobs:
littlefs:
name: LittleFS
runs-on: ubuntu-latest
steps:
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Check out code
uses: actions/checkout@v4
- name: Checkout mklittlefs
uses: actions/checkout@v4
with:
repository: earlephilhower/mklittlefs
path: mklittlefs
ref: ${{ env.MKLITTLEFS_VERSION }}
- name: Checkout LittleFS
uses: actions/checkout@v4
with:
repository: littlefs-project/littlefs
path: mklittlefs/littlefs
ref: ${{ env.LITTLEFS_VERSION }}
- name: Build mklittlefs
run: |
make -C mklittlefs
- name: Create LittleFS
run: |
./mklittlefs/mklittlefs --create data --size 1441792 SomfyController.littlefs.bin
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: LittleFS
path: SomfyController.littlefs.bin
retention-days: 5
- name: Upload LittleFS
uses: shogo82148/[email protected]
with:
github_token: ${{ github.token }}
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: SomfyController.littlefs.bin
asset_path: SomfyController.littlefs.bin
overwrite: true
arduino:
permissions: write-all
name: ${{ matrix.name }}
needs: [littlefs]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- board: esp32
addr_bootloader: 0x1000
chip: ESP32
fqbn: esp32:esp32:esp32wrover:PartitionScheme=default,FlashMode=qio,FlashFreq=80,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
# esp32:esp32:esp32wrover:PartitionScheme=default,FlashMode=qio,FlashFreq=80,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
name: ESP32
obname: SomfyController.onboard.esp32.bin
fwname: SomfyController.ino.esp32.bin
- board: esp32c3
addr_bootloader: 0x0
chip: ESP32-C3
fqbn: esp32:esp32:esp32c3:JTAGAdapter=default,CDCOnBoot=default,PartitionScheme=default,CPUFreq=160,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
# esp32:esp32:esp32c3:JTAGAdapter=default,CDCOnBoot=default,PartitionScheme=default,CPUFreq=160,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
name: ESP32C3
obname: SomfyController.onboard.esp32c3.bin
fwname: SomfyController.ino.esp32c3.bin
- board: esp32s2
addr_bootloader: 0x1000
chip: ESP32-S2
fqbn: esp32:esp32:esp32s2:JTAGAdapter=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
# esp32:esp32:esp32s2:JTAGAdapter=default,CDCOnBoot=default,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
name: ESP32S2
obname: SomfyController.onboard.esp32s2.bin
fwname: SomfyController.ino.esp32s2.bin
- board: esp32s3
addr_bootloader: 0x0
chip: ESP32-S3
fqbn: esp32:esp32:esp32s3:JTAGAdapter=default,PSRAM=disabled,FlashMode=qio,FlashSize=4M,LoopCore=1,EventsCore=1,USBMode=hwcdc,CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PartitionScheme=default,CPUFreq=240,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
# esp32:esp32:esp32s3:JTAGAdapter=default,PSRAM=disabled,FlashMode=qio,FlashSize=4M,LoopCore=1,EventsCore=1,USBMode=hwcdc,CDCOnBoot=cdc,MSCOnBoot=default,DFUOnBoot=default,UploadMode=default,PartitionScheme=default,CPUFreq=240,UploadSpeed=921600,DebugLevel=none,EraseFlash=none
name: ESP32S3
fwname: SomfyController.ino.esp32s3.bin
obname: SomfyController.onboard.esp32s3.bin
steps:
- name: Get Release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Check out code
uses: actions/checkout@v4
with:
path: SomfyController
- name: Get LittleFS
uses: actions/download-artifact@v4
with:
name: LittleFS
- name: Install Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
pip --version
- name: Install ESPTool
run: |
pip install esptool==${{ env.ESPTOOL_VERSION }}
- name: Install Arduino CLI
uses: arduino/setup-arduino-cli@v1
with:
version: ${{ env.ARDUINO_CLI_VERSION }}
- name: Configure Arduino CLI
run: |
arduino-cli core update-index
arduino-cli core install esp32:esp32@${{ env.ARDUINO_ESP32_VERSION }}
- name: Configure Arduino Libraries
run: |
arduino-cli lib install ArduinoJson@${{ env.ARDUINO_JSON_VERSION }}
arduino-cli lib install PubSubClient@${{ env.PUB_SUB_CLIENT_VERSION }}
arduino-cli lib install SmartRC-CC1101-Driver-Lib@${{ env.SMARTRC_CC1101_VERSION }}
arduino-cli lib install WebSockets@${{ env.WEB_SOCKET_VERSION }}
- name: Build ${{ matrix.name }}
run: |
mkdir -p build${{ matrix.name }}
arduino-cli compile --clean --output-dir build${{ matrix.name }} --fqbn ${{ matrix.fqbn }} --warnings none ./SomfyController
- name: ${{ matrix.name }} Image
run: |
python -m esptool --chip ${{ matrix.chip }} \
merge_bin -o ${{ matrix.obname }} \
${{ matrix.addr_bootloader }} build${{ matrix.name }}/SomfyController.ino.bootloader.bin \
0x8000 build${{ matrix.name }}/SomfyController.ino.partitions.bin \
0x10000 build${{ matrix.name }}/SomfyController.ino.bin \
0x290000 SomfyController.littlefs.bin
- name: Upload Firmware ${{ matrix.name }}
uses: shogo82148/[email protected]
with:
github_token: ${{ github.token }}
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: ${{ matrix.fwname }}
asset_path: build${{ matrix.name }}/SomfyController.ino.bin
- name: ${{ matrix.name }} Compress Onboard Image
run: |
zip ${{ matrix.obname }}.zip ./${{ matrix.obname }}
- name: Upload Onboard ${{ matrix.name }}
uses: shogo82148/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
with:
github_token: ${{ github.token }}
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_name: ${{ matrix.obname }}.zip
asset_path: ${{ matrix.obname }}.zip
overwrite: true
asset_content_type: application/zip