]> granicus.if.org Git - esp-idf/blobdiff - .gitlab-ci.yml
component/bt: stop to initiate AVDTP connection on failure of A2DP service discovery
[esp-idf] / .gitlab-ci.yml
index 22b64aac1528079a4187b6969dd7f6d3dbda9a18..c80ac30a4128ecd9e62aa3306e1a85ebd1ec58e1 100644 (file)
@@ -4,6 +4,7 @@ stages:
   - host_test
   - unit_test
   - integration_test
+  - check
   - deploy
 
 variables:
@@ -68,6 +69,12 @@ before_script:
   # fetch the submodules (& if necessary re-fetch repo) from gitlab
   - time ./tools/ci/get-full-sources.sh
 
+# used for check scripts which we want to run unconditionally
+.do_nothing_before_no_filter:
+  before_script: &do_nothing_before_no_filter
+    - *git_clean_stale_submodules
+
+# used for everything else where we want to do no prep, except for bot filter
 .do_nothing_before:
   before_script: &do_nothing_before
     - *git_clean_stale_submodules
@@ -195,6 +202,12 @@ build_esp_idf_tests:
     # build some of examples
     - mkdir -p ${LOG_PATH}
     - ${IDF_PATH}/tools/ci/build_examples.sh "${CI_JOB_NAME}"
+    # and again, with cmake!
+    - rm -rf ../build_examples_cmake
+    - mkdir ../build_examples_cmake
+    - cd ../build_examples_cmake
+    - mkdir -p ${LOG_PATH}_cmake
+    - LOG_PATH=${LOG_PATH}_cmake ${IDF_PATH}/tools/ci/build_examples_cmake.sh "${CI_JOB_NAME}"
 
 build_examples_00:
   <<: *build_examples_template
@@ -253,6 +266,12 @@ build_docs:
     - make html
     - ../check_doc_warnings.sh
 
+verify_cmake_style:
+  stage: build
+  image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
+  script:
+    tools/cmake/run_cmake_lint.sh
+
 .host_test_template: &host_test_template
   stage: host_test
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
@@ -303,30 +322,56 @@ test_fatfs_on_host:
     - cd components/fatfs/test_fatfs_host/
     - make test
 
-test_mdns_fuzzer_on_host:
+.host_fuzzer_test_template: &host_fuzzer_test_template
   stage: host_test
-  image: $CI_DOCKER_REGISTRY/afl-fuzzer-test$BOT_DOCKER_IMAGE_TAG
+  image: $CI_DOCKER_REGISTRY/afl-fuzzer-test
   tags:
     - host_test
   dependencies: []
   artifacts:
     when: always
     paths:
-      - components/mdns/test_afl_fuzz_host/out/crashes
+      - ${FUZZER_TEST_DIR}/out/crashes
+      - ${FUZZER_TEST_DIR}/fuzz_output.log
     expire_in: 1 mos
   only:
     # can only be triggered
     - triggers
-  variables:
-    BOT_NEEDS_TRIGGER_BY_NAME: 1
   script:
     - export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1 && export AFL_SKIP_CPUFREQ=1
-    - cd components/mdns/test_afl_fuzz_host/
+    - cd ${FUZZER_TEST_DIR}
     # run AFL fuzzer for one hour
-    - ( make fuzz || pkill sleep ) &
+    - ( ( make ${FUZZER_PARAMS} fuzz | tee fuzz_output.log | grep -v '\(Fuzzing test case\|Entering queue cycle\)' ) || pkill sleep ) &
     - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
     # check no crashes found
-    - "[ -z `ls out/crashes/` ] || exit 1"
+    - test -z "$(ls out/crashes/)" || exit 1
+
+test_mdns_fuzzer_on_host:
+  <<: *host_fuzzer_test_template
+  variables:
+    BOT_NEEDS_TRIGGER_BY_NAME: 1
+    FUZZER_TEST_DIR: components/mdns/test_afl_fuzz_host
+
+test_lwip_dns_fuzzer_on_host:
+  <<: *host_fuzzer_test_template
+  variables:
+    BOT_NEEDS_TRIGGER_BY_NAME: 1
+    FUZZER_TEST_DIR: components/lwip/test_afl_host
+    FUZZER_PARAMS: MODE=dns
+
+test_lwip_dhcp_fuzzer_on_host:
+  <<: *host_fuzzer_test_template
+  variables:
+    BOT_NEEDS_TRIGGER_BY_NAME: 1
+    FUZZER_TEST_DIR: components/lwip/test_afl_host
+    FUZZER_PARAMS: MODE=dhcp_client
+
+test_lwip_dhcps_fuzzer_on_host:
+  <<: *host_fuzzer_test_template
+  variables:
+    BOT_NEEDS_TRIGGER_BY_NAME: 1
+    FUZZER_TEST_DIR: components/lwip/test_afl_host
+    FUZZER_PARAMS: MODE=dhcp_server
 
 test_spiffs_on_host:
   <<: *host_test_template
