diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d0f4175a51ff8632f4f153846d996fe3d75bf038..875c1609fab299030dd0fa167067a578907b2f84 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -47,7 +47,7 @@ build-gcc:
 build-clang:
   <<: *build
 
-build-cmake-clang:
+.build-cmake: &build-cmake
   variables:
     EXTRA_PKGS: cmake python3 py3-click
   script:
@@ -73,6 +73,12 @@ build-cmake-clang:
     expire_in: 1 day
   stage: build
 
+build-cmake-clang:
+  <<: *build-cmake
+
+build-cmake-gcc:
+  <<: *build-cmake
+
 build-doc:
   variables:
     EXTRA_PKGS: doxygen graphviz
@@ -114,12 +120,20 @@ test-clang:
   dependencies:
     - build-clang
 
-test-cmake-clang:
+.test-cmake: &test-cmake
   variables:
     # coreutils are needed because of timeout command used in tests.
     EXTRA_PKGS: bc coreutils python3
   script:
     - for test in $(ls tests.*.sh); do ./${test} release/bin ${JOBS}; touch release/bin/log_tests.txt; cat release/bin/log_tests.txt; done
   stage: test
+
+test-cmake-gcc:
+  <<: *test-cmake
+  dependencies:
+    - build-cmake-gcc
+
+test-cmake-clang:
+  <<: *test-cmake
   dependencies:
     - build-cmake-clang