Skip to content

Commit 561f53c

Browse files
committed
Merge branch 'ci/remove-submodule-fetch-script' into 'master'
Ci/remove submodule fetch script Closes IDFCI-2980 See merge request espressif/esp-idf!39992
2 parents d8fa822 + 0af3e2b commit 561f53c

File tree

14 files changed

+55
-163
lines changed

14 files changed

+55
-163
lines changed

.gitlab/ci/build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,7 @@
33
extends:
44
- .after_script:build:ccache-show-stats:upload-failed-job-logs
55
image: $ESP_ENV_IMAGE
6-
tags:
7-
- build
8-
# build only on shiny servers since shiny storage server is at the same location
9-
- shiny
6+
tags: [build, shiny]
107
variables:
118
# Enable ccache for all build jobs. See configure_ci_environment.sh for more ccache related settings.
129
IDF_CCACHE_ENABLE: "1"

.gitlab/ci/common.yml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,15 @@ variables:
3030
# - set GIT_STRATEGY: "clone" to shiny runners
3131
# - set GIT_STRATEGY: "fetch" to brew runners
3232
GIT_STRATEGY: clone
33-
# we will download archive for each submodule instead of clone.
34-
# we don't do "recursive" when fetch submodule as they're not used in CI now.
35-
GIT_SUBMODULE_STRATEGY: none
36-
# since we're using merged-result pipelines, the last commit should work for most cases
3733
GIT_DEPTH: 1
38-
# --no-recurse-submodules: we use cache for submodules
34+
GIT_SUBMODULE_STRATEGY: none # here we use cache for submodules, so we don't need to fetch them every time
35+
# since we're using merged-result pipelines, the last commit should work for most cases
3936
# --prune --prune-tags: in case remote branch or tag is force pushed
4037
GIT_FETCH_EXTRA_FLAGS: "--no-recurse-submodules --prune --prune-tags"
4138
# we're using .cache folder for caches
4239
GIT_CLEAN_FLAGS: -ffdx -e .cache/
4340
LATEST_GIT_TAG: v6.0-dev
4441

45-
SUBMODULE_FETCH_TOOL: "tools/ci/ci_fetch_submodule.py"
46-
# by default we will fetch all submodules
47-
# jobs can overwrite this variable to only fetch submodules they required
48-
# set to "none" if don't need to fetch submodules
49-
SUBMODULES_TO_FETCH: "all"
50-
# tell build system do not check submodule update as we download archive instead of clone
51-
IDF_SKIP_CHECK_SUBMODULES: 1
52-
5342
IDF_PATH: "$CI_PROJECT_DIR"
5443
V: "0"
5544
CHECKOUT_REF_SCRIPT: "$CI_PROJECT_DIR/tools/ci/checkout_project_ref.py"
@@ -392,11 +381,9 @@ default:
392381
paths:
393382
- .cache/pip
394383
policy: pull
395-
- key: submodule-cache-${LATEST_GIT_TAG}
396-
fallback_keys:
397-
- submodule-cache
384+
- key: git-submodule-cache-${LATEST_GIT_TAG}
398385
paths:
399-
- .cache/submodule_archives
386+
- .git/modules
400387
policy: pull
401388
before_script:
402389
- *common-before_scripts

