From d98e3dadd4ec818480c367a009a5c877e4013292 Mon Sep 17 00:00:00 2001 From: Daniel Stone Date: Mon, 21 Jun 2021 20:36:48 +0100 Subject: [PATCH] CI: Use appropriate parallelism for container builds The shared runners export ${FDO_CI_CONCURRENT} for the appropriate number of CPUs we should use during our builds. Signed-off-by: Daniel Stone --- .gitlab-ci.yml | 2 +- .gitlab-ci/debian-install.sh | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 030db11b..d8deb29b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -25,7 +25,7 @@ stages: .debian: variables: FDO_DISTRIBUTION_VERSION: buster - FDO_DISTRIBUTION_EXEC: 'bash .gitlab-ci/debian-install.sh' + FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh' FDO_DISTRIBUTION_TAG: '2021-07-31.0-pipewire' .ci-rules: diff --git a/.gitlab-ci/debian-install.sh b/.gitlab-ci/debian-install.sh index 7899e42a..49640be9 100644 --- a/.gitlab-ci/debian-install.sh +++ b/.gitlab-ci/debian-install.sh @@ -2,6 +2,11 @@ set -o xtrace -o errexit +# Set concurrency to an appropriate level for our shared runners, falling back +# to the conservative default from before we had this variable. +export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}" +export NINJAFLAGS="-j${FDO_CI_CONCURRENT:-4}" + # These get temporary installed for building Linux and then force-removed. LINUX_DEV_PKGS=" bc @@ -109,7 +114,7 @@ make x86_64_defconfig make kvmconfig ./scripts/config --enable CONFIG_DRM_VKMS make oldconfig -make -j8 +make cd .. mkdir /weston-virtme mv linux/arch/x86/boot/bzImage /weston-virtme/bzImage @@ -134,7 +139,6 @@ git checkout -b snapshot 69e3cb83b3405edc99fcf9611f50012a4f210f78 cd .. git clone --branch 1.18.0 --depth=1 https://gitlab.freedesktop.org/wayland/wayland -export MAKEFLAGS="-j4" cd wayland git show -s HEAD mkdir build @@ -149,7 +153,7 @@ cd mesa git checkout -b snapshot mesa-20.3.1 meson build -Dauto_features=disabled \ -Dgallium-drivers=swrast -Dvulkan-drivers= -Ddri-drivers= -ninja -C build install +ninja ${NINJAFLAGS} -C build install cd .. rm -rf mesa @@ -157,7 +161,7 @@ rm -rf pipewire git clone --depth=1 --branch 0.3.31 https://gitlab.freedesktop.org/pipewire/pipewire.git pipewire cd pipewire meson build -ninja -C build install +ninja ${NINJAFLAGS} -C build install cd .. rm -rf pipewire @@ -166,7 +170,7 @@ cd seatd meson build -Dauto_features=disabled \ -Dseatd=enabled -Dlogind=enabled -Dserver=enabled \ -Dexamples=disabled -Dman-pages=disabled -ninja -C build install +ninja ${NINJAFLAGS} -C build install cd .. rm -rf seatd