[igt-dev] [PATCH v3 04/12] ci: Add dependencies between jobs

Tomeu Vizoso tomeu.vizoso at collabora.com
Fri Mar 11 14:12:52 UTC 2022


So a stage doesn't need to completely finish before jobs from the next
stages can start. This allows for pipelines to finish much sooner.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
---
 .gitlab-ci.yml | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 9c91ce067d75..9731c5486cec 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -81,6 +81,8 @@ build:tests-fedora:
     paths:
       - build
       - installdir
+  needs:
+    - build-containers:build-fedora
 
 build:tests-fedora-no-libunwind:
   stage: build
@@ -88,6 +90,8 @@ build:tests-fedora-no-libunwind:
     - dnf remove -y libunwind-devel
     - meson -Dlibunwind=disabled build
     - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
+  needs:
+    - build-containers:build-fedora
 
 # documentation building is different with meson<0.47
 build:tests-fedora-oldest-meson:
@@ -98,6 +102,8 @@ build:tests-fedora-oldest-meson:
     - meson $MESON_OPTIONS build
     - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
     - ninja -C build -j${FDO_CI_CONCURRENT:-4} igt-gpu-tools-doc
+  needs:
+    - build-containers:build-fedora
 
 # ensure igt_nouveau stubs build when nouveau support for libdrm is disabled
 build:tests-fedora-no-libdrm-nouveau:
@@ -105,6 +111,8 @@ build:tests-fedora-no-libdrm-nouveau:
   script:
     - meson -Dlibdrm_drivers= build
     - ninja -C build -j${FDO_CI_CONCURRENT:-4} || ninja -C build -j 1
+  needs:
+    - build-containers:build-fedora
 
 build:tests-fedora-clang:
   stage: build
@@ -116,6 +124,8 @@ build:tests-fedora-clang:
   artifacts:
     paths:
       - build
+  needs:
+    - build-containers:build-fedora
 
 build:tests-debian-meson:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian:commit-$CI_COMMIT_SHA
@@ -127,6 +137,8 @@ build:tests-debian-meson:
   artifacts:
     paths:
       - meson-test-list.txt
+  needs:
+    - build-containers:build-debian
 
 build:tests-debian-minimal:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA
@@ -137,6 +149,8 @@ build:tests-debian-minimal:
   artifacts:
     paths:
       - build
+  needs:
+    - build-containers:build-debian
 
 build:tests-debian-meson-armhf:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-armhf:commit-$CI_COMMIT_SHA
@@ -148,6 +162,8 @@ build:tests-debian-meson-armhf:
   artifacts:
     paths:
       - build
+  needs:
+    - build-containers:build-debian-armhf
 
 build:tests-debian-meson-arm64:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-arm64:commit-$CI_COMMIT_SHA
@@ -159,6 +175,8 @@ build:tests-debian-meson-arm64:
   artifacts:
     paths:
       - build
+  needs:
+    - build-containers:build-debian-arm64
 
 build:tests-debian-meson-mips:
   image: $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-mips:commit-$CI_COMMIT_SHA
@@ -170,6 +188,8 @@ build:tests-debian-meson-mips:
   artifacts:
     paths:
       - build
+  needs:
+    - build-containers:build-debian-mips
 
 #################### TEST ##########################
 
@@ -181,6 +201,8 @@ test:ninja-test:
     - build:tests-fedora
   stage: test
   script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}
+  needs:
+    - build:tests-fedora
 
 test:ninja-test-clang:
   tags:
@@ -192,6 +214,8 @@ test:ninja-test-clang:
     CC: clang
   stage: test
   script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}
+  needs:
+    - build:tests-fedora-clang
 
 test:ninja-test-minimal:
   tags:
@@ -202,6 +226,8 @@ test:ninja-test-minimal:
     - build:tests-debian-minimal
   stage: test
   script: meson test -C build --num-processes ${FDO_CI_CONCURRENT:-4}
+  needs:
+    - build:tests-debian-minimal
 
 test:ninja-test-arm64:
   tags:
@@ -219,6 +245,8 @@ test:ninja-test-arm64:
     paths:
       - build
     when: on_failure
+  needs:
+    - build:tests-debian-meson-arm64
 
 test:ninja-test-armhf:
   tags:
@@ -236,6 +264,8 @@ test:ninja-test-armhf:
     paths:
       - build
     when: on_failure
+  needs:
+    - build:tests-debian-meson-armhf
 
 test:ninja-test-mips:
   tags:
@@ -253,6 +283,8 @@ test:ninja-test-mips:
     paths:
       - build
     when: on_failure
+  needs:
+    - build:tests-debian-meson-mips
 
 test:list-undocumented-tests:
   dependencies:
@@ -262,12 +294,16 @@ test:list-undocumented-tests:
   artifacts:
     paths:
       - undocumented_tests.txt
+  needs:
+    - build:tests-fedora
 
 test:verify-blacklists:
   dependencies:
     - build:tests-fedora
   stage: test
   script: for bl in tests/intel-ci/blacklist{,-pre-merge}.txt; do scripts/verify-blacklist.sh build/runner/igt_runner build/tests "$bl" || exit 1; done
+  needs:
+    - build:tests-fedora
 
 ################### DEPLOY #########################
 
-- 
2.31.1



More information about the igt-dev mailing list