From 55b433d7fb7443d8148adcfb1f9575fd9c888b38 Mon Sep 17 00:00:00 2001
From: acrovato <a.crovato@uliege.be>
Date: Tue, 6 Oct 2020 10:36:18 +0200
Subject: [PATCH] Update ci

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

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d59c9b3..f57b9a3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -14,15 +14,16 @@ variables:
     GIT_CLONE_PATH: /builds/$CI_PROJECT_PATH/FPM_BUILD/fpm # cannot work in /builds/$CI_PROJECT_PATH
 
 stages:
-    - build # only 1 stage to avoid exporting artifacts in parent dir (not permitted)
+    - bld_tst
+    - fmt_dox
 
 build_test:
     <<: *global_tag_def
-    stage: build
+    stage: bld_tst
     script:
         - printenv | sort
         - cd ..
-        # get waves and build
+        # get and build waves
         - rm -rf waves
         - wget -q https://gitlab.uliege.be/am-dept/waves/-/archive/master/waves-master.tar.bz2
         - tar xf waves-master.tar.bz2
@@ -33,13 +34,14 @@ build_test:
         - cd build
         - cmake -Wno-dev -C ../CMake/disable-trilinos.cmake ..
         - make -j $(nproc)
-        # build fpm
+        # build and test fpm
         - cd ../../fpm
         - mkdir build
         - cd build
         - cmake -DCMAKE_PREFIX_PATH=${CI_PROJECT_DIR}/../waves -Wno-dev ..
         - make -j $(nproc)
         - ctest -j $(nproc) --output-on-failure #--verbose
+        - mv ${CI_PROJECT_DIR}/../waves/scripts/format_code.py . # ulgy way to keep a script we need later...
     #timeout: 10 hours  # will be available in 12.3
     artifacts:
         paths:
@@ -48,11 +50,11 @@ build_test:
 
 format:
     <<: *global_tag_def
-    stage: build
+    stage: fmt_dox
     script:
-        - ls ${CI_PROJECT_DIR}/..
         - clang-format --version # we use clang-format-10 exclusively
-        - ${CI_PROJECT_DIR}/../waves/scripts/format_code.py
+        - ls build
+        - ./build/format_code.py
         - mkdir -p patches
         - if git diff --patch --exit-code > patches/clang-format.patch; then echo "Clang format changed nothing"; else echo "Clang format found changes to make!"; false; fi
     artifacts:
@@ -67,7 +69,7 @@ format:
             
 doxygen:
     <<: *global_tag_def
-    stage: build
+    stage: fmt_dox
     script:
         - cd build
         - make dox
-- 
GitLab