diff --git a/.gitlab/ci/build.yml b/.gitlab/ci/build.yml index df8a5f5320..eb73d8d585 100644 --- a/.gitlab/ci/build.yml +++ b/.gitlab/ci/build.yml @@ -16,12 +16,6 @@ .build_template_app_template: extends: - .build_template - variables: - LOG_PATH: "${CI_PROJECT_DIR}/log_template_app" - BUILD_PATH: "${CI_PROJECT_DIR}/build_template_app" - BUILD_DIR: "${BUILD_PATH}/@t/@w" - BUILD_LOG_CMAKE: "${LOG_PATH}/cmake_@t_@w.txt" - BUILD_COMMAND_ARGS: "" artifacts: paths: - log_template_app/* @@ -40,7 +34,6 @@ # Only do the default cmake build for each target, remaining part are done in the build_template_app job - tools/ci/build_template_app.sh ${BUILD_COMMAND_ARGS} -# build-related-pre-check-jobs ------------------------------------------------ # Build at least one project for each target at earliest stage to reduce build cost for obvious failing commits fast_template_app: extends: @@ -50,7 +43,16 @@ fast_template_app: tags: [fast_run, shiny] variables: BUILD_COMMAND_ARGS: "-p" -#------------------------------------------------------------------------------ + +# This job builds template app with permutations of targets and optimization levels +build_template_app: + extends: + - .build_template_app_template + - .rules:build + stage: host_test + needs: + - job: fast_template_app + artifacts: false ####################### # gnu_static_analyzer # @@ -256,17 +258,6 @@ build_docker: # Therefore, build a copy of the example located inside the container. - docker run --rm --workdir /opt/esp/idf/examples/get-started/blink ${DOCKER_TMP_IMAGE_NAME} idf.py build -# This job builds template app with permutations of targets and optimization levels -build_template_app: - extends: - - .build_template_app_template - - .rules:build - stage: host_test - dependencies: # set dependencies to null to avoid missing artifacts issue - needs: - - job: fast_template_app - artifacts: false - #################### # Dynamic Pipeline # #################### diff --git a/tools/ci/build_template_app.sh b/tools/ci/build_template_app.sh index e4a5e9cff1..14f7ab0bc0 100755 --- a/tools/ci/build_template_app.sh +++ b/tools/ci/build_template_app.sh @@ -11,6 +11,13 @@ set -euo pipefail TEMPLATE_APP_PATH="esp-idf-template" +# Set default paths for template app builds +BUILD_PATH="${IDF_PATH}/build_template_app" +BUILD_DIR="${BUILD_PATH}/@t/@w" + +LOG_PATH="${IDF_PATH}/log_template_app" +BUILD_LOG_CMAKE="${LOG_PATH}/cmake_@t_@w.txt" + gen_configs() { # CONFIG_COMPILER_OPTIMIZATION_NONE with flag -O0 echo "CONFIG_COMPILER_OPTIMIZATION_NONE=y" > ${TEMPLATE_APP_PATH}/sdkconfig.ci.O0