Skip to content

Commit

Permalink
ci: switch to use cmake as build system for example test
Browse files Browse the repository at this point in the history
  • Loading branch information
ginkgm authored and projectgus committed Sep 4, 2019
1 parent 63329b1 commit 852ccd1
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ variables:
GIT_SUBMODULE_STRATEGY: normal

UNIT_TEST_BUILD_SYSTEM: cmake
EXAMPLE_TEST_BUILD_SYSTEM: cmake
# IDF environment

IDF_PATH: "$CI_PROJECT_DIR"
Expand Down
28 changes: 19 additions & 9 deletions tools/ci/config/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ build_examples_make:
- build_examples/*/*/*/build/*.map
- build_examples/*/*/*/build/download.config
- build_examples/*/*/*/build/bootloader/*.bin
- build_examples/*/*/*/*/build/partition_table/*.bin
- $LOG_PATH
expire_in: 3 days
variables:
Expand Down Expand Up @@ -161,6 +162,10 @@ build_examples_make:
# build some of examples
- mkdir -p ${LOG_PATH}
- ${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
.build_examples_cmake: &build_examples_cmake
Expand All @@ -169,12 +174,13 @@ build_examples_make:
artifacts:
when: always
paths:
- build_examples_cmake/*/*/*/*/build/*.bin
- build_examples_cmake/*/*/*/*/sdkconfig
- build_examples_cmake/*/*/*/*/build/*.elf
- build_examples_cmake/*/*/*/*/build/*.map
- build_examples_cmake/*/*/*/*/build/flasher_args.json
- build_examples_cmake/*/*/*/*/build/bootloader/*.bin
- build_examples/*/*/*/*/build/*.bin
- build_examples/*/*/*/*/sdkconfig
- 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
- $LOG_PATH
expire_in: 3 days
variables:
Expand All @@ -189,12 +195,16 @@ build_examples_make:
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_cmake
- mkdir build_examples_cmake
- cd build_examples_cmake
- rm -rf build_examples
- mkdir build_examples
- cd build_examples
# build some of examples
- mkdir -p ${LOG_PATH}
- ${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:
extends: .build_examples_cmake
Expand Down
1 change: 1 addition & 0 deletions tools/ci/config/target-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- assign_test
- build_examples_make
- build_examples_cmake_esp32
- build_examples_cmake_esp32s2
artifacts:
when: always
paths:
Expand Down

0 comments on commit 852ccd1

Please sign in to comment.