gitlab-ci: Automatically retry jobs after runner system failure
[mesa.git] / .gitlab-ci.yml
index 28840e055a0d1e132b4bf170117fe42d64ff9cad..87968b61328f94ee74c02904be6372c22baacb3d 100644 (file)
@@ -20,10 +20,6 @@ variables:
   UBUNTU_IMAGE: "$CI_REGISTRY_IMAGE/ubuntu:$UBUNTU_TAG"
   UBUNTU_IMAGE_MAIN: "registry.freedesktop.org/mesa/mesa/ubuntu:$UBUNTU_TAG"
 
-cache:
-  paths:
-    - ccache
-
 stages:
   - containers-build
   - build+test
@@ -35,6 +31,10 @@ stages:
     - master
     - merge_requests
     - /^ci([-/].*)?$/
+  retry:
+    max: 2
+    when:
+      - runner_system_failure
 
 
 # CONTAINERS
@@ -69,6 +69,9 @@ ubuntu:
   extends: .ci-run-policy
   image: $UBUNTU_IMAGE
   stage: build+test
+  cache:
+    paths:
+      - ccache
   artifacts:
     when: on_failure
     untracked: true
@@ -123,6 +126,53 @@ ubuntu:
     - scons $SCONS_TARGET
     - eval $SCONS_CHECK_COMMAND
 
+autotools:
+  extends: .build
+  variables:
+    MAKEFLAGS: "-j8"
+    LLVM_CONFIG: llvm-config-7
+  script:
+    - mkdir build
+    - cd build
+    - ../autogen.sh
+        --enable-autotools
+        --enable-debug
+        --disable-llvm-shared-libs
+    - make
+    - make check
+
+# NOTE: Building SWR is 2x (yes two) times slower than all the other
+# gallium drivers combined.
+# Start this early so that it doesn't limit the total run time.
+meson-gallium-swr:
+  extends: .meson-build
+  variables:
+    UNWIND: "true"
+    DRI_LOADERS: >
+      -D glx=disabled
+      -D egl=false
+      -D gbm=false
+    GALLIUM_ST: >
+      -D dri3=false
+      -D gallium-vdpau=false
+      -D gallium-xvmc=false
+      -D gallium-omx=disabled
+      -D gallium-va=false
+      -D gallium-xa=false
+      -D gallium-nine=false
+      -D gallium-opencl=disabled
+    GALLIUM_DRIVERS: "swr"
+    LLVM_VERSION: "6.0"
+
+meson-clang:
+  extends: .meson-build
+  variables:
+    UNWIND: "true"
+    DRI_DRIVERS: "auto"
+    GALLIUM_DRIVERS: "auto"
+    CC: "ccache clang-7"
+    CXX: "ccache clang++-7"
+
 meson-vulkan:
   extends: .meson-build
   variables:
@@ -185,38 +235,6 @@ meson-glvnd:
       -D gallium-nine=false
       -D gallium-opencl=disabled
 
-meson-clang:
-  extends: .meson-build
-  variables:
-    UNWIND: "true"
-    DRI_DRIVERS: "auto"
-    GALLIUM_DRIVERS: "auto"
-    CC: clang-7
-    CXX: clang++-7
-
-# NOTE: Building SWR is 2x (yes two) times slower than all the other
-# gallium drivers combined.
-# Start this early so that it doesn't hunder the run time.
-meson-gallium-swr:
-  extends: .meson-build
-  variables:
-    UNWIND: "true"
-    DRI_LOADERS: >
-      -D glx=disabled
-      -D egl=false
-      -D gbm=false
-    GALLIUM_ST: >
-      -D dri3=false
-      -D gallium-vdpau=false
-      -D gallium-xvmc=false
-      -D gallium-omx=disabled
-      -D gallium-va=false
-      -D gallium-xa=false
-      -D gallium-nine=false
-      -D gallium-opencl=disabled
-    GALLIUM_DRIVERS: "swr"
-    LLVM_VERSION: "6.0"
-
 meson-gallium-radeonsi:
   extends: .meson-build
   variables:
@@ -303,21 +321,6 @@ meson-gallium-st-other:
     GALLIUM_DRIVERS: "nouveau,swrast"
     LLVM_VERSION: "5.0"
 
-autotools:
-  extends: .build
-  variables:
-    MAKEFLAGS: "-j4"
-    LLVM_CONFIG: llvm-config-7
-  script:
-    - mkdir build
-    - cd build
-    - ../autogen.sh
-        --enable-autotools
-        --enable-debug
-        --disable-llvm-shared-libs
-    - make
-    - make check
-
 scons-nollvm:
   extends: .scons-build
   variables: