]> granicus.if.org Git - esp-idf/blobdiff - .gitlab-ci.yml
Merge branch 'fix/spi_dma_config_in_iram' into 'master'
[esp-idf] / .gitlab-ci.yml
index 1ec6dfa1d7283b2d4823d8e71991b0c207d578d3..a28fef42912b0258f95e786979df45c987fcd5d8 100644 (file)
@@ -299,16 +299,37 @@ test_wl_on_host:
 
 test_fatfs_on_host:
   <<: *host_test_template
-  tags:
-    - wl_host_test
   script:
     - cd components/fatfs/test_fatfs_host/
     - make test
 
+test_mdns_fuzzer_on_host:
+  stage: host_test
+  image: $CI_DOCKER_REGISTRY/afl-fuzzer-test
+  tags:
+    - host_test
+  dependencies: []
+  artifacts:
+    when: always
+    paths:
+      - components/mdns/test_afl_fuzz_host/out/crashes
+    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/
+    # run AFL fuzzer for one hour
+    - ( make fuzz || pkill sleep ) &
+    - ( sleep 3600 || mkdir -p out/crashes/env_failed ) && pkill afl-fuz
+    # check no crashes found
+    - "[ -z `ls out/crashes/` ] || exit 1"
+
 test_spiffs_on_host:
   <<: *host_test_template
-  tags:
-    - wl_host_test
   script:
     - cd components/spiffs/test_spiffs_host/
     - make test
@@ -346,7 +367,7 @@ test_esp_err_to_name_on_host:
     - ./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)
 
-push_master_to_github:
+push_to_github:
   stage: deploy
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
   tags:
@@ -357,8 +378,6 @@ push_master_to_github:
     - /^v\d+\.\d+(\.\d+)?($|-)/
   when: on_success
   dependencies: []
-  variables:
-    GITHUB_PUSH_REFS: refs/remotes/origin/release refs/remotes/origin/master
   before_script: *do_nothing_before
   script:
     - mkdir -p ~/.ssh
@@ -369,12 +388,9 @@ push_master_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
-    # What the next line of script does: goes through the list of refs for all branches we push to github,
-    # generates a snippet of shell which is evaluated. The snippet checks CI_COMMIT_SHA against the SHA
-    # (aka objectname) at tip of each branch, and if any SHAs match then it checks out the local branch
-    # and then pushes that ref to a corresponding github branch
-    - eval $(git for-each-ref --shell bash --format 'if [ $CI_COMMIT_SHA == %(objectname) ]; then git checkout -B %(refname:strip=3); git push --follow-tags github %(refname:strip=3); fi;' $GITHUB_PUSH_REFS)
-
+    # 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}"
 
 deploy_docs:
   stage: host_test
@@ -431,6 +447,20 @@ check_doc_links:
     - cd docs
     - make linkcheck
 
+check_line_endings:
+  stage: deploy
+  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
+  script:
+    - tools/ci/check-line-endings.sh ${IDF_PATH}
+
 check_commit_msg:
   stage: deploy
   image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
@@ -482,7 +512,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.
@@ -860,6 +890,18 @@ UT_001_34:
     - 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:
@@ -1087,6 +1129,12 @@ UT_010_04:
     - UT_T1_RMT
     - psram
 
+UT_601_01:
+  <<: *unit_test_template
+  tags:
+    - ESP32_IDF
+    - UT_T1_1
+
 IT_001_01:
   <<: *test_template
   tags: