CI: Add gitlab tags to builds which can use all CPUs
Most gitlab runners are mostly idle at present and could happily run several jobs at once. There are a few exceptions, such as the world builds. Add a 'single' tag for the exceptions so that they are dealt with separately, with no concurrency. This is not quite perfect, since it means that a 'single' job can be combined with a number of normal jobs, but in practice this doesn't seem to matter. To use this, for each existing machine, add a new, separate runner, with the tag 'single'. Set 'limit = 1' in its config.toml file and set 'concurrent = 10' (for example) in the global section. The machine will then pick up one 'single' job and up to 9 other jobs at once. In my testing this reduces the time to complete a CI pipeline. My choice of which jobs to mark as single is mostly down to how much CPU they need. For the 'docs' job, it runs for a short time, so doesn't seem worth marking it as a 'single' job. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
@@ -110,6 +110,8 @@ stages:
|
||||
|
||||
build all 32bit ARM platforms:
|
||||
extends: .world_build
|
||||
tags:
|
||||
- single
|
||||
script:
|
||||
- ret=0;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
@@ -122,6 +124,8 @@ build all 32bit ARM platforms:
|
||||
|
||||
build all 64bit ARM platforms:
|
||||
extends: .world_build
|
||||
tags:
|
||||
- single
|
||||
script:
|
||||
- virtualenv -p /usr/bin/python3 /tmp/venv
|
||||
- . /tmp/venv/bin/activate
|
||||
@@ -136,6 +140,8 @@ build all 64bit ARM platforms:
|
||||
|
||||
build all PowerPC platforms:
|
||||
extends: .world_build
|
||||
tags:
|
||||
- single
|
||||
script:
|
||||
- ret=0;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
@@ -147,6 +153,8 @@ build all PowerPC platforms:
|
||||
|
||||
build all other platforms:
|
||||
extends: .world_build
|
||||
tags:
|
||||
- single
|
||||
script:
|
||||
- ret=0;
|
||||
git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||
@@ -192,6 +200,8 @@ Check for configs without MAINTAINERS entry:
|
||||
# Ensure host tools build
|
||||
Build tools-only and envtools:
|
||||
extends: .testsuites
|
||||
tags:
|
||||
- single
|
||||
script:
|
||||
- make tools-only_config tools-only -j$(nproc);
|
||||
make mrproper;
|
||||
@@ -224,6 +234,8 @@ Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||
# Check for any pylint regressions
|
||||
Run pylint:
|
||||
extends: .testsuites
|
||||
tags:
|
||||
- single
|
||||
script:
|
||||
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
||||
- pip install -r test/py/requirements.txt
|
||||
|
||||
Reference in New Issue
Block a user