From 419f456112e9763fb5fd55f8306c8a105d88b84f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Carsten=20Gr=C3=A4ser?= <graeser@dune-project.org>
Date: Fri, 24 Jan 2025 11:09:46 +0100
Subject: [PATCH] [CI][bugfix] Fix CI config

* Use 2.10 image for 2.10 gcc job
* Remove 2.10 clang job, because there's no recent enough compiler
* Stop using outdated `dune:git-*` images
---
 .gitlab-ci.yml | 45 +++++++++++++++++++++++++++++++++------------
 1 file changed, 33 insertions(+), 12 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 0bca1de..ca395b9 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,36 +1,57 @@
 ---
 # Install external dependencies
-before_script:
-  - duneci-install-module https://gitlab.dune-project.org/fufem/dune-matrix-vector.git
+
+# For release-based jobs, we use corresponding images,
+# that already contain all core and staging dependencies.
+.release_based_job:
+  before_script:
+    - duneci-install-module https://gitlab.dune-project.org/fufem/dune-matrix-vector.git
+
+# For branch-based-based jobs, we need to install all dependencies manually.
+.branch_base_job:
+  before_script:
+    - . /duneci/bin/duneci-init-job
+    - duneci-install-module https://gitlab.dune-project.org/core/dune-common.git
+    - duneci-install-module https://gitlab.dune-project.org/core/dune-geometry.git
+    - duneci-install-module https://gitlab.dune-project.org/core/dune-localfunctions.git
+    - duneci-install-module https://gitlab.dune-project.org/staging/dune-uggrid.git
+    - duneci-install-module https://gitlab.dune-project.org/core/dune-grid.git
+    - duneci-install-module https://gitlab.dune-project.org/core/dune-istl.git
+    - duneci-install-module https://gitlab.dune-project.org/fufem/dune-matrix-vector.git
 
 # The 2.9 release is the one in Debian 12 ('bookworm', 'stable' at the time of writing)
 dune:2.9 debian-11 gcc-10 C++20:
+  extends: .release_based_job
   variables:
     DUNECI_BRANCH: releases/2.9
   image: registry.dune-project.org/docker/ci/dune:2.9-debian-11-gcc-10-20
-  before_script:
   script: duneci-standard-test
 
 # The 2.10 release is the one in Debian 13 ('trixie', 'testing' at the time of writing)
-dune:2.10 debian-11 clang-13  C++20:
-  variables:
-    DUNECI_BRANCH: releases/2.10
-  image: registry.dune-project.org/docker/ci/dune:git-debian-11-clang-13-20
-  script: duneci-standard-test
-
+# To test against 2.10 we need an image with the corresponding version of the core modules.
+# Unfortunately, there is no 2.10 image with a recent enough compiler.
 dune:2.10 debian-11 gcc-10  C++20:
+  extends: .release_based_job
   variables:
     DUNECI_BRANCH: releases/2.10
-  image: registry.dune-project.org/docker/ci/dune:git-debian-11-gcc-10-20
+  image: registry.dune-project.org/docker/ci/dune:2.10-debian-11-gcc-10-20
   script: duneci-standard-test
 
 # Also test with the current development branch
 dune:git debian-11 clang-13  C++20:
-  image: registry.dune-project.org/docker/ci/dune:git-debian-11-clang-13-20
+  extends: .branch_base_job
+#  image: registry.dune-project.org/docker/ci/dune:git-debian-11-clang-13-20
+  image: registry.dune-project.org/docker/ci/debian:11
+  variables:
+    DUNECI_TOOLCHAIN: clang-13-20
   script: duneci-standard-test
 
 dune:git debian-11 gcc-10  C++20:
-  image: registry.dune-project.org/docker/ci/dune:git-debian-11-gcc-10-20
+  extends: .branch_base_job
+#  image: registry.dune-project.org/docker/ci/dune:git-debian-11-gcc-10-20
+  image: registry.dune-project.org/docker/ci/debian:11
+  variables:
+    DUNECI_TOOLCHAIN: gcc-10-20
   script: duneci-standard-test
 
 # Check for spelling mistakes in text
-- 
GitLab