From 7a2fe09ab5e09fec404c5a45edf200c9f7b6dfff Mon Sep 17 00:00:00 2001
From: mkirsz <s1351949@sms.ed.ac.uk>
Date: Tue, 5 Mar 2024 22:51:50 +0000
Subject: [PATCH] Update .gitlab-ci.yml file

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 28ee2d4..b4869e1 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,18 +12,37 @@ stages:
   - trigger
 
 before_script:
-  - rm -rf ../CORE
-  - rm -rf ../MODELS
-  - git clone https://git.ecdf.ed.ac.uk/tadah/core.git ../CORE
-  - git clone https://git.ecdf.ed.ac.uk/tadah/models.git ../MODELS
-  - pwd
-  - ls -l
   - mkdir -p ${DEBUG_DIR}
   - mkdir -p ${RELEASE_DIR}
   - export OMP_NUM_THREADS=${CPU_SIM}
 
+build-debug-core:
+  stage: build
+  script:
+    - rm -rf ../CORE
+    - git clone https://git.ecdf.ed.ac.uk/tadah/core.git ../CORE
+    - cd ../CORE
+    - mkdir -p ${DEBUG_DIR}
+    - cd ${DEBUG_DIR}
+    - cmake .. -DCMAKE_CXX_FLAGS="-g -O1 -fsanitize=address -Wall -Wpedantic -pedantic-errors -Wextra --coverage"
+    - make -j ${CPU_BUILD}
+
+build-debug-models:
+  stage: build
+  script:
+    - rm -rf ../MODELS
+    - git clone https://git.ecdf.ed.ac.uk/tadah/models.git ../MODELS
+    - cd ../MODELS
+    - mkdir -p ${DEBUG_DIR}
+    - cd ${DEBUG_DIR}
+    - cmake .. -DCMAKE_CXX_FLAGS="-g -O1 -fsanitize=address -Wall -Wpedantic -pedantic-errors -Wextra --coverage"
+    - make -j ${CPU_BUILD}
+
 build-debug:
   stage: build
+  needs:
+    job: build-debug-core
+    job: build-debug-models
   script:
     - cd ${DEBUG_DIR}
     - cmake .. -DCMAKE_CXX_FLAGS="-g -O1 -fsanitize=address -Wall -Wpedantic -pedantic-errors -Wextra --coverage"
-- 
GitLab