Skip to content

Commit 3305123

Browse files
andy31415andreilitvin
authored andcommitted
Fix order logic in no-codegen-expected check (#25828)
* Fix order logic in codegen check * Fix the reporting order too * Ensure "no codegen" check is done against a clean output. * Fix bloat check location --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com>
1 parent f59eac0 commit 3305123

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.github/workflows/build.yaml

+4-2
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,8 @@ jobs:
261261
run: |
262262
./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
263263
mv scripts/codegen.py scripts/codegen.py.renamed
264+
- name: Clean output
265+
run: rm -rf ./out
264266
- name: Build using build_examples.py (pregen)
265267
timeout-minutes: 60
266268
run: |
@@ -273,10 +275,10 @@ jobs:
273275
"
274276
- name: Check no code generation in output
275277
run: |
276-
CNT=$(find -name "CHIPClusters.h" out | wc -l)
278+
CNT=$(find out -name "CHIPClusters.h" | wc -l)
277279
if [ "${CNT}" != "0" ]; then
278280
echo "ERROR: found unexpected generated files:"
279-
find -name "CHIPClusters.h" out
281+
find out -name "CHIPClusters.h"
280282
exit 1
281283
fi
282284
- name: Undo code pre-generation changes (make compile time codegen work again)

.github/workflows/examples-esp32.yaml

+10-8
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,18 @@ jobs:
8787
build \
8888
--copy-artifacts-to out/artifacts \
8989
"
90+
- name: Prepare bloat report
91+
run: |
92+
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
93+
esp32 m5stack all-clusters-app \
94+
out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \
95+
/tmp/bloat_reports/
9096
- name: Prepare code pregen and ensure compile time pregen not possible
9197
run: |
9298
./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
9399
mv scripts/codegen.py scripts/codegen.py.renamed
100+
- name: Clean output
101+
run: rm -rf ./out
94102
- name: Build some M5Stack variations with pregen
95103
timeout-minutes: 60
96104
run: |
@@ -105,22 +113,16 @@ jobs:
105113
"
106114
- name: Check no code generation in output
107115
run: |
108-
CNT=$(find -name "CHIPClusters.h" out | wc -l)
116+
CNT=$(find out -name "CHIPClusters.h" | wc -l)
109117
if [ "${CNT}" != "0" ]; then
110118
echo "ERROR: found unexpected generated files:"
111-
find -name "CHIPClusters.h" out
119+
find out -name "CHIPClusters.h"
112120
exit 1
113121
fi
114122
- name: Undo code pregeneration changes
115123
run: |
116124
rm -rf ./zzz_pregenerated
117125
mv scripts/codegen.py.renamed scripts/codegen.py
118-
- name: Prepare bloat report
119-
run: |
120-
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
121-
esp32 m5stack all-clusters-app \
122-
out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \
123-
/tmp/bloat_reports/
124126
- name: Build example All Clusters App C3
125127
timeout-minutes: 15
126128
run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults

scripts/setup/requirements.esp32.txt

-2
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ kconfiglib==13.7.1
1010
construct==2.10.54
1111
python-socketio<5
1212
gdbgui==0.13.2.0 ; platform_machine != 'aarch64' and sys_platform == 'linux'
13-
jinja2<3.1
14-
itsdangerous<2.1

0 commit comments

Comments
 (0)