check.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # copy from .gitlab-ci.yml as anchor is not global
  2. .show_submodule_urls: &show_submodule_urls |
  3. git config --get-regexp '^submodule\..*\.url$' || true
  4. check_line_endings:
  5. extends: .check_job_template
  6. script:
  7. - tools/ci/check-line-endings.sh ${IDF_PATH}
  8. check_commit_msg:
  9. extends: .check_job_template
  10. script:
  11. - git status
  12. - git log -n10 --oneline
  13. # commit start with "WIP: " need to be squashed before merge
  14. - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'
  15. check_permissions:
  16. extends: .check_job_template
  17. script:
  18. - tools/ci/check-executable.sh
  19. check_version:
  20. extends: .check_job_template
  21. # Don't run this for feature/bugfix branches, so that it is possible to modify
  22. # esp_idf_version.h in a branch before tagging the next version.
  23. only:
  24. - master
  25. - /^release\/v/
  26. - /^v\d+\.\d+(\.\d+)?($|-)/
  27. script:
  28. - export IDF_PATH=$PWD
  29. - tools/ci/check_idf_version.sh
  30. check_examples_cmake_make:
  31. extends: .check_job_template_with_filter
  32. except:
  33. - master
  34. - /^release\/v/
  35. - /^v\d+\.\d+(\.\d+)?($|-)/
  36. script:
  37. - tools/ci/check_examples_cmake_make.sh
  38. check_python_style:
  39. extends: .check_job_template_with_filter
  40. artifacts:
  41. when: on_failure
  42. paths:
  43. - flake8_output.txt
  44. expire_in: 1 week
  45. script:
  46. # run it only under Python 3 (it is very slow under Python 2)
  47. - ${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
  48. check_kconfigs:
  49. extends: .check_job_template_with_filter
  50. artifacts:
  51. when: on_failure
  52. paths:
  53. - components/*/Kconfig*.new
  54. - examples/*/*/*/Kconfig*.new
  55. - examples/*/*/*/*/Kconfig*.new
  56. - tools/*/Kconfig*.new
  57. - tools/*/*/Kconfig*.new
  58. - tools/*/*/*/Kconfig*.new
  59. expire_in: 1 week
  60. script:
  61. - ${IDF_PATH}/tools/ci/multirun_with_pyenv.sh ${IDF_PATH}/tools/test_check_kconfigs.py
  62. - ${IDF_PATH}/tools/check_kconfigs.py
  63. check_deprecated_kconfig_options:
  64. extends: .check_job_template_with_filter
  65. script:
  66. - ${IDF_PATH}/tools/ci/check_deprecated_kconfigs.py
  67. check_ut_cmake_make:
  68. extends: .check_job_template_with_filter
  69. stage: check
  70. image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
  71. tags:
  72. - build
  73. except:
  74. - master
  75. - /^release\/v/
  76. - /^v\d+\.\d+(\.\d+)?($|-)/
  77. dependencies: []
  78. script:
  79. - tools/ci/check_ut_cmake_make.sh
  80. check_submodule_sync:
  81. extends: .check_job_template
  82. tags:
  83. - github_sync
  84. retry: 2
  85. variables:
  86. GIT_STRATEGY: clone
  87. SUBMODULES_TO_FETCH: "none"
  88. PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
  89. before_script: []
  90. after_script: []
  91. script:
  92. - git submodule deinit --force .
  93. # setting the default remote URL to the public one, to resolve relative location URLs
  94. - git config remote.origin.url ${PUBLIC_IDF_URL}
  95. # check if all submodules are correctly synced to public repostory
  96. - git submodule init
  97. - *show_submodule_urls
  98. - git submodule update --recursive
  99. - echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"
  100. check_artifacts_expire_time:
  101. extends: .check_job_template
  102. script:
  103. # check if we have set expire time for all artifacts
  104. - python tools/ci/check_artifacts_expire_time.py
  105. check_pipeline_triggered_by_label:
  106. extends: .check_job_template
  107. stage: post_check
  108. only:
  109. variables:
  110. - $BOT_TRIGGER_WITH_LABEL
  111. script:
  112. # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
  113. # We want to make sure some jobs are always executed to detect regression.
  114. - test "$BOT_LABEL_REGULAR_TEST" = "true" || { echo "CI can only pass if 'regular_test' label is included"; exit -1; }