From 10f51ed547f44685364578348de6ce3207979e67 Mon Sep 17 00:00:00 2001 From: Jeremy Bettis Date: Tue, 14 Sep 2021 12:55:43 -0600 Subject: gitlab: Generate ram/rom reports for each build There is some garbage ninja messages at the top of the txt versions of the reports, but the json reports are good. BUG=None TEST=Ran cmds in docker BRANCH=None Signed-off-by: Jeremy Bettis Change-Id: Iac287da55beef7e0896d37416fd9ae943c48eaeb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3160502 Commit-Queue: Jeremy Bettis Tested-by: Jeremy Bettis Reviewed-by: Keith Short --- .gitlab-ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f1bb712c62..f4bcdc15af 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -40,6 +40,9 @@ before_script: - export BUILD_DIR=build - export ZEPHYR_DIR=/zephyr - export PATH="$PATH:$HOME/.local/bin" + - python3 -m pip install anytree --user + - python3 -m pip install pyelftools --user + - export PYTHONIOENCODING=utf-8 # Users of this template must set: # $PROJECT to the project to build in zephyr/projects. E.g. "lazor") @@ -52,6 +55,13 @@ before_script: --modules-dir "${MODULES_DIR}" -l DEBUG configure -b -B "${BUILD_DIR}/${PROJECT}" -t ${TOOLCHAIN:-zephyr} zephyr/projects/${PROJECT_SUBDIR}${PROJECT} + - for b in "${BUILD_DIR}/${PROJECT}"/build-* ; do + bdir=$(basename ${b}) ; + ninja -C ${b} ram_report >"${BUILD_DIR}/${PROJECT}/output/${bdir}_ram_report.txt" ; + cp ${b}/ram.json "${BUILD_DIR}/${PROJECT}/output/${bdir}_ram.json" ; + ninja -C ${b} rom_report >"${BUILD_DIR}/${PROJECT}/output/${bdir}_rom_report.txt" ; + cp ${b}/rom.json "${BUILD_DIR}/${PROJECT}/output/${bdir}_rom.json" ; + done - ls "${BUILD_DIR}/${PROJECT}" "${BUILD_DIR}/${PROJECT}/output" artifacts: paths: -- cgit v1.2.1