From a9a44a10349bb1dc577de19d4e2bbc96fe9ee82b Mon Sep 17 00:00:00 2001
From: Nicolas Richart <networms@gmail.ch>
Date: Sat, 15 Jun 2024 17:11:28 +0200
Subject: [PATCH] Rewriting needs

---
 .gitlab-ci.yml | 36 +++++++++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d5f1930..ae045fb 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -75,7 +75,12 @@ spack:setup:
   script:
     - ci/setup_spack.sh
   needs:
-    - job: "spack:checkout: [$environment, $slurm_options, $stack]"
+    - job: spack:checkout
+      parallel:
+        matrix:
+          - environment: $environment
+          - slurm_options: $slurm_options
+          - stack: $stack
   artifacts:
     paths:
       - ${stack}/environment
@@ -99,7 +104,12 @@ spack:install_compilers:
     reports:
       junit: spack-install-*.xml
   needs:
-    - job: "spack:setup: [$environment, $slurm_options, $stack]"
+    - job: spack:setup
+      parallel:
+        matrix:
+          - environment: $environment
+          - slurm_options: $slurm_options
+          - stack: $stack
   timeout: 5h
 
 spack:concretize:
@@ -112,7 +122,13 @@ spack:concretize:
     - ${STACK_LOCATION}/spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} config blame
     - ${STACK_LOCATION}/spack/bin/spack -e ${SPACK_SYSTEM_CONFIG_PATH} concretize
   needs:
-    - job: "spack:install_compilers: [$environment, $slurm_options, $stack]"
+    - job: spack:install_compilers
+      parallel:
+        matrix:
+          - environment: $environment
+          - slurm_options: $slurm_options
+          - stack: $stack
+
   artifacts:
     paths:
       - ${stack}/environment
@@ -140,7 +156,12 @@ spack:install:
         echo "{}" > spack-install.xml
       fi
   needs:
-    - job: "spack:concretize: [$environment, $slurm_options, $stack]"
+    - job: spack:concretize
+      parallel:
+        matrix:
+          - environment: $environment
+          - slurm_options: $slurm_options
+          - stack: $stack
   artifacts:
     paths:
       - ${stack}/environment
@@ -157,5 +178,10 @@ spack:mksquashfs:
     - "mksquashfs ${CI_PROJECT_DIR} stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"
     - 'curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs "${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/stack/${stack}/stack-${stack}-${environment}-${CI_COMMIT_REF_SLUG}.sqfs"'
   needs:
-    - job: "spack:install: [$environment, $slurm_options, $stack]"
+    - job: spack:install
+      parallel:
+        matrix:
+          - environment: $environment
+          - slurm_options: $slurm_options
+          - stack: $stack
   timeout: 10h
-- 
GitLab