Skip to content

Commit

Permalink
Fix order logic in no-codegen-expected check (#25828)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Jul 12, 2023
1 parent 3513b86 commit 2007345
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,8 @@ jobs:
run: |
./scripts/run_in_build_env.sh "./scripts/codepregen.py ./zzz_pregenerated"
mv scripts/codegen.py scripts/codegen.py.renamed
- name: Clean output
run: rm -rf ./out
- name: Build using build_examples.py (pregen)
timeout-minutes: 60
run: |
Expand All @@ -273,10 +275,10 @@ jobs:
"
- name: Check no code generation in output
run: |
CNT=$(find -name "CHIPClusters.h" out | wc -l)
CNT=$(find out -name "CHIPClusters.h" | wc -l)
if [ "${CNT}" != "0" ]; then
echo "ERROR: found unexpected generated files:"
find -name "CHIPClusters.h" out
find out -name "CHIPClusters.h"
exit 1
fi
- name: Undo code pre-generation changes (make compile time codegen work again)
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,18 @@ jobs:
build \
--copy-artifacts-to out/artifacts \
"
- name: Prepare bloat report
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
esp32 m5stack all-clusters-app \
out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \
/tmp/bloat_reports/
- 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
- name: Clean output
run: rm -rf ./out
- name: Build some M5Stack variations with pregen
timeout-minutes: 60
run: |
Expand All @@ -105,22 +113,16 @@ jobs:
"
- name: Check no code generation in output
run: |
CNT=$(find -name "CHIPClusters.h" out | wc -l)
CNT=$(find out -name "CHIPClusters.h" | wc -l)
if [ "${CNT}" != "0" ]; then
echo "ERROR: found unexpected generated files:"
find -name "CHIPClusters.h" out
find out -name "CHIPClusters.h"
exit 1
fi
- name: Undo code pregeneration changes
run: |
rm -rf ./zzz_pregenerated
mv scripts/codegen.py.renamed scripts/codegen.py
- name: Prepare bloat report
run: |
.environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \
esp32 m5stack all-clusters-app \
out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \
/tmp/bloat_reports/
- name: Build example All Clusters App C3
timeout-minutes: 15
run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults
Expand Down
2 changes: 0 additions & 2 deletions scripts/setup/requirements.esp32.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ kconfiglib==13.7.1
construct==2.10.54
python-socketio<5
gdbgui==0.13.2.0 ; platform_machine != 'aarch64' and sys_platform == 'linux'
jinja2<3.1
itsdangerous<2.1

0 comments on commit 2007345

Please sign in to comment.