]> granicus.if.org Git - esp-idf/blobdiff - .gitlab-ci.yml
console/linenoise: support buffered stdout
[esp-idf] / .gitlab-ci.yml
index 93e9d5247cf3cbadee8ffa892eced1b7dc947809..bb9b79d541664d214e9c8a5eee755e89155490b0 100644 (file)
@@ -2,8 +2,7 @@ stages:
   - build
   - assign_test
   - host_test
-  - unit_test
-  - integration_test
+  - target_test
   - check
   - deploy
   - post_check
@@ -114,19 +113,21 @@ build_template_app:
     - build
   variables:
     BATCH_BUILD: "1"
-    IDF_CI_BUILD: "1"
   only:
     variables:
       - $BOT_TRIGGER_WITH_LABEL == null
       - $BOT_LABEL_BUILD
       - $BOT_LABEL_REGULAR_TEST
   script:
-    - git clone https://github.com/espressif/esp-idf-template.git
+    # Set the variable for 'esp-idf-template' testing
+    - ESP_IDF_TEMPLATE_GIT=${ESP_IDF_TEMPLATE_GIT:-"https://github.com/espressif/esp-idf-template.git"}
+    - git clone ${ESP_IDF_TEMPLATE_GIT}
     - cd esp-idf-template
     # 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
     - python $CHECKOUT_REF_SCRIPT esp-idf-template
+    - make defconfig
     # Test debug build (default)
     - make all V=1
     # Now test release build
@@ -180,13 +181,13 @@ build_ssc_02:
 
 # If you want to add new build ssc jobs, please add it into dependencies of `assign_test` and `.test_template`
 
-build_esp_idf_tests:
+
+.build_esp_idf_unit_test_template: &build_esp_idf_unit_test_template
   <<: *build_template
   artifacts:
     paths:
       - tools/unit-test-app/output
       - components/idf_test/unit_test/TestCaseAll.yml
-      - components/idf_test/unit_test/CIConfigs/*.yml
     expire_in: 2 days
   only:
     variables:
@@ -194,11 +195,30 @@ build_esp_idf_tests:
       - $BOT_LABEL_BUILD
       - $BOT_LABEL_UNIT_TEST
       - $BOT_LABEL_REGULAR_TEST
+
+build_esp_idf_tests_make:
+  <<: *build_esp_idf_unit_test_template
   script:
-    - export PATH="$IDF_PATH/tools:$PATH"
+    - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
+    - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
     - 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
+    - if [ "$UNIT_TEST_BUILD_SYSTEM" == "make" ]; then exit 0; fi
+    # If Make, delete the CMake built artifacts
+    - rm -rf builds output sdkconfig
+    - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/TestCaseAll.yml
+    - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/*.yml
+
+build_esp_idf_tests_cmake:
+  <<: *build_esp_idf_unit_test_template
+  script:
+    - export PATH="$IDF_PATH/tools:$PATH"
     - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
     - export EXTRA_CXXFLAGS=${EXTRA_CFLAGS}
+    - cd $CI_PROJECT_DIR/tools/unit-test-app
     # Build with CMake first
     - idf.py ut-clean-all-configs
     - idf.py ut-build-all-configs
@@ -207,14 +227,8 @@ build_esp_idf_tests:
     - if [ "$UNIT_TEST_BUILD_SYSTEM" == "cmake" ]; then exit 0; fi
     # If Make, delete the CMake built artifacts
     - rm -rf builds output sdkconfig
-    - rm -rf components/idf_test/unit_test/TestCaseAll.yml
-    - rm -rf components/idf_test/unit_test/CIConfigs/*.yml
-    # Then build with Make
-    - 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
+    - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/TestCaseAll.yml
+    - rm -rf $CI_PROJECT_DIR/components/idf_test/unit_test/CIConfigs/*.yml
 
 .build_examples_make_template: &build_examples_make_template
   <<: *build_template
@@ -225,6 +239,7 @@ build_esp_idf_tests:
     when: always
     paths:
       - build_examples/*/*/*/build/*.bin
+      - build_examples/*/*/*/sdkconfig
       - build_examples/*/*/*/build/*.elf
       - build_examples/*/*/*/build/*.map
       - build_examples/*/*/*/build/download.config
@@ -232,7 +247,6 @@ build_esp_idf_tests:
       - $LOG_PATH
     expire_in: 2 days
   variables:
-    IDF_CI_BUILD: "1"
     LOG_PATH: "$CI_PROJECT_DIR/log_examples_make"
   only:
     variables:
@@ -257,6 +271,7 @@ build_esp_idf_tests:
     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/download.config
@@ -264,7 +279,6 @@ build_esp_idf_tests:
       - $LOG_PATH
     expire_in: 2 days
   variables:
-    IDF_CI_BUILD: "1"
     LOG_PATH: "$CI_PROJECT_DIR/log_examples_cmake"
   only:
     variables:
@@ -715,8 +729,11 @@ check_ut_cmake_make:
 
 check_submodule_sync:
   <<: *check_job_template
+  tags:
+    - github_sync
   variables:
     GIT_STRATEGY: clone
+  retry: 2
   script:
     # check if all submodules are correctly synced to public repostory
     - git submodule update --init --recursive
@@ -749,7 +766,8 @@ assign_test:
     - build_ssc_00
     - build_ssc_01
     - build_ssc_02
-    - build_esp_idf_tests
+    - build_esp_idf_tests_make
+    - build_esp_idf_tests_cmake
   variables:
     TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
     EXAMPLE_CONFIG_OUTPUT_PATH: "$CI_PROJECT_DIR/examples/test_configs"
@@ -779,7 +797,7 @@ assign_test:
     - python CIAssignTestCases.py -t $IDF_PATH/components/idf_test/integration_test -c $IDF_PATH/.gitlab-ci.yml -b $IDF_PATH/SSC/ssc_bin
 
 .example_test_template: &example_test_template
-  stage: integration_test
+  stage: target_test
   when: on_success
   only:
     refs:
@@ -814,6 +832,8 @@ assign_test:
     paths:
       - $LOG_PATH
     expire_in: 1 week
+    reports:
+        junit: $LOG_PATH/*/XUNIT_RESULT.xml
   variables:
     TEST_FW_PATH: "$CI_PROJECT_DIR/tools/tiny-test-fw"
     TEST_CASE_PATH: "$CI_PROJECT_DIR/examples"
