From 9364cc6113a97395744627c457f89da7a6053554 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Tue, 7 Dec 2021 17:04:37 -0500 Subject: [PATCH] Esp32 build fix (#12700) * Fix up esp32 builds and make sure CI will catch future errors in using build_examples to compile * Fix build instruction typo --- .github/workflows/examples-esp32.yaml | 29 +++++++++++++------------ scripts/build/runner/shell.py | 2 +- src/platform/ESP32/InetPlatformConfig.h | 1 - 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/examples-esp32.yaml b/.github/workflows/examples-esp32.yaml index c211657b4342db..8ce0d9bce3c0be 100644 --- a/.github/workflows/examples-esp32.yaml +++ b/.github/workflows/examples-esp32.yaml @@ -28,9 +28,6 @@ jobs: name: ESP32 timeout-minutes: 85 - env: - BUILD_TYPE: esp32 - runs-on: ubuntu-latest if: github.actor != 'restyled-io[bot]' @@ -62,29 +59,33 @@ jobs: path: | .environment/gn_out/.ninja_log .environment/pigweed-venv/*.log - - name: Build example All Clusters App - timeout-minutes: 10 - run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_m5stack.defaults - - name: Copy aside build products + - name: Build some M5Stack variations + timeout-minutes: 20 + run: | + ./scripts/run_in_build_env.sh \ + "./scripts/build/build_examples.py \ + --enable-flashbundle \ + --target-glob '*-m5stack-{all-clusters,all-clusters-rpc-ipv6only}' \ + build \ + --copy-artifacts-to out/artifacts \ + " + - name: Prepare bloat report run: | - mkdir -p example_binaries/$BUILD_TYPE-build - cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \ - example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ esp32 m5stack all-clusters-app \ - example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf \ + out/esp32-m5stack-all-clusters/chip-all-clusters-app.elf \ /tmp/bloat_reports/ - name: Build example All Clusters App C3 timeout-minutes: 10 run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_c3devkit.defaults - name: Copy aside build products run: | - mkdir -p example_binaries/$BUILD_TYPE-build + mkdir -p example_binaries/esp32-build cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \ - example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf + example_binaries/esp32-build/chip-all-clusters-app.elf .environment/pigweed-venv/bin/python3 scripts/tools/memory/gh_sizes.py \ esp32 c3devkit all-clusters-app \ - example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf \ + example_binaries/esp32-build/chip-all-clusters-app.elf \ /tmp/bloat_reports/ - name: Build example Pigweed App timeout-minutes: 10 diff --git a/scripts/build/runner/shell.py b/scripts/build/runner/shell.py index d787390bf2c046..71c34f4ee143c5 100644 --- a/scripts/build/runner/shell.py +++ b/scripts/build/runner/shell.py @@ -29,7 +29,7 @@ def __init__(self, level): self.daemon = False self.level = level self.fd_read, self.fd_write = os.pipe() - self.pipeReader = os.fdopen(self.fd_read) + self.pipeReader = os.fdopen(self.fd_read, errors='replace') self.start() def fileno(self): diff --git a/src/platform/ESP32/InetPlatformConfig.h b/src/platform/ESP32/InetPlatformConfig.h index ffa8d2a65a57e9..b835452c6d225e 100644 --- a/src/platform/ESP32/InetPlatformConfig.h +++ b/src/platform/ESP32/InetPlatformConfig.h @@ -41,4 +41,3 @@ #ifndef INET_CONFIG_NUM_UDP_ENDPOINTS #define INET_CONFIG_NUM_UDP_ENDPOINTS CONFIG_NUM_UDP_ENDPOINTS #endif // INET_CONFIG_NUM_UDP_ENDPOINTS -#define INET_CONFIG_ENABLE_IPV4 1