-
Notifications
You must be signed in to change notification settings - Fork 2.5k
261 lines (218 loc) · 11.1 KB
/
Copy pathexamples-esp32.yaml
File metadata and controls
261 lines (218 loc) · 11.1 KB
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
249
250
251
252
253
254
255
256
257
258
259
260
261
# Copyright (c) 2020 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Build example - ESP32
on:
push:
branches:
- master
- 'v*-branch'
pull_request:
merge_group:
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ (github.event_name == 'pull_request' && github.event.number) || (github.event_name == 'workflow_dispatch' && github.run_number) || github.sha }}
cancel-in-progress: true
env:
CHIP_LOG_TIMESTAMPS: false
jobs:
esp32:
name: ESP32
runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]'
container:
image: ghcr.io/project-chip/chip-build-esp32:211
volumes:
- "/:/runner-root-volume"
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Checkout submodules
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: esp32
- name: Set up environment for size reports
uses: ./.github/actions/setup-size-reports
if: ${{ !env.ACT }}
with:
gh-context: ${{ toJson(github) }}
- name: Build example All Clusters App(Target:ESP32C3)
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target esp32-c3devkit-all-clusters \
build \
--copy-artifacts-to out/artifacts \
"
- name: Prepare bloat report
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
esp32 c3devkit all-clusters-app \
out/esp32-c3devkit-all-clusters/chip-all-clusters-app.elf \
/tmp/bloat_reports/
- name: Remove built artifacts for all-clusters
run: rm -rf out/esp32-c3devkit-all-clusters examples/all-clusters-app/esp32/managed_components
- name: Prepare code pregen and ensure compile time pregen not possible
run: |
./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
mv scripts/codegen.py scripts/codegen.py.renamed
mv scripts/tools/zap/generate.py scripts/tools/zap/generate.py.renamed
- name: Clean output
run: rm -rf ./out
- name: Build some M5Stack variations with pregen
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target esp32-m5stack-all-clusters-minimal \
--pregen-dir ./zzz_pregenerated \
build \
--copy-artifacts-to out/artifacts \
"
- name: Undo code pregeneration changes
run: |
rm -rf ./zzz_pregenerated
mv scripts/codegen.py.renamed scripts/codegen.py
mv scripts/tools/zap/generate.py.renamed scripts/tools/zap/generate.py
- name: Remove built artifacts for all-clusters-minimal
run: rm -rf out/esp32-m5stack-all-clusters-minimal examples/all-clusters-minimal-app/esp32/managed_components
- name: Check for changed paths
uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4
id: changed_paths
with:
filters: |
pigweed:
- 'src/pw_backends/**'
- 'third_party/pigweed/**'
energy_gateway:
- 'examples/energy-gateway-app/**'
- 'src/app/clusters/commodity-metering-server/**'
- 'src/app/clusters/commodity-price-server/**'
- 'src/app/clusters/commodity-tariff-server/**'
- 'src/app/clusters/electrical-grid-conditions-server/**'
- 'src/app/clusters/meter-identification-server/**'
evse:
- 'examples/evse-app/**'
- 'src/app/clusters/device-energy-management-server/**'
- 'src/app/clusters/electrical-energy-measurement-server/**'
- 'src/app/clusters/electrical-power-measurement-server/**'
- 'src/app/clusters/energy-evse-server/**'
- 'src/app/clusters/power-topology-server/**'
- name: Build example All Clusters App(Target:ESP32, pigweed RPC, IPv6 Only)
if: steps.changed_paths.outputs.pigweed == 'true'
run: |
./scripts/run_in_build_env.sh \
"./scripts/build/build_examples.py \
--enable-flashbundle \
--target esp32-devkitc-all-clusters-rpc-ipv6only \
build \
--copy-artifacts-to out/artifacts \
"
- name: Remove built artifacts for all-clusters-rpc-ipv6only
run: rm -rf out/esp32-devkitc-all-clusters-rpc-ipv6only examples/all-clusters-app/esp32/managed_components
- name: Build example Lighting App (Target:ESP32C6)
run: |
scripts/examples/esp_example.sh lighting-app sdkconfig.wifi_thread.defaults esp32c6
rm -rf examples/lighting-app/esp32/{build,managed_components}
- name: Build example All Clusters App (Target:ESP32P4, Ethernet)
run: |
scripts/examples/esp_example.sh all-clusters-app sdkconfig.eth.esp32p4 esp32p4
rm -rf examples/all-clusters-app/esp32/{build,managed_components}
- name: Build example Lighting App (external platform)
run: |
scripts/examples/esp_example.sh lighting-app sdkconfig.ext_plat.defaults
rm -rf examples/lighting-app/esp32/{build,managed_components}
- name: Build example All Devices App
run: |
scripts/examples/esp_example.sh all-devices-app sdkconfig.defaults
rm -rf examples/all-devices-app/esp32/{build,managed_components}
- name: Build example Energy Gateway App
if: steps.changed_paths.outputs.energy_gateway == 'true'
run: |
scripts/examples/esp_example.sh energy-gateway-app sdkconfig.defaults
rm -rf examples/energy-gateway-app/esp32/{build,managed_components}
- name: Build example EVSE App
if: steps.changed_paths.outputs.evse == 'true'
run: |
scripts/examples/esp_example.sh evse-app sdkconfig.defaults
rm -rf examples/evse-app/esp32/{build,managed_components}
- name: Build example Water Heater App
if: steps.changed_paths.outputs.water_heater == 'true'
run: |
scripts/examples/esp_example.sh water-heater-app sdkconfig.defaults
rm -rf examples/water-heater-app/esp32/{build,managed_components}
- name: Uploading Size Reports
uses: ./.github/actions/upload-size-reports
if: ${{ !env.ACT }}
with:
platform-name: ESP32
- name: Notify Slack on Failure
if: failure()
uses: ./.github/actions/notify-slack-failure
with:
slack-webhook: ${{ secrets.SWTT_SLACK_WEBHOOK }}
esp32_1:
name: ESP32_1
runs-on: ubuntu-latest
if: github.actor != 'restyled-io[bot]' && github.repository_owner == 'espressif'
container:
image: ghcr.io/project-chip/chip-build-esp32:211
volumes:
- "/:/runner-root-volume"
- "/tmp/bloat_reports:/tmp/bloat_reports"
steps:
- name: Checkout
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- name: Checkout submodules & Bootstrap
uses: ./.github/actions/checkout-submodules-and-bootstrap
with:
platform: esp32
- name: Build example Bridge App
run: scripts/examples/esp_example.sh bridge-app
- name: Build example Persistent Storage App
run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults
- name: Build example Shell App
run: scripts/examples/esp_example.sh shell sdkconfig.defaults
- name: Build example Temperature Measurement App
run: scripts/examples/esp_example.sh temperature-measurement-app sdkconfig.optimize.defaults
- name: Build example OTA Requestor App
run: scripts/examples/esp_example.sh ota-requestor-app sdkconfig.defaults
- name: Build example OTA Provider App
run: scripts/examples/esp_example.sh ota-provider-app sdkconfig.defaults
- name: Build example Light Switch App (Target:ESP32C3)
run: scripts/examples/esp_example.sh light-switch-app sdkconfig.defaults esp32c3
- name: Build example Energy Gateway App
run: scripts/examples/esp_example.sh energy-gateway-app sdkconfig.defaults
- name: Build example EVSE App
run: scripts/examples/esp_example.sh evse-app sdkconfig.defaults
- name: Build example LIT ICD App (Target:ESP32H2)
run: scripts/examples/esp_example.sh lit-icd-app sdkconfig.defaults esp32h2
- name: Build example Lock App (Target:ESP32C6)
run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults esp32c6
- name: Build example thread-br-app (Target:ESP32S3)
shell: bash
run: |
cd $IDF_PATH
cd examples/openthread/ot_rcp
source $IDF_PATH/export.sh
idf.py set-target esp32h2
idf.py build
source $IDF_PATH/export.sh
cd $GITHUB_WORKSPACE
scripts/examples/esp_example.sh thread-br-app sdkconfig.defaults esp32s3
- name: Notify Slack on Failure
if: failure()
uses: ./.github/actions/notify-slack-failure
with:
slack-webhook: ${{ secrets.SWTT_SLACK_WEBHOOK }}