2016-08-22 06:19:08 -04:00
stages :
- build
2016-11-01 07:30:42 -04:00
- unit_test
2016-08-23 00:54:09 -04:00
- test
2016-10-17 05:03:54 -04:00
- test_report
2016-08-22 06:19:08 -04:00
- deploy
2016-09-01 03:13:15 -04:00
before_script :
2016-09-12 21:34:28 -04:00
# add gitlab ssh key
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
2016-09-13 09:24:57 -04:00
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
2016-09-12 21:34:28 -04:00
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
2016-11-07 22:55:48 -05:00
2016-09-12 21:34:28 -04:00
# if testing master branch, use github wifi libs.
# if testing other branches, use gitlab wifi libs (as maybe changes aren't merged to master yet)
- test "${CI_BUILD_REF_NAME}" = "master" || sed -i "s%https://github.com/espressif/esp32-wifi-lib%ssh://git@gitlab.espressif.cn:27227/idf/esp32-wifi-lib%" .gitmodules
# fetch all submodules
2016-09-01 03:13:15 -04:00
- git submodule update --init --recursive
2016-08-22 03:02:22 -04:00
build_template_app :
2016-08-22 06:19:08 -04:00
stage : build
2016-08-22 03:02:22 -04:00
image : espressif/esp32-ci-env
2016-09-08 22:49:03 -04:00
tags :
- build
2016-08-22 03:02:22 -04:00
variables :
SDK_PATH : "$CI_PROJECT_DIR"
IDF_PATH : "$CI_PROJECT_DIR"
2016-08-22 06:19:08 -04:00
GIT_STRATEGY : clone
2016-08-22 03:02:22 -04:00
script :
- git clone https://github.com/espressif/esp-idf-template.git
- cd esp-idf-template
2016-09-01 04:58:06 -04:00
# Try to use the same branch name for esp-idf-template that we're
# using on esp-idf. If it doesn't exist then just stick to the default
# branch
- git checkout ${CI_BUILD_REF_NAME} || echo "Using esp-idf-template default branch..."
2016-08-23 04:19:49 -04:00
- make defconfig
2016-10-17 00:45:42 -04:00
# Test debug build (default)
- make all V=1
# Now test release build
- make clean
- sed -i.bak -e's/CONFIG_OPTIMIZATION_LEVEL_DEBUG\=y/CONFIG_OPTIMIZATION_LEVEL_RELEASE=y/' sdkconfig
- make defconfig
2016-09-08 20:49:35 -04:00
- make all V=1
2016-08-22 06:19:08 -04:00
2016-09-08 22:49:03 -04:00
.build_gitlab : &build_template
stage : build
tags :
- build
image : espressif/esp32-ci-env
variables :
SDK_PATH : "$CI_PROJECT_DIR"
IDF_PATH : "$CI_PROJECT_DIR"
GIT_STRATEGY : clone
build_ssc :
<< : *build_template
artifacts :
paths :
- ./SSC/build/*.bin
- ./SSC/build/*.elf
- ./SSC/build/*.map
- ./SSC/build/bootloader/*.bin
expire_in : 6 mos
script :
2016-09-28 08:11:42 -04:00
- git clone $GITLAB_SSH_SERVER/yinling/SSC.git
2016-09-08 22:49:03 -04:00
- cd SSC
2016-09-29 01:38:29 -04:00
- git checkout ${CI_BUILD_REF_NAME} || echo "Using SSC default branch..."
2016-09-08 22:49:03 -04:00
- make defconfig
- chmod +x gen_misc_ng.sh
- ./gen_misc_ng.sh
2016-11-01 07:30:42 -04:00
build_esp_idf_tests :
<< : *build_template
artifacts :
paths :
- ./esp-idf-tests/build/*.bin
- ./esp-idf-tests/build/*.elf
- ./esp-idf-tests/build/*.map
- ./esp-idf-tests/build/bootloader/*.bin
expire_in : 6 mos
script :
- git clone $GITLAB_SSH_SERVER/idf/esp-idf-tests.git
- cd esp-idf-tests
- git checkout ${CI_BUILD_REF_NAME} || echo "Using default branch..."
- make defconfig
- make
2016-10-11 01:41:05 -04:00
build_examples :
<< : *build_template
artifacts :
paths :
- build_examples/*/*/build/*.bin
- build_examples/*/*/build/*.elf
- build_examples/*/*/build/*.map
- build_examples/*/*/build/bootloader/*.bin
expire_in : 6 mos
script :
# it's not possible to build 100% out-of-tree and have the "artifacts"
# mechanism work, but this is the next best thing
- mkdir build_examples
- cd build_examples
- ${IDF_PATH}/make/build_examples.sh
2016-11-01 08:08:29 -04:00
build_docs :
stage : build
image : espressif/esp32-ci-env
tags :
- build_docs
script :
- cd docs
- make html
artifacts :
paths :
- docs/_build/html
2016-11-01 08:58:47 -04:00
expire_in : 1 mos
2016-11-01 08:08:29 -04:00
2016-08-23 00:54:09 -04:00
test_nvs_on_host :
stage : test
image : espressif/esp32-ci-env
2016-09-08 22:49:03 -04:00
tags :
- nvs_host_test
2016-08-23 00:54:09 -04:00
script :
- cd components/nvs_flash/test
- make test
2016-08-24 00:16:26 -04:00
test_build_system :
stage : test
image : espressif/esp32-ci-env
2016-09-08 22:49:03 -04:00
tags :
- build_test
2016-08-24 01:31:33 -04:00
variables :
IDF_PATH : "$CI_PROJECT_DIR"
2016-08-24 00:16:26 -04:00
script :
2016-08-24 23:55:47 -04:00
- ./make/test_build_system.sh
2016-08-24 00:16:26 -04:00
2016-09-30 01:58:02 -04:00
test_report :
2016-10-17 05:03:54 -04:00
stage : test_report
2016-09-30 01:58:02 -04:00
only :
- master
- triggers
tags :
- test_report
variables :
LOG_PATH : "$CI_PROJECT_DIR/$CI_BUILD_REF"
2016-10-11 23:17:56 -04:00
TEST_CASE_FILE_PATH : "$CI_PROJECT_DIR/components/idf_test"
2016-09-30 01:58:02 -04:00
REPORT_PATH : "$CI_PROJECT_DIR/CI_Test_Report"
artifacts :
when : always
paths :
- $REPORT_PATH
2016-10-17 05:03:54 -04:00
expire_in : 12 mos
2016-09-30 01:58:02 -04:00
script :
# clone test bench
- git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
- cd auto_test_script
# generate report
- python CITestReport.py -l $LOG_PATH -t $TEST_CASE_FILE_PATH -p $REPORT_PATH
2016-09-08 22:49:03 -04:00
2016-09-26 02:32:58 -04:00
push_master_to_github :
before_script :
- echo "Not setting up GitLab key, not fetching submodules"
stage : deploy
only :
- master
tags :
- deploy
when : on_success
image : espressif/esp32-ci-env
variables :
GIT_STRATEGY : clone
script :
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
- git remote add github git@github.com:espressif/esp-idf.git
- git push --follow-tags github HEAD:master
2016-09-08 22:49:03 -04:00
2016-09-26 02:32:58 -04:00
2016-11-01 08:58:47 -04:00
deploy_docs :
before_script :
- echo "Not setting up GitLab key, not fetching submodules"
stage : deploy
only :
- master
- triggers
tags :
- deploy
image : espressif/esp32-ci-env
script :
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $DOCS_DEPLOY_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host $DOCS_SERVER\n\tStrictHostKeyChecking no\n\tUser $DOCS_SERVER_USER\n" >> ~/.ssh/config
- export GIT_VER=$(git describe --always)
- cd docs/_build/
- mv html $GIT_VER
- tar czvf $GIT_VER.tar.gz $GIT_VER
- scp $GIT_VER.tar.gz $DOCS_SERVER:$DOCS_PATH
- ssh $DOCS_SERVER -x "cd $DOCS_PATH && tar xzvf $GIT_VER.tar.gz && rm -f latest && ln -s $GIT_VER latest"
2016-09-26 02:32:58 -04:00
# AUTO GENERATED PART START, DO NOT MODIFY CONTENT BELOW
2016-09-08 22:49:03 -04:00
# template for test jobs
.test_template : &test_template
stage : test
when : on_success
only :
- master
2016-09-18 11:12:50 -04:00
- triggers
2016-09-30 04:11:24 -04:00
allow_failure : true
2016-09-08 22:49:03 -04:00
variables :
2016-09-28 07:48:38 -04:00
# LOCAL_ENV_CONFIG_PATH: define in template and jobs can overwrite if required
LOCAL_ENV_CONFIG_PATH : /home/gitlab-runner/LocalConfig/ESP32_IDF
2016-09-26 02:32:58 -04:00
BIN_PATH : "$CI_PROJECT_DIR/SSC/build/"
APP_NAME : "ssc"
LOG_PATH : "$CI_PROJECT_DIR/$CI_BUILD_REF"
2016-10-11 23:17:56 -04:00
# append test level folder to TEST_CASE_FILE_PATH in before_script of test job
2016-11-01 07:30:42 -04:00
TEST_CASE_FILE_PATH : "$CI_PROJECT_DIR/components/idf_test/integration_test"
2016-09-26 02:32:58 -04:00
# jobs MUST set CONFIG_FILE in before_script, and overwrite the variables above if necessary
2016-09-08 22:49:03 -04:00
artifacts :
when : always
paths :
- $LOG_PATH
expire_in : 6 mos
2016-09-26 02:32:58 -04:00
script :
2016-09-29 01:38:29 -04:00
# add gitlab ssh key
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# clone test bench
2016-09-28 07:48:38 -04:00
- git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
2016-09-27 04:22:18 -04:00
- cd auto_test_script
2016-09-29 01:38:29 -04:00
# run test
2016-09-26 02:32:58 -04:00
- python CIRunner.py -l $LOG_PATH -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH bin_path $APP_NAME $BIN_PATH
# template for overnight test jobs
.test_template_night : &test_template_night
<< : *test_template
only :
# can only be triggered
- triggers
2016-09-08 22:49:03 -04:00
script :
2016-09-26 02:32:58 -04:00
# must be night build triggers, otherwise exit without test
2016-09-29 08:21:33 -04:00
- test $NIGHT_BUILD = "Yes" || exit 0
2016-09-29 01:38:29 -04:00
# add gitlab ssh key
- mkdir -p ~/.ssh
- chmod 700 ~/.ssh
- echo -n $GITLAB_KEY > ~/.ssh/id_rsa_base64
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
- chmod 600 ~/.ssh/id_rsa
- echo -e "Host gitlab.espressif.cn\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
# clone test bench
2016-09-28 07:48:38 -04:00
- git clone $GITLAB_SSH_SERVER/yinling/auto_test_script.git
2016-09-27 04:22:18 -04:00
- cd auto_test_script
2016-09-29 01:38:29 -04:00
# run test
2016-09-26 02:32:58 -04:00
- python CIRunner.py -l $LOG_PATH -c $CONFIG_FILE -e $LOCAL_ENV_CONFIG_PATH -t $TEST_CASE_FILE_PATH bin_path $APP_NAME $BIN_PATH
2016-11-01 07:30:42 -04:00
# template for unit test jobs
.unit_test_template : &unit_test_template
<< : *test_template
allow_failure : false
stage : unit_test
variables :
# jobs MUST set CONFIG_FILE in before_script, and overwrite the variables above if necessary
LOCAL_ENV_CONFIG_PATH : /home/gitlab-runner/LocalConfig/ESP32_IDF
BIN_PATH : "$CI_PROJECT_DIR/esp-idf-tests/build/"
LOG_PATH : "$CI_PROJECT_DIR/$CI_BUILD_REF"
APP_NAME : "ut"
TEST_CASE_FILE_PATH : "$CI_PROJECT_DIR/components/idf_test/unit_test"
UT_Function_SYS_01 :
2016-11-01 08:33:23 -04:00
<< : *unit_test_template
2016-11-01 07:30:42 -04:00
tags :
- ESP32_IDF
- UT_T1_1
before_script :
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/UT_Function_SYS_01.yml
2016-10-11 23:17:56 -04:00
IT_Function_SYS_01 :
2016-09-26 02:32:58 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_SYS_01.yml
2016-09-08 22:49:03 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_WIFI_01 :
2016-09-08 22:49:03 -04:00
<< : *test_template
tags :
2016-09-26 02:32:58 -04:00
- ESP32_IDF
2016-09-08 22:49:03 -04:00
- SSC_T1_1
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_01.yml
2016-09-08 22:49:03 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_WIFI_02 :
2016-09-26 02:32:58 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_02.yml
2016-09-08 22:49:03 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_01 :
2016-09-26 02:32:58 -04:00
<< : *test_template
2016-09-08 22:49:03 -04:00
tags :
2016-09-26 02:32:58 -04:00
- ESP32_IDF
- SSC_T1_1
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_01.yml
2016-09-26 02:32:58 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_02 :
2016-09-26 02:32:58 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_02.yml
2016-09-26 02:32:58 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_03 :
2016-09-26 02:32:58 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_03.yml
2016-09-26 02:32:58 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_04 :
2016-09-26 02:32:58 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_04.yml
2016-09-26 02:32:58 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_05 :
2016-09-26 02:32:58 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_05.yml
2016-09-26 02:32:58 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_06 :
2016-09-28 07:48:38 -04:00
<< : *test_template_night
2016-09-26 02:32:58 -04:00
tags :
- ESP32_IDF
- SSC_T1_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_06.yml
2016-09-26 02:32:58 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_WIFI_03 :
2016-09-29 00:07:35 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T3_PhyMode
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_03.yml
2016-09-29 00:07:35 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_WIFI_04 :
2016-09-28 07:48:38 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_APC
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_04.yml
2016-09-28 07:48:38 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_WIFI_05 :
2016-09-28 07:48:38 -04:00
<< : *test_template
tags :
- ESP32_IDF
2016-09-29 00:07:35 -04:00
- SSC_T1_WEP
2016-09-28 07:48:38 -04:00
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_05.yml
2016-09-28 07:48:38 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_WIFI_06 :
2016-09-28 07:48:38 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T2_PhyMode
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_WIFI_06.yml
2016-09-28 07:48:38 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_07 :
2016-09-28 07:48:38 -04:00
<< : *test_template
2016-09-26 02:32:58 -04:00
tags :
- ESP32_IDF
- SSC_T1_1
2016-09-28 07:48:38 -04:00
- SSC_T1_2
2016-10-11 23:17:56 -04:00
- SSC_T2_1
2016-09-26 02:32:58 -04:00
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_07.yml
2016-09-26 02:32:58 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_08 :
2016-09-27 04:22:18 -04:00
<< : *test_template
tags :
- ESP32_IDF
2016-09-28 07:48:38 -04:00
- SSC_T1_1
2016-09-27 04:22:18 -04:00
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_08.yml
2016-09-28 07:48:38 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_09 :
2016-09-28 07:48:38 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_09.yml
2016-09-28 07:48:38 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_10 :
2016-09-28 07:48:38 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
- SSC_T1_2
- SSC_T2_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_10.yml
2016-09-28 07:48:38 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_11 :
2016-09-28 07:48:38 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
2016-11-01 07:30:42 -04:00
- SSC_T1_2
2016-09-28 07:48:38 -04:00
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_11.yml
2016-09-28 07:48:38 -04:00
2016-10-11 23:17:56 -04:00
IT_Function_TCPIP_12 :
2016-09-28 07:48:38 -04:00
<< : *test_template
tags :
- ESP32_IDF
- SSC_T1_1
before_script :
2016-10-11 23:44:54 -04:00
- CONFIG_FILE=$TEST_CASE_FILE_PATH/CIConfigs/IT_Function_TCPIP_12.yml