From 2007345ca7f1108912cd765b455a2f654ebd1111 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Thu, 6 Apr 2023 19:28:02 -0400 Subject: [PATCH] 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 --- .github/workflows/build.yaml | 6 ++++-- .github/workflows/examples-esp32.yaml | 18 ++++++++++-------- scripts/setup/requirements.esp32.txt | 2 -- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c580dda8e5603f..2fe7416f5cbfb4 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -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: | @@ -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) diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index 4065aecf78d074..062120ad41ded9 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -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: | @@ -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 diff --git a/scripts/setup/requirements.esp32.txt b/scripts/setup/requirements.esp32.txt index 73e9883005c7ee..44fd20ce9d6e7d 100644 --- a/scripts/setup/requirements.esp32.txt +++ b/scripts/setup/requirements.esp32.txt @@ -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