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

Merge branch 'cpu-light-tag' into 'kirkstone'

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

See merge request eclipse/oniro-core/meta-openharmony!79
parents 79eb576d 4b505f6b
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,18 @@ ...@@ -27,6 +27,18 @@
# it? Can it be supported by Eclipse Foundation infrastructure? # 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 # switch between branch pipelines and merge request pipelines
workflow: workflow:
rules: rules:
...@@ -206,7 +218,12 @@ fetch: ...@@ -206,7 +218,12 @@ fetch:
- job: bitbake-builder - job: bitbake-builder
artifacts: false artifacts: false
optional: true optional: true
tags:
- cpu.light
script: 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 # Configure build to create mirror tarballs of VCS repositories
- echo 'BB_GENERATE_MIRROR_TARBALLS = "1"' >> conf/auto.conf - echo 'BB_GENERATE_MIRROR_TARBALLS = "1"' >> conf/auto.conf
# Run fetch tasks for all builds # Run fetch tasks for all builds
...@@ -234,9 +251,9 @@ fetch: ...@@ -234,9 +251,9 @@ fetch:
SOURCE_MIRROR_PATH="$CI_PROJECT_DIR/build/mirror" ; SOURCE_MIRROR_PATH="$CI_PROJECT_DIR/build/mirror" ;
fi fi
- echo "Syncing mirror files to $SOURCE_MIRROR_PATH" - echo "Syncing mirror files to $SOURCE_MIRROR_PATH"
- if [ $CI_SERVER_HOST = "gitlab.eclipse.org" -a - if [ "$CI_SERVER_HOST" = "gitlab.eclipse.org" -a
$CI_PROJECT_PATH = "eclipse/oniro-core/meta-openharmony" -a "$CI_PROJECT_PATH" = "eclipse/oniro-core/meta-openharmony" -a
$CI_COMMIT_BRANCH == "kirkstone" ] ; then "$CI_COMMIT_BRANCH" = "kirkstone" ] ; then
DO_MIRROR_UPDATES_CH=1 ; DO_MIRROR_UPDATES_CH=1 ;
fi fi
- mkdir -pv build/mirror-updates-ch - mkdir -pv build/mirror-updates-ch
...@@ -301,6 +318,8 @@ build: ...@@ -301,6 +318,8 @@ build:
after_script: after_script:
- !reference [.bitbake, after_script] - !reference [.bitbake, after_script]
- time repo/oe-core/scripts/pybootchartgui/pybootchartgui.py build/tmp-*/buildstats/* -o build/tmp-*/buildstats - time repo/oe-core/scripts/pybootchartgui/pybootchartgui.py build/tmp-*/buildstats/* -o build/tmp-*/buildstats
tags:
- cpu.heavy
parallel: parallel:
matrix: matrix:
- DISTRO: [oniro-openharmony-linux] - DISTRO: [oniro-openharmony-linux]
...@@ -328,6 +347,8 @@ ptest: ...@@ -328,6 +347,8 @@ ptest:
when: never when: never
- when: on_success - when: on_success
extends: .bitbake extends: .bitbake
tags:
- cpu.heavy
parallel: parallel:
matrix: matrix:
- DISTRO: [oniro-openharmony-linux] - DISTRO: [oniro-openharmony-linux]
...@@ -396,6 +417,8 @@ ohos_fetch: ...@@ -396,6 +417,8 @@ ohos_fetch:
image: image:
name: $OPENHARMONY_BUILDER:$OPENHARMONY_CONTAINER_VERSION name: $OPENHARMONY_BUILDER:$OPENHARMONY_CONTAINER_VERSION
extends: .openharmony_tarball extends: .openharmony_tarball
tags:
- cpu.light
parallel: parallel:
matrix: matrix:
- OPENHARMONY_VERSION: ["3.0"] - OPENHARMONY_VERSION: ["3.0"]
...@@ -451,6 +474,8 @@ ohos: ...@@ -451,6 +474,8 @@ ohos:
image: image:
name: $OPENHARMONY_BUILDER:$OPENHARMONY_CONTAINER_VERSION name: $OPENHARMONY_BUILDER:$OPENHARMONY_CONTAINER_VERSION
extends: .openharmony_tarball extends: .openharmony_tarball
tags:
- cpu.heavy
script: script:
- tar xfz $TARBALL_FILE - tar xfz $TARBALL_FILE
- cd $(basename $TARBALL_FILE .tar.gz)/OpenHarmony - cd $(basename $TARBALL_FILE .tar.gz)/OpenHarmony
......
...@@ -29,6 +29,8 @@ variables: ...@@ -29,6 +29,8 @@ variables:
entrypoint: [""] entrypoint: [""]
variables: variables:
CONTAINER_DOCKERFILE: Dockerfile CONTAINER_DOCKERFILE: Dockerfile
tags:
- cpu.light
script: script:
- CONTEXT="$CI_PROJECT_DIR/.gitlab-ci/container/$CONTAINER_PATH" - CONTEXT="$CI_PROJECT_DIR/.gitlab-ci/container/$CONTAINER_PATH"
- DOCKERFILE="$CONTEXT/$CONTAINER_DOCKERFILE" - 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