Skip to content

Commit 3044b5b

Browse files
committed
Merge branch 'ci/c3_memory_numbers' into 'main'
.gitlab-ci.yml: Post the memory numbers with esp32c3 See merge request app-frameworks/esp-matter!1014
2 parents d051e51 + 420dd62 commit 3044b5b

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

.gitlab-ci.yml

+9
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ build_esp_matter_examples_pytest_C2_idf_v5_1:
342342
echo "Not a Merge Request pipeline. Skipping post_results.py."
343343
fi
344344
345+
345346
build_ext_plat_c6_thread_controller_examples:
346347
extends:
347348
- .build_examples_template
@@ -394,6 +395,14 @@ build_esp_matter_examples:
394395
- python tools/ci/build_apps.py ./examples --no_pytest
395396
--parallel-count ${CI_NODE_TOTAL:-1}
396397
--parallel-index ${CI_NODE_INDEX:-1}
398+
- |
399+
if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ] && [ "${CI_NODE_INDEX:-1}" -eq 2 ]; then
400+
python tools/ci/post_results.py --chip esp32c3 --job_name "build_esp_matter_examples 2/2" --ref_map_file light_mr_base.map --example "light"
401+
else
402+
echo "Not a Merge Request pipeline. Skipping post_results.py."
403+
fi
404+
405+
397406
parallel: 2
398407

399408
build_nopytest_remaining_examples_manual:

tools/ci/post_results.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def fetch_pipeline_for_commit(commit_sha, branch_name="main"):
2424
response.raise_for_status()
2525
pipelines = response.json()
2626
if not pipelines:
27-
raise ValueError(f"No pipeline found for commit: {commit_sha} on branch: {branch_name}")
27+
raise ValueError(f"No pipeline found for commit: {commit_sha} on branch: {branch_name}.")
2828
return pipelines[0]['id']
2929

3030
# Fetch the versions for the gitlab MR.
@@ -55,11 +55,11 @@ def download_ref_map_file(chip_name, job_id, output_file):
5555
f.write(chunk)
5656

5757
# Locate the map file artifact for the current pipeline.
58-
def locate_current_map_file(example):
59-
pattern = f"examples/{example}/build*/{example}.map"
58+
def locate_current_map_file(chip, example):
59+
pattern = f"examples/{example}/build_{chip}_default/{example}.map"
6060
artifact_file_paths = glob.glob(pattern, recursive=True)
6161
if not artifact_file_paths:
62-
raise FileNotFoundError("No map file found!")
62+
raise FileNotFoundError("No map file found for the example {example} with target chip {chip}")
6363
return artifact_file_paths[0]
6464

6565
# Execute esp_idf_size diff command to find increase/decrease in firmware size.
@@ -113,8 +113,8 @@ def main():
113113
if not target_job_id:
114114
raise ValueError("Target job not found.")
115115

116+
current_map_file = locate_current_map_file(args.chip, args.example)
116117
download_ref_map_file(args.chip, target_job_id, args.ref_map_file)
117-
current_map_file = locate_current_map_file(args.example)
118118

119119
size_diff_output = execute_idf_size_command(args.ref_map_file, current_map_file)
120120
post_results_to_gitlab_mr(size_diff_output, args.chip, args.example)

0 commit comments

Comments
 (0)