From 383722f7a3c6b5b009925e0cc14cd5e8ef218577 Mon Sep 17 00:00:00 2001
From: Lars Bilke <lars.bilke@ufz.de>
Date: Mon, 3 Jun 2024 13:48:41 +0200
Subject: [PATCH] [ci] Build deploy MKL container (serial and petsc).

---
 scripts/ci/jobs/build-guix.yml | 31 ++++++++++++++++++++++---------
 1 file changed, 22 insertions(+), 9 deletions(-)

diff --git a/scripts/ci/jobs/build-guix.yml b/scripts/ci/jobs/build-guix.yml
index a3adf903beb..ccbd8da3409 100644
--- a/scripts/ci/jobs/build-guix.yml
+++ b/scripts/ci/jobs/build-guix.yml
@@ -45,22 +45,35 @@ deploy container:
     # Build phase, retry once if failed
     - guix time-machine -C scripts/guix/channels.scm -- build bash coreutils
     - if [ $? -ne 0 ]; then !!; fi
+    - guix time-machine -C scripts/guix/channels.scm -- build ogs --with-source=ogs=$PWD
+    - if [ $? -ne 0 ]; then !!; fi
     - guix time-machine -C scripts/guix/channels.scm -- build ogs-petsc --with-source=ogs-petsc=$PWD
     - if [ $? -ne 0 ]; then !!; fi
+    - guix time-machine -C scripts/guix/channels.scm -- build ogs-mkl --with-source=ogs-mkl=$PWD
+    - if [ $? -ne 0 ]; then !!; fi
+    - guix time-machine -C scripts/guix/channels.scm -- build ogs-petsc-mkl --with-source=ogs-petsc-mkl=$PWD
+    - if [ $? -ne 0 ]; then !!; fi
     # Pack phase
-    - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs-petsc --with-source=ogs-petsc=$PWD | tee | tail -1 )
-    - echo "Image $image"
-    - ssh sonjenk@frontend2.eve.ufz.de rm -f ${GUIX_PETSC_CONTAINER}
-    - scp $image sonjenk@frontend2.eve.ufz.de:${GUIX_PETSC_CONTAINER}
-    # Minio upload
     - mcli alias set minio https://minio.ufz.de $MINIO_PUBLIC_ACCESS_KEY $MINIO_PUBLIC_SECRET_KEY
-    - mcli cp $image minio/ogs/public/container/ogs/master/ogs-petsc.squashfs
-    # Build serial image
-    - guix time-machine -C scripts/guix/channels.scm -- build ogs --with-source=ogs=$PWD
-    - if [ $? -ne 0 ]; then !!; fi
+    # Pack serial image
     - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs --with-source=ogs=$PWD | tee | tail -1 )
     - echo "Image (serial) $image"
     - mcli cp $image minio/ogs/public/container/ogs/master/ogs-serial.squashfs
+    # Pack petsc image
+    - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs-petsc --with-source=ogs-petsc=$PWD | tee | tail -1 )
+    - echo "Image (petsc) $image"
+    # Copy to eve as well
+    - ssh sonjenk@frontend2.eve.ufz.de rm -f ${GUIX_PETSC_CONTAINER}
+    - scp $image sonjenk@frontend2.eve.ufz.de:${GUIX_PETSC_CONTAINER}
+    - mcli cp $image minio/ogs/public/container/ogs/master/ogs-petsc.squashfs
+    # Pack serial MKL image
+    - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs-mkl --with-source=ogs-mkl=$PWD | tee | tail -1 )
+    - echo "Image (serial MKL) $image"
+    - mcli cp $image minio/ogs/public/container/ogs/master/ogs-serial-mkl.squashfs
+    # Pack petsc MKL image
+    - image=$( guix time-machine -C scripts/guix/channels.scm -- pack -RR --format=squashfs bash coreutils ogs-petsc-mkl --with-source=ogs-petsc-mkl=$PWD | tee | tail -1 )
+    - echo "Image (petsc MKL) $image"
+    - mcli cp $image minio/ogs/public/container/ogs/master/ogs-petsc-mkl.squashfs
 
 test container eve:
   stage: build
-- 
GitLab