From 6944fafc19f4d2bf8bc7b402bdc83039b45f0b5e Mon Sep 17 00:00:00 2001
From: Nicolas Richart <nicolas.richart@epfl.ch>
Date: Sun, 11 Aug 2024 14:27:28 +0200
Subject: [PATCH] Adding colors for no particular reasons

---
 .gitlab-ci.yml          | 22 +++++++++++++++++-----
 ci/install_compilers.sh | 20 +++++++++++++++-----
 2 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 39e10c8..7a644c1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -177,17 +177,28 @@ spack:install:
     - echo "{}" > spack-install-${environment}.xml
 
     # Cleaning patches in case one has a different hash
-    - ${STACK_LOCATION}/spack/bin/spack --color always -e ${environment} clean -m
+    - ${STACK_LOCATION}/spack/bin/spack
+          --color always
+          -e ${environment}
+          clean -m
 
-    - ${STACK_LOCATION}/spack/bin/spack --color always -e ${environment} install
+    - ${STACK_LOCATION}/spack/bin/spack
+          --color always
+          -e ${environment} install
           --log-file spack-install-${environment}.xml
           --log-format junit
           --only-concrete
           --fail-fast
           --show-log-on-error
 
-    - ${STACK_LOCATION}/spack/bin/spack -e ${environment} find -vl | tee spack-find-${environment}-${stack}.log
-    - ${STACK_LOCATION}/spack/bin/spack -e ${environment}
+    - ${STACK_LOCATION}/spack/bin/spack
+          --color always
+          -e ${environment}
+          find -vl | tee spack-find-${environment}-${stack}.log
+
+    - ${STACK_LOCATION}/spack/bin/spack
+          --color always
+          -e ${environment}
           buildcache create
           --update-index
           --key EDC904DCE3D2E84E
@@ -202,7 +213,8 @@ spack:install:
     - job: spack:concretize
   artifacts:
     paths:
-      - spack-find-*.log
+      - spack-*.log
+      - spack-*.xml
     reports:
       junit: spack-install-*.xml
   timeout: 72h
diff --git a/ci/install_compilers.sh b/ci/install_compilers.sh
index fbfeef4..56f05cc 100755
--- a/ci/install_compilers.sh
+++ b/ci/install_compilers.sh
@@ -25,14 +25,18 @@ for c in  "core_compilers" "compilers"; do
     echo "${_specs}"
 
     if [ "x${_specs}" != "x" ]; then
-        ${STACK_LOCATION}/spack/bin/spack spec \
+        ${STACK_LOCATION}/spack/bin/spack \
+            --color always \
+            spec \
             --install-status \
             --namespaces \
             --long \
             --types \
             ${_specs}
 
-        ${STACK_LOCATION}/spack/bin/spack spec \
+        ${STACK_LOCATION}/spack/bin/spack \
+            --color always \
+            spec \
             --install-status \
             --namespaces \
             --long \
@@ -40,7 +44,9 @@ for c in  "core_compilers" "compilers"; do
             --json \
             ${_specs} > compilers_spec.json
 
-        ${STACK_LOCATION}/spack/bin/spack install \
+        ${STACK_LOCATION}/spack/bin/spack \
+            --color always \
+            install \
             --log-file ${MOUNT_POINT}/spack-install-${c}.xml \
             --log-format junit \
             --fail-fast \
@@ -50,7 +56,9 @@ for c in  "core_compilers" "compilers"; do
         hashes=$(jq -Mr '.spec.nodes | map("/\(.hash)") | join(" ")' compilers_spec.json)
 
         echo "Adding packages to buildcache"
-        ${STACK_LOCATION}/spack/bin/spack buildcache create \
+        ${STACK_LOCATION}/spack/bin/spack \
+            --color always \
+            buildcache create \
             --update-index \
             --key EDC904DCE3D2E84E \
             ${MOUNT_POINT}/buildcache ${hashes}
@@ -63,7 +71,9 @@ for c in  "core_compilers" "compilers"; do
             # echo "  - ${location}/compiler/latest/linux"
             # echo "  - ${location}/Linux_x86_64/2024/compilers"
 
-            ${STACK_LOCATION}/spack/bin/spack compiler find \
+            ${STACK_LOCATION}/spack/bin/spack \
+                --color always \
+                compiler find \
                 --scope system \
                 ${location} \
                 ${location}/compiler/latest \
-- 
GitLab