diff options
author | Jeremy Bettis <jbettis@google.com> | 2022-09-14 15:44:12 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-09-15 20:04:35 +0000 |
commit | f4090e1a96ef338786f969f009ada7d97aa9910d (patch) | |
tree | d18c939809a0893d7aae31d855d1b276187a6dda /.gitlab-ci.yml | |
parent | b4396a37cc1a607410fb417135136e3196d505ce (diff) | |
download | chrome-ec-f4090e1a96ef338786f969f009ada7d97aa9910d.tar.gz |
gitlab: Shard zephyr_boards_coverage job into 5
The zephyr_boards_coverage job sometimes times out after 2 hours. While
I think I fixed the problem with the slow runner, splitting this into
shards is also a good idea.
BRANCH=None
BUG=b:244590155
TEST=https://gitlab.com/zephyr-ec/ec/-/pipelines/640483665
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: If37d2ddcbd64c4f2b7e7ab240e75218ed24aece0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3896634
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r-- | .gitlab-ci.yml | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 10f9aa0629..8c7f123851 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -272,14 +272,19 @@ zephyr_coverage: zephyr_boards_coverage: stage: build needs: [] + parallel: 5 script: - cd ${EC_DIR} + - projects=( $(zmake --zephyr-base "${ZEPHYR_BASE}" + --modules-dir "${MODULES_DIR}" list-projects | + split -n r/"${CI_NODE_INDEX}"/"${CI_NODE_TOTAL}") ) - zmake --zephyr-base "${ZEPHYR_BASE}" --modules-dir "${MODULES_DIR}" -l DEBUG build - --coverage --boards-only --delete-intermediates + --coverage --delete-intermediates "${projects[@]}" + - mv build/zephyr/all_builds.info "build/zephyr/all_builds${CI_NODE_INDEX}.info" artifacts: paths: - - ec_dir/build/zephyr/all_builds.info + - ec_dir/build/zephyr/all_builds*.info expire_in: 1 week coverage: '/lines\.*: \d+\.\d+%/' @@ -302,7 +307,7 @@ merged_coverage: "${EC_DIR}/zephyr/emul/**" "${EC_DIR}/zephyr/test/**" "**/testsuite/**" "**/subsys/emul/**" - lcov --rc lcov_branch_coverage=1 -o "${BUILD_DIR}/all_builds_merged.info" - -a "${BUILD_DIR}/zephyr/all_builds.info" -a ${BUILD_DIR}/merged.info + -a ${BUILD_DIR}/merged.info $(printf ' -a %s' ${BUILD_DIR}/zephyr/all_builds[0-9]*.info) - lcov --rc lcov_branch_coverage=1 -o "${BUILD_DIR}/all_builds_no_zephyr.info" -r "${BUILD_DIR}/all_builds_merged.info" "${ZEPHYR_BASE}/**" "${ZEPHYR_BASE}/**" "${MODULES_DIR}/**" @@ -313,7 +318,7 @@ merged_coverage: "${EC_DIR}/zephyr/shim/chip/npcx/npcx_monitor/**" "${EC_DIR}/zephyr/emul/**" "${EC_DIR}/zephyr/test/**" "**/testsuite/**" "**/subsys/emul/**" - - grep "SF:" "${BUILD_DIR}/zephyr/all_builds.info" | sort -u | + - grep -h "SF:" ${BUILD_DIR}/zephyr/all_builds[0-9]*.info | sort -u | sed -e 's|^SF:||' | xargs lcov --rc lcov_branch_coverage=1 -o "${BUILD_DIR}/all_builds_filtered.info" -e "${BUILD_DIR}/all_builds_no_zephyr.info" |