]> granicus.if.org Git - esp-idf/blobdiff - .gitlab-ci.yml
Merge branch 'bugfix/wifi_fix_invalid_csi_data_index' into 'master'
[esp-idf] / .gitlab-ci.yml
index be7de4eed3117be392c53f851c6e223ccd49f514..425ecfe60cb175a157a1e3d107ac7cff2decc76d 100644 (file)
@@ -2,8 +2,7 @@ stages:
   - build
   - assign_test
   - host_test
-  - unit_test
-  - integration_test
+  - target_test
   - check
   - deploy
   - post_check
@@ -201,15 +200,15 @@ build_ssc_02:
 build_esp_idf_tests_make:
   <<: *build_esp_idf_unit_test_template
   script:
-    - export EXTRA_CFLAGS="-Werror -Werror=deprecated-declarations"
+    - export EXTRA_CFLAGS=${PEDANTIC_CFLAGS}
     - 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
+    # Check if the tests demand Make built binaries. If not, delete them
     - if [ "$UNIT_TEST_BUILD_SYSTEM" == "make" ]; 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
@@ -218,16 +217,14 @@ 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_CFLAGS=${PEDANTIC_CFLAGS}
     - 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
     - python tools/UnitTestParser.py
-    # Check if test demands CMake or Make built binaries. If CMake leave the built artifacts as is then exit.
+    # Check if the tests demand CMake built binaries. If not, delete them
     - 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
@@ -241,6 +238,7 @@ build_esp_idf_tests_cmake:
     when: always
     paths:
       - build_examples/*/*/*/build/*.bin
+      - build_examples/*/*/*/sdkconfig
       - build_examples/*/*/*/build/*.elf
       - build_examples/*/*/*/build/*.map
       - build_examples/*/*/*/build/download.config
@@ -273,6 +271,7 @@ build_esp_idf_tests_cmake:
     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
@@ -386,9 +385,17 @@ build_docs:
     - make html
     - ../check_doc_warnings.sh
 
+.check_job_template: &check_job_template
+  stage: check
+  image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
+  tags:
+    - host_test
+  dependencies: []
+  before_script: *do_nothing_before_no_filter
+
 verify_cmake_style:
+  <<: *check_job_template
   stage: build
-  image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
   only:
     variables:
       - $BOT_TRIGGER_WITH_LABEL == null
@@ -560,7 +567,7 @@ test_idf_monitor:
     expire_in: 1 week
   script:
     - cd ${IDF_PATH}/tools/test_idf_monitor
-    - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./run_test_idf_monitor.py
+    - ./run_test_idf_monitor.py
 
 test_idf_size:
   <<: *host_test_template
@@ -584,9 +591,9 @@ test_esp_err_to_name_on_host:
   script:
     - cd ${IDF_PATH}/tools/
     - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 2.7.15 ./gen_esp_err_to_name.py
-    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found. Please run gen_esp_err_to_name.py and commit the changes.'; exit 1)
+    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || { echo 'Differences found. Please run gen_esp_err_to_name.py and commit the changes.'; exit 1; }
     - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 ./gen_esp_err_to_name.py
-    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || (echo 'Differences found between running under Python 2 and 3.'; exit 1)
+    - git diff --exit-code -- ../components/esp32/esp_err_to_name.c || { echo 'Differences found between running under Python 2 and 3.'; exit 1; }
 
 test_espcoredump:
   <<: *host_test_template
@@ -686,14 +693,6 @@ check_doc_links:
     - cd docs
     - make linkcheck
 
-.check_job_template: &check_job_template
-  stage: check
-  image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
-  tags:
-    - build
-  dependencies: []
-  before_script: *do_nothing_before_no_filter
-
 check_line_endings:
   <<: *check_job_template
   script:
@@ -722,6 +721,35 @@ check_examples_cmake_make:
   script:
     - tools/ci/check_examples_cmake_make.sh
 
+check_python_style:
+  <<: *check_job_template
+  artifacts:
+    when: on_failure
+    paths:
+      - flake8_output.txt
+    expire_in: 1 week
+  before_script: *do_nothing_before
+  script:
+    # run it only under Python 3 (it is very slow under Python 2)
+    - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh -p 3.4.8 python -m flake8 --config=$IDF_PATH/.flake8 --output-file=flake8_output.txt --tee --benchmark $IDF_PATH
+
+check_kconfigs:
+  <<: *check_job_template
+  before_script: *do_nothing_before
+  artifacts:
+    when: on_failure
+    paths:
+      - components/*/Kconfig*.new
+      - examples/*/*/*/Kconfig*.new
+      - examples/*/*/*/*/Kconfig*.new
+      - tools/*/Kconfig*.new
+      - tools/*/*/Kconfig*.new
+      - tools/*/*/*/Kconfig*.new
+    expire_in: 1 week
+  script:
+    - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ${IDF_PATH}/tools/test_check_kconfigs.py
+    - ${IDF_PATH}/tools/check_kconfigs.py
+
 check_ut_cmake_make:
   stage: check
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
@@ -789,7 +817,6 @@ assign_test:
       - $BOT_LABEL_UNIT_TEST
       - $BOT_LABEL_INTEGRATION_TEST
       - $BOT_LABEL_EXAMPLE_TEST