@@ -340,6 +385,12 @@ test_multi_heap_on_host:
     - cd components/heap/test_multi_heap_host
     - ./test_all_configs.sh
 
+test_confserver:
+  <<: *host_test_template
+  script:
+    - cd tools/kconfig_new/test
+    - ./test_confserver.py
+
 test_build_system:
   <<: *host_test_template
   script:
@@ -349,6 +400,15 @@ test_build_system:
     - cd test_build_system
     - ${IDF_PATH}/tools/ci/test_build_system.sh
 
+test_build_system_cmake:
+  <<: *host_test_template
+  script:
+    - ${IDF_PATH}/tools/ci/test_configure_ci_environment.sh
+    - rm -rf test_build_system
+    - mkdir test_build_system
+    - cd test_build_system
+    - ${IDF_PATH}/tools/ci/test_build_system_cmake.sh
+
 test_idf_monitor:
   <<: *host_test_template
   artifacts:
@@ -358,14 +418,33 @@ test_idf_monitor:
     expire_in: 1 week
   script:
     - cd ${IDF_PATH}/tools/test_idf_monitor
-    - ./run_test_idf_monitor.py
+    - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./run_test_idf_monitor.py
+
+test_idf_size:
+  <<: *host_test_template
+  artifacts:
+    when: on_failure
+    paths:
+      - tools/test_idf_size/output
+      - tools/test_idf_size/.coverage
+    expire_in: 1 week
+  script:
+    - cd ${IDF_PATH}/tools/test_idf_size
+    - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ./test.sh
 
 test_esp_err_to_name_on_host:
   <<: *host_test_template
+  artifacts:
+    when: on_failure
+    paths:
+      - components/esp32/esp_err_to_name.c
+    expire_in: 1 week
   script:
-    - cd tools/
-    - ./gen_esp_err_to_name.py
+    - 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)
+    - ${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)
 
 push_to_github:
   stage: deploy
@@ -388,9 +467,7 @@ push_to_github:
     - echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
     - git remote remove github &>/dev/null || true
     - git remote add github git@github.com:espressif/esp-idf.git
-    # Need separate push commands for tag builds and for branch builds
-    - "[ -n \"${CI_COMMIT_TAG}\" ] && git push github ${CI_COMMIT_TAG}"
-    - "[ -z \"${CI_COMMIT_TAG}\" ] && git push github ${CI_COMMIT_SHA}:refs/heads/${CI_COMMIT_REF_NAME}"
+    - tools/ci/push_to_github.sh
 
 deploy_docs:
   stage: host_test
@@ -448,30 +525,22 @@ check_doc_links:
     - make linkcheck
 
 check_line_endings:
-  stage: deploy
+  stage: check
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
   tags:
     - build
-  except:
-    - master
-    - /^release\/v/
-    - /^v\d+\.\d+(\.\d+)?($|-)/
   dependencies: []
-  before_script: *do_nothing_before
+  before_script: *do_nothing_before_no_filter
   script:
     - tools/ci/check-line-endings.sh ${IDF_PATH}
 
 check_commit_msg:
-  stage: deploy
+  stage: check
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
   tags:
     - build
-  except:
-    - master
-    - /^release\/v/
-    - /^v\d+\.\d+(\.\d+)?($|-)/
   dependencies: []
-  before_script: *do_nothing_before
+  before_script: *do_nothing_before_no_filter
   script:
     - git status
     - git log -n10 --oneline
@@ -479,6 +548,16 @@ check_commit_msg:
     - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
 
 check_permissions:
+  stage: check
+  image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
+  tags:
+    - build
+  dependencies: []
+  before_script: *do_nothing_before_no_filter
+  script:
+    - tools/ci/check-executable.sh
+
+check_examples_cmake_make:
   stage: deploy
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
   tags:
@@ -490,21 +569,17 @@ check_permissions:
   dependencies: []
   before_script: *do_nothing_before
   script:
-    - tools/ci/check-executable.sh
+    - tools/ci/check_examples_cmake_make.sh
 
 check_submodule_sync:
-  stage: deploy
+  stage: check
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
   tags:
     - build
-  except:
-    - master
-    - /^release\/v/
-    - /^v\d+\.\d+(\.\d+)?($|-)/
   dependencies: []
   variables:
     GIT_STRATEGY: clone
-  before_script: *do_nothing_before
+  before_script: *do_nothing_before_no_filter
   script:
     # check if all submodules are correctly synced to public repostory
     - git submodule update --init --recursive
@@ -512,7 +587,7 @@ check_submodule_sync:
 assign_test:
   tags:
     - assign_test
-  image: $CI_DOCKER_REGISTRY/ubuntu-test-env$BOT_DOCKER_IMAGE_TAG
+  image: $CI_DOCKER_REGISTRY/ubuntu-test-env
   stage: assign_test
   # gitlab ci do not support match job with RegEx or wildcard now in dependencies.
   # we have a lot build example jobs. now we don't use dependencies, just download all artificats of build stage.
@@ -835,7 +910,7 @@ UT_001_25:
   tags:
     - ESP32_IDF
     - UT_T1_1
-    
+
 UT_001_26:
   <<: *unit_test_template
   tags:
@@ -871,7 +946,7 @@ UT_001_31:
   tags:
     - ESP32_IDF
     - UT_T1_1
-    
+
 UT_001_32:
   <<: *unit_test_template
   tags:
@@ -883,13 +958,25 @@ UT_001_33:
   tags:
     - ESP32_IDF
     - UT_T1_1
-    
+
 UT_001_34:
   <<: *unit_test_template
   tags:
     - ESP32_IDF
     - UT_T1_1
 
+UT_001_35:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+
+UT_001_36:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+
 UT_002_01:
   <<: *unit_test_template
   tags:
@@ -995,14 +1082,14 @@ UT_004_10:
     - ESP32_IDF
     - UT_T1_1
     - psram
-    
+
 UT_004_11:
   <<: *unit_test_template
   tags:
     - ESP32_IDF
     - UT_T1_1
     - psram
-    
+
 UT_005_01:
   <<: *unit_test_template
   tags:
@@ -1117,59 +1204,47 @@ UT_010_04:
     - UT_T1_RMT
     - psram
 
-IT_001_01:
-  <<: *test_template
-  tags:
-    - ESP32_IDF
-    - SSC_T1_1
-
-IT_001_02:
-  <<: *test_template
-  tags:
-    - ESP32_IDF
-    - SSC_T1_1
-
-IT_001_03:
-  <<: *test_template
+UT_011_01:
+  <<: *unit_test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
+    - EMMC
 
-IT_001_04:
-  <<: *test_template
+UT_011_02:
+  <<: *unit_test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
+    - EMMC
 
-IT_001_05:
-  <<: *test_template
+UT_011_03:
+  <<: *unit_test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
+    - EMMC
 
-IT_001_06:
-  <<: *test_template
+UT_601_01:
+  <<: *unit_test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
+    - UT_T1_1
 
-IT_001_07:
+IT_001_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
+    - SSC_T1_4
 
-IT_001_08:
+IT_001_02:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
+    - SSC_T1_4
 
-IT_001_09:
+IT_001_03:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
+    - SSC_T1_4
 
 IT_002_01:
   <<: *test_template
@@ -1181,168 +1256,190 @@ IT_003_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_02:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_03:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_04:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_05:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_06:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_07:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_08:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_09:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_10:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_11:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_12:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
 IT_003_13:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T2_5
 
-IT_003_14:
+IT_004_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
+    - SSC_T1_APC
 
-IT_004_01:
+IT_005_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_APC
+    - SSC_T1_5
 
-IT_005_01:
+IT_005_02:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_WEP
+    - SSC_T1_5
 
-IT_009_01:
+IT_006_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_3
+    - SSC_T1_6
 
-IT_010_01:
+IT_006_02:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T5_1
+    - SSC_T1_6
 
-IT_011_01:
+IT_006_03:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T50_1
+    - SSC_T1_6
 
-IT_501_01:
+IT_006_04:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
-    - stress_test
+    - SSC_T1_6
 
-IT_501_02:
+IT_006_05:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
-    - stress_test
+    - SSC_T1_6
 
-IT_501_03:
+IT_007_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T1_1
-    - stress_test
+    - SSC_T1_7
 
-IT_502_01:
+IT_007_02:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
-    - stress_test
+    - SSC_T1_7
 
-IT_502_02:
+IT_008_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T2_1
-    - stress_test
+    - SSC_T1_8
 
-IT_503_01:
+IT_009_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T5_1
-    - stress_test
+    - SSC_T1_3
 
-IT_503_02:
+IT_010_01:
   <<: *test_template
   tags:
     - ESP32_IDF
     - SSC_T5_1
-    - stress_test
 
-IT_503_03:
+IT_011_01:
   <<: *test_template
   tags:
     - ESP32_IDF
-    - SSC_T5_1
-    - stress_test
+    - SSC_T50_1
+
+IT_012_01:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T1_9
+
+IT_013_01:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T2_2
+
+IT_013_02:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T2_2
+
+IT_014_01:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T2_3
+
+IT_015_01:
+  <<: *test_template
+  tags:
+    - ESP32_IDF
+    - SSC_T2_4