.gitlab/ci/deploy.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ check_submodule_sync:
1111
tags: [ brew, github_sync ]
1212
retry: 2
1313
variables:
14-
# for brew runners, we always set GIT_STRATEGY to fetch
15-
GIT_STRATEGY: fetch
16-
SUBMODULES_TO_FETCH: "none"
14+
GIT_STRATEGY: fetch # use brew local mirror first
1715
PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
1816
dependencies: []
1917
script:
@@ -36,10 +34,8 @@ push_to_github:
3634
- check_submodule_sync
3735
tags: [ brew, github_sync ]
3836
variables:
39-
# for brew runners, we always set GIT_STRATEGY to fetch
40-
GIT_STRATEGY: fetch
41-
# github also need full record of commits
42-
GIT_DEPTH: 0
37+
GIT_STRATEGY: fetch # use brew local mirror first
38+
GIT_DEPTH: 0 # github needs full record of commits
4339
script:
4440
- add_github_ssh_keys
4541
- git remote remove github &>/dev/null || true
@@ -58,11 +54,11 @@ deploy_update_SHA_in_esp-dockerfiles:
5854
dependencies: []
5955
variables:
6056
GIT_DEPTH: 2
61-
tags: [ shiny, build ]
57+
tags: [build, shiny]
6258
script:
6359
- 'curl --header "PRIVATE-TOKEN: ${ESPCI_SCRIPTS_TOKEN}" -o create_MR_in_esp_dockerfile.sh $GITLAB_HTTP_SERVER/api/v4/projects/1260/repository/files/create_MR_in_esp_dockerfile%2Fcreate_MR_in_esp_dockerfile.sh/raw\?ref\=master'
6460
- chmod +x create_MR_in_esp_dockerfile.sh
6561
- ./create_MR_in_esp_dockerfile.sh
6662
environment:
67-
name: eploy_update_SHA_in_esp-dockerfiles_production
63+
name: deploy_update_SHA_in_esp-dockerfiles_production
6864
deployment_tier: production

.gitlab/ci/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
check_readme_links:
5959
extends:
6060
- .pre_check_template
61-
tags: ["build", "amd64", "internet"]
61+
tags: ["amd64", "brew"]
6262
allow_failure: true
6363
rules:
6464
- <<: *if-protected-check

.gitlab/ci/host-test.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
extends: .rules:test:host_test
33
stage: host_test
44
image: $ESP_ENV_IMAGE
5-
tags:
6-
- host_test
5+
tags: [build, shiny]
76
dependencies: # set dependencies to null to avoid missing artifacts issue
87
# run host_test jobs immediately, only after upload cache
98
needs:
@@ -384,8 +383,6 @@ test_idf_pytest_plugin:
384383
extends:
385384
- .host_test_template
386385
- .rules:patterns:idf-pytest-plugin
387-
variables:
388-
SUBMODULES_TO_FETCH: "none"
389386
artifacts:
390387
reports:
391388
junit: XUNIT_RESULT.xml

.gitlab/ci/integration_test.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ gen_integration_pipeline:
3636
cache: []
3737
tags: [fast_run, shiny]
3838
variables:
39-
SUBMODULES_TO_FETCH: "none"
4039
GIT_LFS_SKIP_SMUDGE: 1
4140
needs:
4241
- job: fast_template_app

.gitlab/ci/pre_check.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
.pre_check_template:
22
stage: pre_check
33
image: $ESP_ENV_IMAGE
4-
tags:
5-
- host_test
4+
tags: [build, shiny]
65
dependencies: # set dependencies to null to avoid missing artifacts issue
76

87
check_version:
@@ -16,7 +15,6 @@ check_version:
1615
# need a full clone to get the latest tag
1716
# the --shallow-since=$(git log -1 --format=%as $LATEST_GIT_TAG) option is not accurate
1817
GIT_STRATEGY: fetch
19-
SUBMODULES_TO_FETCH: "none"
2018
GIT_DEPTH: 0
2119
script:
2220
- export IDF_PATH=$PWD
@@ -34,8 +32,6 @@ check_blobs:
3432
extends:
3533
- .pre_check_template
3634
- .rules:build:check
37-
variables:
38-
SUBMODULES_TO_FETCH: "components/esp_wifi/lib;components/esp_phy/lib;components/esp_coex/lib"
3935
script:
4036
# Check if Wi-Fi library header files match between IDF and the version used when compiling the libraries
4137
- IDF_TARGET=esp32 $IDF_PATH/components/esp_wifi/test_md5/test_md5.sh
@@ -108,7 +104,6 @@ check_version_tag:
108104
# need a full clone to get the latest tag
109105
# the --shallow-since=$(git log -1 --format=%as $LATEST_GIT_TAG) option is not accurate
110106
GIT_STRATEGY: fetch
111-
SUBMODULES_TO_FETCH: "none"
112107
GIT_DEPTH: 0
113108
script:
114109
- (git cat-file -t $CI_COMMIT_REF_NAME | grep tag) || (echo "ESP-IDF versions must be annotated tags." && exit 1)
@@ -211,13 +206,12 @@ baseline_manifest_sha:
211206
when: always
212207

213208
redundant_pass_job:
214-
stage: pre_check
209+
extends:
210+
- .pre_check_template
215211
tags: [shiny, fast_run]
216-
image: $ESP_ENV_IMAGE
217-
dependencies: null
218-
before_script: []
219212
cache: []
220-
extends: []
213+
variables:
214+
GIT_STRATEGY: none
215+
before_script: []
221216
script:
222217
- echo "This job is redundant to ensure the 'retry_failed_jobs' job can exist and not be skipped"
223-
when: always

.gitlab/ci/pre_commit.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ check_pre_commit_upload_cache:
2424
paths:
2525
- .cache/pre-commit
2626
policy: pull-push
27-
- key: submodule-cache-${LATEST_GIT_TAG}
27+
- key: git-submodule-cache-${LATEST_GIT_TAG}
2828
paths:
29-
- .cache/submodule_archives
29+
- .git/modules
3030
policy: pull
3131

3232
check_pre_commit:
@@ -41,9 +41,9 @@ check_pre_commit:
4141
paths:
4242
- .cache/pre-commit
4343
policy: pull
44-
- key: submodule-cache-${LATEST_GIT_TAG}
44+
- key: git-submodule-cache-${LATEST_GIT_TAG}
4545
paths:
46-
- .cache/submodule_archives
46+
- .git/modules
4747
policy: pull
4848

4949
check_powershell:
@@ -74,7 +74,7 @@ check_powershell:
7474
paths:
7575
- .cache/pre-commit
7676
policy: pull
77-
- key: submodule-cache-${LATEST_GIT_TAG}
77+
- key: git-submodule-cache-${LATEST_GIT_TAG}
7878
paths:
79-
- .cache/submodule_archives
79+
- .git/modules
8080
policy: pull

.gitlab/ci/rules.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@
249249
changes: *patterns-submodule
250250
- <<: *if-label-upload_cache
251251
when: manual
252+
- <<: *if-dev-push
253+
changes:
254+
- .gitlab/ci/upload_cache.yml
252255

253256
### Patterns ###
254257
.rules:patterns:clang_tidy:

.gitlab/ci/test-win.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
extends: .rules:test:host_test
44
stage: host_test
55
image: $ESP_ENV_IMAGE
6-
tags:
7-
- windows-build
6+
tags: [windows-build, brew]
87
dependencies: # set dependencies to null to avoid missing artifacts issue
98
# run host_test jobs immediately, only after upload cache
109
needs:
@@ -14,6 +13,8 @@
1413
- job: upload-submodules-cache
1514
optional: true
1615
artifacts: false
16+
variables:
17+
GIT_STRATEGY: fetch # use brew local mirror first
1718
before_script: []
1819
after_script: []
1920

@@ -61,7 +62,7 @@ test_tools_win:
6162
- python -m pip install jsonschema
6263
- .\install.ps1 --enable-ci --enable-pytest
6364
- .\export.ps1
64-
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
65+
- git submodule update --init
6566
- cd ${IDF_PATH}/tools/test_idf_py
6667
- pytest --noconftest test_idf_py.py --junitxml=${IDF_PATH}/XUNIT_IDF_PY.xml
6768
- pytest --noconftest test_hints.py --junitxml=${IDF_PATH}/XUNIT_HINTS.xml
@@ -79,7 +80,7 @@ test_tools_win:
7980
script:
8081
- .\install.ps1 --enable-ci --enable-pytest
8182
- . .\export.ps1
82-
- python "${SUBMODULE_FETCH_TOOL}" -s "all"
83+
- git submodule update --init
8384
- cd ${IDF_PATH}\tools\test_build_system
8485
- pytest --parallel-count ${CI_NODE_TOTAL} --parallel-index ${CI_NODE_INDEX} --junitxml=${CI_PROJECT_DIR}\XUNIT_RESULT.xml
8586

@@ -89,8 +90,7 @@ pytest_build_system_win:
8990
- .rules:labels:windows_pytest_build_system
9091
parallel: 2
9192
needs: []
92-
tags:
93-
- windows-build
93+
tags: [windows-build, brew]
9494
artifacts:
9595
paths:
9696
- XUNIT_RESULT.xml

0 commit comments

Comments
 (0)