.gitlab-ci.yml: Post the memory numbers with esp32c3

This commit is contained in:
shripad621git
2025-01-16 16:36:19 +05:30
parent 23a9466cd3
commit 420dd62918
2 changed files with 14 additions and 5 deletions
+9
View File
@@ -342,6 +342,7 @@ build_esp_matter_examples_pytest_C2_idf_v5_1:
echo "Not a Merge Request pipeline. Skipping post_results.py."
fi
build_ext_plat_c6_thread_controller_examples:
extends:
- .build_examples_template
@@ -394,6 +395,14 @@ build_esp_matter_examples:
- python tools/ci/build_apps.py ./examples --no_pytest
--parallel-count ${CI_NODE_TOTAL:-1}
--parallel-index ${CI_NODE_INDEX:-1}
- |
if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ] && [ "${CI_NODE_INDEX:-1}" -eq 2 ]; then
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"
else
echo "Not a Merge Request pipeline. Skipping post_results.py."
fi
parallel: 2
build_nopytest_remaining_examples_manual:
+5 -5
View File
@@ -24,7 +24,7 @@ def fetch_pipeline_for_commit(commit_sha, branch_name="main"):
response.raise_for_status()
pipelines = response.json()
if not pipelines:
raise ValueError(f"No pipeline found for commit: {commit_sha} on branch: {branch_name}")
raise ValueError(f"No pipeline found for commit: {commit_sha} on branch: {branch_name}.")
return pipelines[0]['id']
# Fetch the versions for the gitlab MR.
@@ -55,11 +55,11 @@ def download_ref_map_file(chip_name, job_id, output_file):
f.write(chunk)
# Locate the map file artifact for the current pipeline.
def locate_current_map_file(example):
pattern = f"examples/{example}/build*/{example}.map"
def locate_current_map_file(chip, example):
pattern = f"examples/{example}/build_{chip}_default/{example}.map"
artifact_file_paths = glob.glob(pattern, recursive=True)
if not artifact_file_paths:
raise FileNotFoundError("No map file found!")
raise FileNotFoundError("No map file found for the example {example} with target chip {chip}")
return artifact_file_paths[0]
# Execute esp_idf_size diff command to find increase/decrease in firmware size.
@@ -113,8 +113,8 @@ def main():
if not target_job_id:
raise ValueError("Target job not found.")
current_map_file = locate_current_map_file(args.chip, args.example)
download_ref_map_file(args.chip, target_job_id, args.ref_map_file)
current_map_file = locate_current_map_file(args.example)
size_diff_output = execute_idf_size_command(args.ref_map_file, current_map_file)
post_results_to_gitlab_mr(size_diff_output, args.chip, args.example)