Skip to content

Commit 44c0fae

Browse files
hfudevL-KAYA
authored andcommitted
ci: add manual job to make sure soc caps are parsed seamlessly
1 parent a02b0c5 commit 44c0fae

File tree

4 files changed

+39
-0
lines changed

4 files changed

+39
-0
lines changed

.gitlab/ci/host-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,3 +402,21 @@ test_nvs_gen_check:
402402
script:
403403
- cd ${IDF_PATH}/components/nvs_flash/nvs_partition_tool
404404
- pytest --noconftest test_nvs_gen_check.py --junitxml=XUNIT_RESULT.xml
405+
406+
make_sure_soc_caps_compatible_in_idf_build_apps:
407+
extends:
408+
- .host_test_template
409+
- .rules:dev-push
410+
artifacts:
411+
paths:
412+
- new.json
413+
- base.json
414+
when: always
415+
when: manual
416+
script:
417+
- python tools/ci/idf_build_apps_dump_soc_caps.py new.json
418+
- git fetch --depth=1 origin $CI_MERGE_REQUEST_DIFF_BASE_SHA
419+
- git checkout -f $CI_MERGE_REQUEST_DIFF_BASE_SHA
420+
- git checkout $CI_COMMIT_SHA -- tools/ci/idf_build_apps_dump_soc_caps.py
421+
- python tools/ci/idf_build_apps_dump_soc_caps.py base.json
422+
- diff new.json base.json

.gitlab/ci/rules.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,10 @@
225225
rules:
226226
- <<: *if-tag-release
227227

228+
.rules:dev-push:
229+
rules:
230+
- <<: *if-dev-push
231+
228232
# Do not upload caches on dev branches by default
229233
.rules:upload-python-cache:
230234
rules:

tools/ci/exclude_check_tools_files.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ tools/legacy_exports/export_legacy.fish
5858
tools/legacy_exports/export_legacy.sh
5959
tools/legacy_exports/export_legacy.ps1
6060
tools/legacy_exports/export_legacy.bat
61+
tools/ci/idf_build_apps_dump_soc_caps.py
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
2+
# SPDX-License-Identifier: Apache-2.0
3+
import json
4+
from argparse import ArgumentParser
5+
6+
from idf_build_apps.constants import ALL_TARGETS
7+
from idf_build_apps.manifest.soc_header import SocHeader
8+
9+
if __name__ == '__main__':
10+
parser = ArgumentParser(description='Dump parsed SOC headers for all supported targets')
11+
parser.add_argument('output', help='Output file')
12+
args = parser.parse_args()
13+
14+
d = {target: SocHeader(target) for target in ALL_TARGETS}
15+
with open(args.output, 'w') as f:
16+
json.dump(d, f, indent=2)

0 commit comments

Comments
 (0)