From 586fc4136ce8ea3e96f205f58eca4a7037e0c845 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Thu, 25 Apr 2024 08:19:13 +0200
Subject: [PATCH] CI Debian oldstable: preserve artifacts

---
 .gitlab-ci.yml | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d7c0f1ce655..20ebae6f68b 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -5,9 +5,18 @@ stages:
 variables:
   GIT_DEPTH: "1"
 
+.linux_build: &linux_build
+  stage: build
+  artifacts:
+    paths:
+    - build/installer/BornAgain*.sh
+    - build/py/wheel/manylinux/*.whl
+    expire_in: 3 days
+
 native_Debian:
   tags:
   - Debian
+  <<: *linux_build
   before_script: &native_before
     - pwd
     - export CC=gcc; export CXX=g++
@@ -16,7 +25,6 @@ native_Debian:
     # avoid using the default Debian Qt framework
     - QTCMAKE="/usr/local/Qt6/6.2.3/gcc_64/lib/cmake"
     - cmake --version
-  stage: build
   script: &native_scr
     - env
     - mkdir build
@@ -28,13 +36,8 @@ native_Debian:
     - time make package_source
     - time bash var/mk_wheel_multilinux.sh
     - time cpack -B ./installer .
-  artifacts:
-    paths:
-    - build/installer/BornAgain*.sh
-    - build/py/wheel/manylinux/*.whl
-    expire_in: 10 days
 
-.aux1: &compile_dependency
+.compile_dependency: &compile_dependency
   - mkdir build
   - cd build
   - cmake .. -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
@@ -47,8 +50,8 @@ native_Debian:
     - if: $CI_PIPELINE_SOURCE == "schedule"
   tags:
     - LinuxDocker
+  <<: *linux_build
   image: scg-debian-oldstable:latest
-  stage: build
   script: &docker_build
     - export CHECK_FLAGS=""
     - ORIGINAL_DIR=$(pwd)
-- 
GitLab