ci: add manual job to make sure soc caps are parsed seamlessly

This commit is contained in:
Fu Hanxi 2024-09-17 08:59:48 +02:00 committed by laokaiyao
parent a02b0c52e5
commit 44c0faed43
4 changed files with 39 additions and 0 deletions

View File

@ -402,3 +402,21 @@ test_nvs_gen_check:
script:
- cd ${IDF_PATH}/components/nvs_flash/nvs_partition_tool
- pytest --noconftest test_nvs_gen_check.py --junitxml=XUNIT_RESULT.xml
make_sure_soc_caps_compatible_in_idf_build_apps:
extends:
- .host_test_template
- .rules:dev-push
artifacts:
paths:
- new.json
- base.json
when: always
when: manual
script:
- python tools/ci/idf_build_apps_dump_soc_caps.py new.json
- git fetch --depth=1 origin $CI_MERGE_REQUEST_DIFF_BASE_SHA
- git checkout -f $CI_MERGE_REQUEST_DIFF_BASE_SHA
- git checkout $CI_COMMIT_SHA -- tools/ci/idf_build_apps_dump_soc_caps.py
- python tools/ci/idf_build_apps_dump_soc_caps.py base.json
- diff new.json base.json

View File

@ -225,6 +225,10 @@
rules:
- <<: *if-tag-release
.rules:dev-push:
rules:
- <<: *if-dev-push
# Do not upload caches on dev branches by default
.rules:upload-python-cache:
rules:

View File

@ -58,3 +58,4 @@ tools/legacy_exports/export_legacy.fish
tools/legacy_exports/export_legacy.sh
tools/legacy_exports/export_legacy.ps1
tools/legacy_exports/export_legacy.bat
tools/ci/idf_build_apps_dump_soc_caps.py

View File

@ -0,0 +1,16 @@
# SPDX-FileCopyrightText: 2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import json
from argparse import ArgumentParser
from idf_build_apps.constants import ALL_TARGETS
from idf_build_apps.manifest.soc_header import SocHeader
if __name__ == '__main__':
parser = ArgumentParser(description='Dump parsed SOC headers for all supported targets')
parser.add_argument('output', help='Output file')
args = parser.parse_args()
d = {target: SocHeader(target) for target in ALL_TARGETS}
with open(args.output, 'w') as f:
json.dump(d, f, indent=2)