-  before_script: *add_gitlab_key_before
   script:
     # assign example tests
     - python $TEST_FW_PATH/CIAssignExampleTest.py $IDF_PATH/examples $IDF_PATH/.gitlab-ci.yml $EXAMPLE_CONFIG_OUTPUT_PATH
@@ -803,7 +830,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:
@@ -859,7 +886,7 @@ assign_test:
 
 .unit_test_template: &unit_test_template
   <<: *example_test_template
-  stage: unit_test
+  stage: target_test
   dependencies:
     - assign_test
     - build_esp_idf_tests_make
@@ -882,7 +909,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:
@@ -997,6 +1024,12 @@ example_test_006_01:
     - ESP32
     - Example_ShieldBox
 
+example_test_007_01:
+  <<: *example_test_template
+  tags:
+    - ESP32
+    - Example_I2C_CCS811_SENSOR
+
 UT_001_01:
   <<: *unit_test_template
   tags:
@@ -1237,6 +1270,18 @@ UT_001_40:
     - ESP32_IDF
     - UT_T1_1
 
+UT_001_41:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+
+UT_001_42:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+
 UT_002_01:
   <<: *unit_test_template
   tags:
@@ -1341,7 +1386,7 @@ UT_004_10:
   tags:
     - ESP32_IDF
     - UT_T1_1
-    - psram    
+    - psram
 
 UT_004_11:
   <<: *unit_test_template
@@ -1364,6 +1409,27 @@ UT_004_13:
     - UT_T1_1
     - psram
 
+UT_004_14:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+    - psram
+
+UT_004_15:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+    - psram
+
+UT_004_14:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+    - psram
+
 UT_005_01:
   <<: *unit_test_template
   tags:
@@ -1459,7 +1525,7 @@ UT_008_04:
     - ESP32_IDF
     - UT_T1_LEDC
     - psram
-    
+
 UT_009_01:
   <<: *unit_test_template
   tags:
@@ -1471,7 +1537,7 @@ UT_009_02:
   tags:
     - ESP32_IDF
     - UT_T2_RS485
-    
+
 UT_009_03:
   <<: *unit_test_template
   tags:
@@ -1563,6 +1629,113 @@ UT_012_05:
     - UT_T1_1
     - 8Mpsram
 
+UT_014_01:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_I2C
+
+UT_014_02:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_I2C
+
+UT_014_03:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_I2C
+
+UT_014_04:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T2_I2C
+    - psram
+
+UT_015_01:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_MCPWM
+
+UT_015_02:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_MCPWM
+
+UT_015_03:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_MCPWM
+
+UT_015_04:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_MCPWM
+    - psram
+
+UT_016_01:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_I2S
+
+UT_016_02:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_I2S
+
+UT_016_03:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_I2S
+
+UT_016_04:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_I2S
+    - psram
+
+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: