2019-06-28 12:39:21 -04:00
|
|
|
|
|
|
|
.build_template:
|
|
|
|
stage: build
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
|
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
variables:
|
|
|
|
BATCH_BUILD: "1"
|
|
|
|
V: "0"
|
|
|
|
|
|
|
|
.build_esp_idf_unit_test_template:
|
|
|
|
extends: .build_template
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- tools/unit-test-app/output
|
|
|
|
- components/idf_test/unit_test/TestCaseAll.yml
|
2019-12-11 17:38:04 -05:00
|
|
|
expire_in: 4 days
|
2019-06-28 12:39:21 -04:00
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $BOT_TRIGGER_WITH_LABEL == null
|
|
|
|
- $BOT_LABEL_BUILD
|
|
|
|
- $BOT_LABEL_UNIT_TEST
|
|
|
|
- $BOT_LABEL_REGULAR_TEST
|
|
|
|
|
2019-12-19 21:52:33 -05:00
|
|
|
.build_ssc_template:
|
2019-06-28 12:39:21 -04:00
|
|
|
extends: .build_template
|
|
|
|
parallel: 3
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- SSC/ssc_bin
|
|
|
|
expire_in: 1 week
|
|
|
|
variables:
|
2019-12-19 21:52:33 -05:00
|
|
|
TARGET_NAME: "ESP32"
|
2019-06-28 12:39:21 -04:00
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $BOT_TRIGGER_WITH_LABEL == null
|
|
|
|
- $BOT_LABEL_BUILD
|
|
|
|
- $BOT_LABEL_INTEGRATION_TEST
|
|
|
|
- $BOT_LABEL_REGULAR_TEST
|
|
|
|
script:
|
|
|
|
- git clone $SSC_REPOSITORY
|
|
|
|
- python $CHECKOUT_REF_SCRIPT SSC SSC
|
|
|
|
- cd SSC
|
2019-12-19 21:52:33 -05:00
|
|
|
- MAKEFLAGS= ./ci_build_ssc.sh $TARGET_NAME
|
|
|
|
|
|
|
|
build_ssc_esp32:
|
|
|
|
extends: .build_ssc_template
|
|
|
|
variables:
|
|
|
|
TARGET_NAME: "ESP32"
|
|
|
|
|
2020-01-16 22:47:08 -05:00
|
|
|
build_ssc_esp32s2:
|
2019-12-19 21:52:33 -05:00
|
|
|
extends: .build_ssc_template
|
|
|
|
parallel: 2
|
|
|
|
variables:
|
|
|
|
TARGET_NAME: "ESP32S2"
|
2019-06-28 12:39:21 -04:00
|
|
|
|
|
|
|
build_esp_idf_tests_make:
|
|
|
|
extends: .build_esp_idf_unit_test_template
|
|
|
|
script:
|
|
|
|
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
|
2019-03-19 04:02:35 -04:00
|
|
|
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
|
2019-08-18 01:22:50 -04:00
|
|
|
- export IDF_TARGET=esp32
|
2019-06-28 12:39:21 -04:00
|
|
|
- cd $CI_PROJECT_DIR/tools/unit-test-app
|
|
|
|
- MAKEFLAGS= make help # make sure kconfig tools are built in single process
|
|
|
|
- make ut-clean-all-configs
|
|
|
|
- make ut-build-all-configs
|
|
|
|
- python tools/UnitTestParser.py
|
|
|
|
# Check if the tests demand Make built binaries. If not, delete them
|
|
|
|
- if [ "$UNIT_TEST_BUILD_SYSTEM" == "make" ]; then exit 0; fi
|
|
|
|
- rm -rf builds output sdkconfig
|
|
|
|
- rm $CI_PROJECT_DIR/components/idf_test/unit_test/TestCaseAll.yml
|
|
|
|
|
|
|
|
build_esp_idf_tests_cmake:
|
|
|
|
extends: .build_esp_idf_unit_test_template
|
|
|
|
script:
|
|
|
|
- export PATH="$IDF_PATH/tools:$PATH"
|
|
|
|
- export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
|
2019-03-19 04:02:35 -04:00
|
|
|
- export EXTRA_CXXFLAGS=${PEDANTIC_CXXFLAGS}
|
2019-06-28 12:39:21 -04:00
|
|
|
- cd $CI_PROJECT_DIR/tools/unit-test-app
|
|
|
|
- idf.py ut-clean-all-configs
|
|
|
|
- idf.py ut-build-all-configs
|
|
|
|
- python tools/UnitTestParser.py
|
|
|
|
# Check if the tests demand CMake built binaries. If not, delete them
|
|
|
|
- if [ "$UNIT_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
|
|
|
|
- rm -rf builds output sdkconfig
|
|
|
|
- rm $CI_PROJECT_DIR/components/idf_test/unit_test/TestCaseAll.yml
|
|
|
|
|
|
|
|
build_examples_make:
|
|
|
|
extends: .build_template
|
|
|
|
parallel: 8
|
|
|
|
# This is a workaround for a rarely encountered issue with building examples in CI.
|
|
|
|
# Probably related to building of Kconfig in 'make clean' stage
|
|
|
|
retry: 1
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
- build_examples/*/*/*/build/*.bin
|
|
|
|
- build_examples/*/*/*/sdkconfig
|
|
|
|
- build_examples/*/*/*/build/*.elf
|
|
|
|
- build_examples/*/*/*/build/*.map
|
|
|
|
- build_examples/*/*/*/build/download.config
|
|
|
|
- build_examples/*/*/*/build/bootloader/*.bin
|
2019-08-29 06:02:56 -04:00
|
|
|
- build_examples/*/*/*/*/build/partition_table/*.bin
|
2019-06-28 12:39:21 -04:00
|
|
|
- $LOG_PATH
|
2019-12-11 17:38:04 -05:00
|
|
|
expire_in: 4 days
|
2019-06-28 12:39:21 -04:00
|
|
|
variables:
|
|
|
|
LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
|
|
|
|
only:
|
2019-07-10 11:16:53 -04:00
|
|
|
# Here both 'variables' and 'refs' conditions are given. They are combined with "AND" logic.
|
2019-06-28 12:39:21 -04:00
|
|
|
variables:
|
|
|
|
- $BOT_TRIGGER_WITH_LABEL == null
|
|
|
|
- $BOT_LABEL_BUILD
|
|
|
|
- $BOT_LABEL_EXAMPLE_TEST
|
|
|
|
- $BOT_LABEL_REGULAR_TEST
|
|
|
|
- $BOT_LABEL_WEEKEND_TEST
|
2019-07-10 11:16:53 -04:00
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
|
|
|
- triggers
|
|
|
|
- schedules
|
|
|
|
- pipelines
|
|
|
|
- web
|
2019-06-28 12:39:21 -04:00
|
|
|
script:
|
|
|
|
# it's not possible to build 100% out-of-tree and have the "artifacts"
|
|
|
|
# mechanism work, but this is the next best thing
|
|
|
|
- rm -rf build_examples
|
|
|
|
- mkdir build_examples
|
|
|
|
- cd build_examples
|
|
|
|
# build some of examples
|
|
|
|
- mkdir -p ${LOG_PATH}
|
|
|
|
- ${IDF_PATH}/tools/ci/build_examples.sh
|
2019-08-29 06:02:56 -04:00
|
|
|
# Check if the tests demand Make built binaries. If not, delete them
|
|
|
|
- if [ "$EXAMPLE_TEST_BUILD_SYSTEM" == "make" ]; then exit 0; fi
|
|
|
|
- cd ..
|
|
|
|
- rm -rf build_examples
|
2019-06-28 12:39:21 -04:00
|
|
|
|
|
|
|
# same as above, but for CMake
|
2019-06-27 07:11:15 -04:00
|
|
|
.build_examples_cmake: &build_examples_cmake
|
2019-06-28 12:39:21 -04:00
|
|
|
extends: .build_template
|
2019-11-27 01:14:08 -05:00
|
|
|
parallel: 8
|
2019-06-28 12:39:21 -04:00
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
2019-10-17 10:23:39 -04:00
|
|
|
- build_examples/list.json
|
|
|
|
- build_examples/list_job_*.json
|
|
|
|
- build_examples/*/*/*/sdkconfig
|
|
|
|
- build_examples/*/*/*/build/*.bin
|
|
|
|
- build_examples/*/*/*/build/*.elf
|
|
|
|
- build_examples/*/*/*/build/*.map
|
|
|
|
- build_examples/*/*/*/build/flasher_args.json
|
|
|
|
- build_examples/*/*/*/build/bootloader/*.bin
|
|
|
|
- build_examples/*/*/*/build/partition_table/*.bin
|
2019-06-28 12:39:21 -04:00
|
|
|
- $LOG_PATH
|
2019-12-11 17:38:04 -05:00
|
|
|
expire_in: 4 days
|
2019-06-28 12:39:21 -04:00
|
|
|
variables:
|
2019-10-17 10:23:39 -04:00
|
|
|
LOG_PATH: "$CI_PROJECT_DIR/log_examples"
|
|
|
|
BUILD_PATH: "$CI_PROJECT_DIR/build_examples"
|
2019-06-28 12:39:21 -04:00
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $BOT_TRIGGER_WITH_LABEL == null
|
|
|
|
- $BOT_LABEL_BUILD
|
|
|
|
- $BOT_LABEL_EXAMPLE_TEST
|
|
|
|
- $BOT_LABEL_REGULAR_TEST
|
|
|
|
- $BOT_LABEL_WEEKEND_TEST
|
|
|
|
script:
|
|
|
|
# it's not possible to build 100% out-of-tree and have the "artifacts"
|
|
|
|
# mechanism work, but this is the next best thing
|
2019-10-17 10:23:39 -04:00
|
|
|
- mkdir -p ${BUILD_PATH}
|
2019-06-28 12:39:21 -04:00
|
|
|
- mkdir -p ${LOG_PATH}
|
|
|
|
- ${IDF_PATH}/tools/ci/build_examples_cmake.sh
|
2019-08-29 06:02:56 -04:00
|
|
|
# Check if the tests demand CMake built binaries. If not, delete them
|
|
|
|
- if [ "$EXAMPLE_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
|
|
|
|
- cd ..
|
|
|
|
- rm -rf build_examples
|
2019-06-28 12:39:21 -04:00
|
|
|
|
2019-06-27 07:11:15 -04:00
|
|
|
build_examples_cmake_esp32:
|
|
|
|
extends: .build_examples_cmake
|
|
|
|
variables:
|
|
|
|
IDF_TARGET: esp32
|
|
|
|
|
2019-08-07 23:44:24 -04:00
|
|
|
build_examples_cmake_esp32s2:
|
|
|
|
extends: .build_examples_cmake
|
|
|
|
variables:
|
2020-01-16 22:47:08 -05:00
|
|
|
IDF_TARGET: esp32s2
|
2019-08-07 23:44:24 -04:00
|
|
|
|
2019-06-28 12:39:21 -04:00
|
|
|
# If you want to add new build example jobs, please add it into dependencies of `.example_test_template`
|
|
|
|
|
|
|
|
build_docs:
|
|
|
|
stage: build
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
|
|
|
|
tags:
|
|
|
|
- build_docs
|
|
|
|
artifacts:
|
|
|
|
when: always
|
|
|
|
paths:
|
|
|
|
# English version of documentation
|
|
|
|
- docs/en/doxygen-warning-log.txt
|
|
|
|
- docs/en/sphinx-warning-log.txt
|
|
|
|
- docs/en/sphinx-warning-log-sanitized.txt
|
|
|
|
- docs/en/_build/html
|
|
|
|
- docs/sphinx-err-*
|
|
|
|
# Chinese version of documentation
|
|
|
|
- docs/zh_CN/doxygen-warning-log.txt
|
|
|
|
- docs/zh_CN/sphinx-warning-log.txt
|
|
|
|
- docs/zh_CN/sphinx-warning-log-sanitized.txt
|
|
|
|
- docs/zh_CN/_build/html
|
2019-12-11 17:38:04 -05:00
|
|
|
expire_in: 4 days
|
2019-06-28 12:39:21 -04:00
|
|
|
only:
|
|
|
|
variables:
|
|
|
|
- $BOT_TRIGGER_WITH_LABEL == null
|
|
|
|
- $BOT_LABEL_BUILD
|
|
|
|
- $BOT_LABEL_BUILD_DOCS
|
|
|
|
- $BOT_LABEL_REGULAR_TEST
|
|
|
|
script:
|
|
|
|
- cd docs
|
|
|
|
- ./check_lang_folder_sync.sh
|
|
|
|
- cd en
|
|
|
|
- make gh-linkcheck
|
|
|
|
- make html
|
2019-09-13 00:02:58 -04:00
|
|
|
- ../check_doc_warnings.sh
|
2019-06-28 12:39:21 -04:00
|
|
|
- cd ../zh_CN
|
|
|
|
- make gh-linkcheck
|
|
|
|
- make html
|
2019-09-13 00:02:58 -04:00
|
|
|
- ../check_doc_warnings.sh
|
2019-06-28 12:39:21 -04:00
|
|
|
|
|
|
|
test_build_system:
|
|
|
|
extends: .build_template
|
|
|
|
script:
|
|
|
|
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
|
|
|
|
- rm -rf test_build_system
|
|
|
|
- mkdir test_build_system
|
|
|
|
- cd test_build_system
|
|
|
|
- ${IDF_PATH}/tools/ci/test_build_system.sh
|
|
|
|
|
|
|
|
test_build_system_cmake:
|
|
|
|
extends: .build_template
|
|
|
|
script:
|
|
|
|
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
|
|
|
|
- rm -rf test_build_system
|
|
|
|
- mkdir test_build_system
|
|
|
|
- cd test_build_system
|
|
|
|
- ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
|
2019-07-08 12:42:46 -04:00
|
|
|
|
2019-10-30 10:00:18 -04:00
|
|
|
test_build_system_cmake_macos:
|
|
|
|
extends: .macos_build_template
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
|
|
|
- schedules
|
|
|
|
- triggers
|
|
|
|
- pipelines
|
|
|
|
- web
|
|
|
|
variables:
|
|
|
|
- $CI_PIPELINE_SOURCE != "push" && $BOT_LABEL_MACOS_TEST != null
|
|
|
|
- $CI_PIPELINE_SOURCE == "push"
|
|
|
|
script:
|
|
|
|
- ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
|
|
|
|
- rm -rf test_build_system
|
|
|
|
- mkdir test_build_system
|
|
|
|
- cd test_build_system
|
|
|
|
- ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
|
|
|
|
|
2019-07-08 12:42:46 -04:00
|
|
|
build_docker:
|
|
|
|
stage: build
|
|
|
|
image: espressif/docker-builder:1
|
|
|
|
tags:
|
|
|
|
- build_docker_amd64_brno
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
|
|
|
- schedules
|
|
|
|
variables:
|
|
|
|
DOCKER_TMP_IMAGE_NAME: "idf_tmp_image"
|
|
|
|
before_script: []
|
|
|
|
script:
|
|
|
|
- export DOCKER_BUILD_ARGS="--build-arg IDF_CLONE_URL=${CI_REPOSITORY_URL} --build-arg IDF_CLONE_BRANCH_OR_TAG=${CI_COMMIT_REF_NAME} --build-arg IDF_CHECKOUT_REF=${CI_COMMIT_TAG:-$CI_COMMIT_SHA}"
|
|
|
|
# Build
|
|
|
|
- docker build --tag ${DOCKER_TMP_IMAGE_NAME} ${DOCKER_BUILD_ARGS} tools/docker/
|
|
|
|
# We can't mount $PWD/examples/get-started/blink into the container, see https://gitlab.com/gitlab-org/gitlab-ce/issues/41227.
|
|
|
|
# The workaround mentioned there works, but leaves around directories which need to be cleaned up manually.
|
|
|
|
# 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
|
2019-07-18 11:34:36 -04:00
|
|
|
|
|
|
|
build_idf_exe:
|
|
|
|
stage: build
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-toolchain-win-cross
|
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
|
|
|
- schedules
|
|
|
|
before_script: []
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- tools/windows/idf_exe/build/idf-exe-v*.zip
|
2019-12-11 17:38:04 -05:00
|
|
|
expire_in: 4 days
|
2019-07-18 11:34:36 -04:00
|
|
|
script:
|
|
|
|
- cd tools/windows/idf_exe/
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
|
|
|
- cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-i686-w64-mingw32.cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
- cmake --build .
|
|
|
|
|
|
|
|
build_cmdlinerunner:
|
|
|
|
stage: build
|
|
|
|
image: $CI_DOCKER_REGISTRY/esp32-toolchain-win-cross
|
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
|
|
|
- schedules
|
|
|
|
before_script: []
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- tools/windows/tool_setup/cmdlinerunner/build/cmdlinerunner.dll
|
2019-12-11 17:38:04 -05:00
|
|
|
expire_in: 4 days
|
2019-07-18 11:34:36 -04:00
|
|
|
script:
|
|
|
|
- cd tools/windows/tool_setup/cmdlinerunner
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
|
|
|
- cmake -DCMAKE_TOOLCHAIN_FILE=../toolchain-i686-w64-mingw32.cmake -DCMAKE_BUILD_TYPE=Release ..
|
|
|
|
- cmake --build .
|
|
|
|
|
|
|
|
build_installer:
|
|
|
|
# using a different stage here to be able to use artifacts from build_cmdlinerunner job
|
|
|
|
stage: host_test
|
|
|
|
image: $CI_DOCKER_REGISTRY/wine-innosetup:1
|
|
|
|
tags:
|
|
|
|
- build
|
|
|
|
only:
|
|
|
|
refs:
|
|
|
|
- master
|
|
|
|
- /^release\/v/
|
|
|
|
- /^v\d+\.\d+(\.\d+)?($|-)/
|
|
|
|
- schedules
|
|
|
|
dependencies:
|
|
|
|
- build_cmdlinerunner
|
|
|
|
before_script: []
|
|
|
|
script:
|
|
|
|
- cd tools/windows/tool_setup/
|
2019-09-22 23:42:01 -04:00
|
|
|
- ./build_installer.sh
|