ci: switch to use cmake as build system for example test

This commit is contained in:
Michael (XIAO Xufeng) 2019-08-29 18:02:56 +08:00 committed by Angus Gratton
parent 63329b169b
commit 852ccd127a
3 changed files with 21 additions and 9 deletions

View file

@ -27,6 +27,7 @@ variables:
GIT_SUBMODULE_STRATEGY: normal GIT_SUBMODULE_STRATEGY: normal
UNIT_TEST_BUILD_SYSTEM: cmake UNIT_TEST_BUILD_SYSTEM: cmake
EXAMPLE_TEST_BUILD_SYSTEM: cmake
# IDF environment # IDF environment
IDF_PATH: "$CI_PROJECT_DIR" IDF_PATH: "$CI_PROJECT_DIR"

View file

@ -132,6 +132,7 @@ build_examples_make:
- build_examples/*/*/*/build/*.map - build_examples/*/*/*/build/*.map
- build_examples/*/*/*/build/download.config - build_examples/*/*/*/build/download.config
- build_examples/*/*/*/build/bootloader/*.bin - build_examples/*/*/*/build/bootloader/*.bin
- build_examples/*/*/*/*/build/partition_table/*.bin
- $LOG_PATH - $LOG_PATH
expire_in: 3 days expire_in: 3 days
variables: variables:
@ -161,6 +162,10 @@ build_examples_make:
# build some of examples # build some of examples
- mkdir -p ${LOG_PATH} - mkdir -p ${LOG_PATH}
- ${IDF_PATH}/tools/ci/build_examples.sh - ${IDF_PATH}/tools/ci/build_examples.sh
# 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
# same as above, but for CMake # same as above, but for CMake
.build_examples_cmake: &build_examples_cmake .build_examples_cmake: &build_examples_cmake
@ -169,12 +174,13 @@ build_examples_make:
artifacts: artifacts:
when: always when: always
paths: paths:
- build_examples_cmake/*/*/*/*/build/*.bin - build_examples/*/*/*/*/build/*.bin
- build_examples_cmake/*/*/*/*/sdkconfig - build_examples/*/*/*/*/sdkconfig
- build_examples_cmake/*/*/*/*/build/*.elf - build_examples/*/*/*/*/build/*.elf
- build_examples_cmake/*/*/*/*/build/*.map - build_examples/*/*/*/*/build/*.map
- build_examples_cmake/*/*/*/*/build/flasher_args.json - build_examples/*/*/*/*/build/flasher_args.json
- build_examples_cmake/*/*/*/*/build/bootloader/*.bin - build_examples/*/*/*/*/build/bootloader/*.bin
- build_examples/*/*/*/*/build/partition_table/*.bin
- $LOG_PATH - $LOG_PATH
expire_in: 3 days expire_in: 3 days
variables: variables:
@ -189,12 +195,16 @@ build_examples_make:
script: script:
# it's not possible to build 100% out-of-tree and have the "artifacts" # it's not possible to build 100% out-of-tree and have the "artifacts"
# mechanism work, but this is the next best thing # mechanism work, but this is the next best thing
- rm -rf build_examples_cmake - rm -rf build_examples
- mkdir build_examples_cmake - mkdir build_examples
- cd build_examples_cmake - cd build_examples
# build some of examples # build some of examples
- mkdir -p ${LOG_PATH} - mkdir -p ${LOG_PATH}
- ${IDF_PATH}/tools/ci/build_examples_cmake.sh - ${IDF_PATH}/tools/ci/build_examples_cmake.sh
# 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
build_examples_cmake_esp32: build_examples_cmake_esp32:
extends: .build_examples_cmake extends: .build_examples_cmake

View file

@ -23,6 +23,7 @@
- assign_test - assign_test
- build_examples_make - build_examples_make
- build_examples_cmake_esp32 - build_examples_cmake_esp32
- build_examples_cmake_esp32s2
artifacts: artifacts:
when: always when: always
paths: paths: