ci: limit build jobs to 30min so that they can retry when they go wrong
authorEric Engestrom <eric@igalia.com>
Fri, 1 Sep 2023 12:28:36 +0000 (13:28 +0100)
committerMarge Bot <emma+marge@anholt.net>
Thu, 21 Sep 2023 08:21:04 +0000 (08:21 +0000)
Build jobs should never take more than 1-3 minutes.

These jobs are never slow, either they finish within reasonable time or
something has gone wrong and the job will never terminate, so we should
instead timeout and retry.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24995>

.gitlab-ci/build/gitlab-ci.yml

index b70dd02..4292db7 100644 (file)
@@ -3,6 +3,14 @@
   extends: .build-rules
   # Cancel job if a newer commit is pushed to the same branch
   interruptible: true
+  # Build jobs don't take more than 1-3 minutes. 5-8 min max on a fresh runner
+  # without a populated ccache.
+  # These jobs are never slow, either they finish within reasonable time or
+  # something has gone wrong and the job will never terminate, so we should
+  # instead timeout so that the retry mechanism can kick in.
+  # A few exception are made, see `timeout:` overrides in the rest of this
+  # file.
+  timeout: 30m
   artifacts:
     name: "mesa_${CI_JOB_NAME}"
     when: always