Skip to content

Commit d6e9810

Browse files
committed
espressif: Improve CI script for targetting multiple chips at once
This enables using "espressif_run.sh" locally for a quick validation that the build passes for multiple Espressif targets. Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
1 parent 14763b1 commit d6e9810

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/espressif.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- "sign-rsa2048,sign-rsa3072,sign-ec256,sign-ed25519"
2424
runs-on: ubuntu-latest
2525
env:
26-
MCUBOOT_TARGET: ${{ matrix.targets }}
26+
MCUBOOT_TARGETS: ${{ matrix.targets }}
2727
MCUBOOT_FEATURES: ${{ matrix.features }}
2828
steps:
2929
- uses: actions/checkout@v2

ci/espressif_run.sh

+9-6
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ prepare_environment() {
1616
}
1717

1818
build_mcuboot() {
19-
local target=${MCUBOOT_TARGET}
20-
local feature=${1}
19+
local target=${1}
20+
local feature=${2}
2121
local toolchain_file="${ESPRESSIF_ROOT}/tools/toolchain-${target}.cmake"
2222
local mcuboot_config="${ESPRESSIF_ROOT}/bootloader.conf"
2323
local build_dir=".build-${target}"
@@ -43,9 +43,12 @@ prepare_environment
4343

4444
if [ -n "${MCUBOOT_FEATURES}" ]; then
4545
IFS=','
46-
read -ra feature_list <<< "${MCUBOOT_FEATURES}"
47-
for feature in "${feature_list[@]}"; do
48-
echo "Building MCUboot with support for \"${feature}\""
49-
build_mcuboot "${feature}"
46+
read -ra target_list <<< "${MCUBOOT_TARGETS}"
47+
for target in "${target_list[@]}"; do
48+
read -ra feature_list <<< "${MCUBOOT_FEATURES}"
49+
for feature in "${feature_list[@]}"; do
50+
echo "Building MCUboot for \"${target}\" with support for \"${feature}\""
51+
build_mcuboot "${target}" "${feature}"
52+
done
5053
done
5154
fi

0 commit comments

Comments
 (0)