From a1f7f94ef9c955209f6e220135a3ac66542ea9f5 Mon Sep 17 00:00:00 2001 From: Fu Hanxi Date: Wed, 31 Jan 2024 08:49:46 +0100 Subject: [PATCH] ci: upload size info, and build junit report --- tools/ci/artifacts_handler.py | 1 + tools/ci/idf_ci/uploader.py | 17 +++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/tools/ci/artifacts_handler.py b/tools/ci/artifacts_handler.py index 2afd34e8dd..a6f5f6a365 100644 --- a/tools/ci/artifacts_handler.py +++ b/tools/ci/artifacts_handler.py @@ -53,6 +53,7 @@ TYPE_PATTERNS_DICT = { ], ArtifactType.JUNIT_REPORTS: [ 'XUNIT_RESULT*.xml', + 'build_summary*.xml', ], ArtifactType.MODIFIED_FILES_AND_COMPONENTS_REPORT: [ 'pipeline.env', diff --git a/tools/ci/idf_ci/uploader.py b/tools/ci/idf_ci/uploader.py index 4d55ac304c..47dfcd7a43 100644 --- a/tools/ci/idf_ci/uploader.py +++ b/tools/ci/idf_ci/uploader.py @@ -59,6 +59,9 @@ class AppUploader(AppDownloader): ArtifactType.LOGS: [ DEFAULT_BUILD_LOG_FILENAME, ], + ArtifactType.SIZE_REPORTS: [ + '**/build*/size.json', + ], } def __init__(self, pipeline_id: t.Union[str, int, None] = None) -> None: @@ -91,7 +94,6 @@ class AppUploader(AppDownloader): try: if has_file: obj_name = self.get_app_object_name(app_path, zip_filename, artifact_type) - print(f'Created archive file: {zip_filename}, uploading as {obj_name}') self._client.fput_object(getenv('IDF_S3_BUCKET'), obj_name, zip_filename) uploaded = True finally: @@ -101,14 +103,13 @@ class AppUploader(AppDownloader): def upload_app(self, app_build_path: str, artifact_type: t.Optional[ArtifactType] = None) -> None: uploaded = False if not artifact_type: - for _artifact_type in [ - ArtifactType.MAP_AND_ELF_FILES, - ArtifactType.BUILD_DIR_WITHOUT_MAP_AND_ELF_FILES, - ArtifactType.LOGS, - ]: - uploaded |= self._upload_app(app_build_path, _artifact_type) + upload_types: t.Iterable[ArtifactType] = self.TYPE_PATTERNS_DICT.keys() else: - uploaded = self._upload_app(app_build_path, artifact_type) + upload_types = [artifact_type] + + print(f'Uploading {app_build_path} {[k.value for k in upload_types]} to minio server') + for upload_type in upload_types: + uploaded |= self._upload_app(app_build_path, upload_type) if uploaded: rmdir(app_build_path, exclude_file_patterns=DEFAULT_BUILD_LOG_FILENAME)