Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESP32: Optimize the time taken by esp32 workflows #8409

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions .github/workflows/examples-esp32.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,53 +61,69 @@ jobs:
.environment/gn_out/.ninja_log
.environment/pigweed-venv/*.log
- name: Build example All Clusters App
timeout-minutes: 25
run: scripts/examples/esp_example.sh all-clusters-app
timeout-minutes: 10
run: scripts/examples/esp_example.sh all-clusters-app sdkconfig_m5stack.defaults
dhrishi marked this conversation as resolved.
Show resolved Hide resolved
- name: Copy aside build products
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
- 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
cp examples/all-clusters-app/esp32/build/chip-all-clusters-app.elf \
example_binaries/$BUILD_TYPE-build/chip-all-clusters-app.elf
- name: Build example Pigweed App
timeout-minutes: 5
run: scripts/examples/esp_example.sh pigweed-app
run: scripts/examples/esp_example.sh pigweed-app sdkconfig.defaults
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/pigweed-app/esp32/build/chip-pigweed-app.elf \
example_binaries/$BUILD_TYPE-build/chip-pigweed-app.elf
- name: Build example Lock App
timeout-minutes: 5
run: scripts/examples/esp_example.sh lock-app
run: scripts/examples/esp_example.sh lock-app sdkconfig.defaults
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/lock-app/esp32/build/chip-lock-app.elf \
example_binaries/$BUILD_TYPE-build/chip-lock-app.elf
- name: Build example Persistent Storage App
timeout-minutes: 5
run: scripts/examples/esp_example.sh persistent-storage
run: scripts/examples/esp_example.sh persistent-storage sdkconfig.defaults
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/persistent-storage/esp32/build/chip-persistent-storage.elf \
example_binaries/$BUILD_TYPE-build/chip-persistent-storage.elf
- name: Build example Shell App
timeout-minutes: 5
run: scripts/examples/esp_example.sh shell
run: scripts/examples/esp_example.sh shell sdkconfig.defaults
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/shell/esp32/build/chip-shell.elf \
example_binaries/$BUILD_TYPE-build/chip-shell.elf
- name: Build example Temperature Measurement App
timeout-minutes: 25
run: scripts/examples/esp_example.sh temperature-measurement-app
timeout-minutes: 5
run: scripts/examples/esp_example.sh temperature-measurement-app sdkconfig.optimize.defaults
dhrishi marked this conversation as resolved.
Show resolved Hide resolved
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/temperature-measurement-app/esp32/build/chip-temperature-measurement-app.elf \
example_binaries/$BUILD_TYPE-build/chip-temperature-measurement-app.elf
- name: Build example IPv6 Only App
timeout-minutes: 5
run: scripts/examples/esp_example.sh ipv6only-app sdkconfig.defaults
- name: Copy aside build products
run: |
mkdir -p example_binaries/$BUILD_TYPE-build
cp examples/ipv6only-app/esp32/build/chip-ipv6only-app.elf \
example_binaries/$BUILD_TYPE-build/chip-ipv6only-app.elf
- name: Binary artifact suffix
id: outsuffix
uses: haya14busa/[email protected]
Expand Down
46 changes: 0 additions & 46 deletions examples/all-clusters-app/esp32/sdkconfig_devkit.defaults

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/build/builders/esp32.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def DefaultsFileName(board: Esp32Board, app: Esp32App):
return None

if board == Esp32Board.DevKitC:
return 'sdkconfig_devkit.defaults'
return 'sdkconfig.defaults'
elif board == Esp32Board.M5Stack:
return 'sdkconfig_m5stack.defaults'
else:
Expand Down
37 changes: 17 additions & 20 deletions scripts/examples/esp_example.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ set -x
env

app="$1"
sdkconfig_name="$2"
root=examples/$app/esp32/

shift 1
Expand All @@ -33,23 +34,19 @@ source "scripts/activate.sh"
# shellcheck source=/dev/null
source "$IDF_PATH/export.sh"

for sdkconfig in "$root"/sdkconfig*.defaults; do
# remove root path to get sdkconfig*.defaults name
sdkconfig_name=${sdkconfig#"$root"/}
if [ "$sdkconfig_name" == "sdkconfig_c3devkit.defaults" ]; then
idf_target="esp32c3"
else
idf_target="esp32"
fi

rm -f "$root"/sdkconfig
(
cd "$root"
idf.py set-target "$idf_target"
idf.py -D SDKCONFIG_DEFAULTS="$sdkconfig_name" build
) || {
echo "build $sdkconfig_name failed"
exit 1
}
cp "$root"/build/chip-"$app".elf "$root"/build/"${sdkconfig_name%".defaults"}"-chip-"$app".elf
done
if [ "$sdkconfig_name" == "sdkconfig_c3devkit.defaults" ]; then
idf_target="esp32c3"
else
idf_target="esp32"
fi

rm -f "$root"/sdkconfig
(
cd "$root"
idf.py set-target "$idf_target"
idf.py -D SDKCONFIG_DEFAULTS="$sdkconfig_name" build
) || {
echo "build $sdkconfig_name failed"
exit 1
}
cp "$root"/build/chip-"$app".elf "$root"/build/"${sdkconfig_name%".defaults"}"-chip-"$app".elf