Skip to content
Snippets Groups Projects
Commit 84740d5a authored by Esben Haabendal's avatar Esben Haabendal
Browse files

CI: Apply cpu.light and cpu.heavy job tags


With this change, we will be able to schedule lightweight and heavy jobs on
different runners, thus speeding builds by providing more runners for
lightweight jobs, while controlling cpu resources for each job so that each job
get a fair share.

Signed-off-by: default avatarEsben Haabendal <esben.haabendal@huawei.com>
parent 1650d81a
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,18 @@
# it? Can it be supported by Eclipse Foundation infrastructure?
#
#
# Runner tags
#
# The meta-openharmony pipeline uses runner tags to control selection of the
# GitLab CI runners to use for each job
#
# cpu.heavy - Can cause massive CPU load on multi-core systems
# cpu.light - Does not cause much CPU load (single-threaded or I/O bound)
# region.europe - Run in Europe
# region.china - Run in China
# mirror - Deploy mirror files (combine with region.* tag)
# switch between branch pipelines and merge request pipelines
workflow:
rules:
......@@ -206,7 +218,12 @@ fetch:
- job: bitbake-builder
artifacts: false
optional: true
tags:
- cpu.light
script:
# Fetching is io-bound, not cpu-bound, so we should be able to ignore the
# runner configured max on build jobs without eating up too much cpu time.
- echo "PARALLEL_MAKE = \"-j$(nproc)\"" >> conf/auto.conf
# Configure build to create mirror tarballs of VCS repositories
- echo 'BB_GENERATE_MIRROR_TARBALLS = "1"' >> conf/auto.conf
# Run fetch tasks for all builds
......@@ -301,6 +318,8 @@ build:
after_script:
- !reference [.bitbake, after_script]
- time repo/oe-core/scripts/pybootchartgui/pybootchartgui.py build/tmp-*/buildstats/* -o build/tmp-*/buildstats
tags:
- cpu.heavy
parallel:
matrix:
- DISTRO: [oniro-openharmony-linux]
......@@ -328,6 +347,8 @@ ptest:
when: never
- when: on_success
extends: .bitbake
tags:
- cpu.heavy
parallel:
matrix:
- DISTRO: [oniro-openharmony-linux]
......@@ -395,6 +416,8 @@ ohos_fetch:
image:
name: $OPENHARMONY_BUILDER:$OPENHARMONY_CONTAINER_VERSION
extends: .openharmony_tarball
tags:
- cpu.light
parallel:
matrix:
- OPENHARMONY_VERSION: ["3.0"]
......@@ -450,6 +473,8 @@ ohos:
image:
name: $OPENHARMONY_BUILDER:$OPENHARMONY_CONTAINER_VERSION
extends: .openharmony_tarball
tags:
- cpu.heavy
script:
- tar xfz $TARBALL_FILE
- cd $(basename $TARBALL_FILE .tar.gz)/OpenHarmony
......
......@@ -29,6 +29,8 @@ variables:
entrypoint: [""]
variables:
CONTAINER_DOCKERFILE: Dockerfile
tags:
- cpu.light
script:
- CONTEXT="$CI_PROJECT_DIR/.gitlab-ci/container/$CONTAINER_PATH"
- DOCKERFILE="$CONTEXT/$CONTAINER_DOCKERFILE"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment