Commit d6e98106 authored by Gustavo Henrique Nihei's avatar Gustavo Henrique Nihei Committed by Gustavo Henrique Nihei
Browse files

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: default avatarGustavo Henrique Nihei <gustavo.nihei@espressif.com>
parent 14763b1c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ jobs:
        - "sign-rsa2048,sign-rsa3072,sign-ec256,sign-ed25519"
    runs-on: ubuntu-latest
    env:
      MCUBOOT_TARGET: ${{ matrix.targets }}
      MCUBOOT_TARGETS: ${{ matrix.targets }}
      MCUBOOT_FEATURES: ${{ matrix.features }}
    steps:
    - uses: actions/checkout@v2
+9 −6
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@ prepare_environment() {
}

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

if [ -n "${MCUBOOT_FEATURES}" ]; then
  IFS=','
  read -ra target_list <<< "${MCUBOOT_TARGETS}"
  for target in "${target_list[@]}"; do
    read -ra feature_list <<< "${MCUBOOT_FEATURES}"
    for feature in "${feature_list[@]}"; do
    echo "Building MCUboot with support for \"${feature}\""
    build_mcuboot "${feature}"
      echo "Building MCUboot for \"${target}\" with support for \"${feature}\""
      build_mcuboot "${target}" "${feature}"
    done
  done
fi