@@ -833,10 +853,11 @@ assign_test:
 
 .unit_test_template: &unit_test_template
   <<: *example_test_template
-  stage: unit_test
+  stage: target_test
   dependencies:
     - assign_test
-    - build_esp_idf_tests
+    - build_esp_idf_tests_make
+    - build_esp_idf_tests_cmake
   only:
     refs:
       - master
@@ -855,7 +876,7 @@ assign_test:
     ENV_FILE: "$CI_PROJECT_DIR/ci-test-runner-configs/$CI_RUNNER_DESCRIPTION/EnvConfig.yml"
 
 .test_template: &test_template
-  stage: integration_test
+  stage: target_test
   when: on_success
   only:
     refs:
@@ -942,7 +963,7 @@ example_test_002_01:
     - ESP32
     - Example_ShieldBox_Basic
 
-example_test_003_01:
+.example_test_003_01:
   <<: *example_test_template
   tags:
     - ESP32
@@ -1204,6 +1225,12 @@ UT_001_39:
     - ESP32_IDF
     - UT_T1_1
 
+UT_001_40:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+
 UT_002_01:
   <<: *unit_test_template
   tags:
@@ -1516,6 +1543,45 @@ UT_012_03:
     - UT_T1_1
     - 8Mpsram
 
+UT_012_04:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+    - 8Mpsram
+
+UT_017_01:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_1
+
+UT_017_02:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_1
+
+UT_017_03:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_1
+
+UT_017_04:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_1
+    - psram
+
+UT_017_05:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_1
+    - 8Mpsram
+
 UT_601_01:
   <<: *unit_test_template
   tags:
@@ -1672,6 +1738,18 @@ IT_006_05:
     - ESP32_IDF
     - SSC_T1_6
 
+IT_006_06:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T1_6
+
+IT_006_07:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T1_6
+
 IT_007_01:
   <<: *test_template
   tags:
@@ -1684,6 +1762,12 @@ IT_007_02:
     - ESP32_IDF
     - SSC_T1_7
 
+IT_007_03:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T1_7
+
 IT_008_01:
   <<: *test_template
   tags:
@@ -1714,6 +1798,12 @@ IT_012_01:
     - ESP32_IDF
     - SSC_T1_9
 
+IT_012_02:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T1_9
+
 IT_013_01:
   <<: *test_template
   tags: