From e41fe546f7eac2b44f98ba64eea6c09fe4ebca9b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 12 Apr 2023 17:01:19 +0200 Subject: [PATCH] gitlab-ci: use parallel:matrix for tier1 tests The benefit is that instead of one long running job for fedora:37 (the current tier1 test), we have several smaller. A minor downside is, that if the build is broken, then usually the very first test would already fail. Previously, that meant that the follow up tests were skipped. Now, they run all in parallel. However, test failures should be the exception, so the wasted resources are probably irrelevant. The upside is, that we can see which tests fail, and we run them much faster (in parallel). This is only done for the tier1 test, because those tests are started automatically. Other tiers need to be triggered manually, which already means a lot of clicking. Making those also matrix tests, would result in an insane amount of clicking. As those other tests are run much more seldom, having them huge is probably fine. --- .gitlab-ci.yml | 25 ++++++++++++++++++------- .gitlab-ci/ci.template | 17 +++++++++++++++-- 2 files changed, 33 insertions(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index eeae024b6b..2add66a05a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -57,11 +57,11 @@ variables: # # This is done by running `ci-fairy generate-template` and possibly bumping # ".default_tag". - ALPINE_TAG: '2023-04-11.0-c319e2a8ce5b' - CENTOS_TAG: '2023-04-11.0-3322a2e54777' - DEBIAN_TAG: '2023-04-11.0-b529fd8eba83' - FEDORA_TAG: '2023-04-11.0-3322a2e54777' - UBUNTU_TAG: '2023-04-11.0-b529fd8eba83' + ALPINE_TAG: '2023-04-11.0-5bd75d53d745' + CENTOS_TAG: '2023-04-11.0-5bda0c516ecd' + DEBIAN_TAG: '2023-04-11.0-8dcd2b8ca112' + FEDORA_TAG: '2023-04-11.0-5bda0c516ecd' + UBUNTU_TAG: '2023-04-11.0-8dcd2b8ca112' ALPINE_EXEC: 'bash .gitlab-ci/alpine-install.sh' CENTOS_EXEC: 'bash .gitlab-ci/fedora-install.sh' @@ -693,6 +693,17 @@ t_fedora:37: - .fdo.distribution-image@fedora - .nm_artifacts stage: tier1 + parallel: + matrix: + - NM_TEST_SELECT_RUN: + - autotools+gcc+docs+valgrind + - meson+gcc+docs+valgrind + - autotools+clang + - meson+clang + - rpm+autotools + - rpm+meson + - tarball + - subtree variables: FDO_DISTRIBUTION_VERSION: '37' FDO_DISTRIBUTION_TAG: $FEDORA_TAG @@ -1095,9 +1106,9 @@ pages: only: - main dependencies: - - t_fedora:37 + - "t_fedora:37: [autotools+gcc+docs+valgrind]" needs: - - t_fedora:37 + - "t_fedora:37: [autotools+gcc+docs+valgrind]" triage:issues: stage: triage diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index e06b9210c5..b58d5c6c8a 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -199,6 +199,19 @@ t_{{distro.name}}:{{version}}: - .nm_artifacts_debug {% endif %} stage: tier{{distro.tier}} +{% if distro.tier <= 1 %} + parallel: + matrix: + - NM_TEST_SELECT_RUN: + - autotools+gcc+docs+valgrind + - meson+gcc+docs+valgrind + - autotools+clang + - meson+clang + - rpm+autotools + - rpm+meson + - tarball + - subtree +{% endif %} variables: FDO_DISTRIBUTION_VERSION: '{{version}}' FDO_DISTRIBUTION_TAG: ${{distro.name.upper()}}_TAG @@ -261,9 +274,9 @@ pages: only: - main dependencies: - - t_{{default_distro.name}}:{{default_distro.versions[0]}} + - "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [autotools+gcc+docs+valgrind]" needs: - - t_{{default_distro.name}}:{{default_distro.versions[0]}} + - "t_{{default_distro.name}}:{{default_distro.versions[0]}}: [autotools+gcc+docs+valgrind]" triage:issues: stage: triage