From 726bb34407e42f17c716606528d7571b40d97c7c Mon Sep 17 00:00:00 2001
From: Giovanni La Mura <giovanni.lamura@inaf.it>
Date: Fri, 12 Jan 2024 13:48:46 +0100
Subject: [PATCH] Configure project runner

---
 .gitlab-ci.yml | 49 ++++++++++++++++++++-----------------------------
 1 file changed, 20 insertions(+), 29 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7ec66167..08ae6a0d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,7 +1,7 @@
 # CI pipeline configuration
 
 default:
-   image: gcc
+   image: gmulas/np-tmcode
 
 # Switch from branch pipelines to merge request pipelines when a merge request is created
 workflow:
@@ -42,18 +42,9 @@ building_stage:
       - echo $CI_COMMIT_BRANCH
       - echo "Getting system info ..."
       - cat /etc/os-release
-      - echo "/bin/c*"
-      - ls /bin/c*
-      - echo "/usr/bin/c*"
-      - ls /usr/bin/c*
-      - echo "/usr/local/bin/c*"
-      - ls /usr/local/bin/c*
-      #- cd src/sphere
-      #- echo "Building SPHERE ..."
-      #- gcc -O2 -lstdc++ -lm np_sphere.cpp sphere.cpp ../libnptm/Commons.cpp ../libnptm/Configuration.cpp ../libnptm/Parsers.cpp -o ../../build/sphere/np_sphere
-      #- cd ../cluster
-      #- echo "Building CLUSTER ..."
-      #- gcc -O2 -lstdc++ -lm np_cluster.cpp cluster.cpp ../libnptm/Commons.cpp ../libnptm/Configuration.cpp ../libnptm/Parsers.cpp ../sphere/sphere.cpp -o ../../build/cluster/np_cluster
+      - cd src
+      - echo "Running make ..."
+      - make
 
 running_stage:
    stage: run
@@ -77,14 +68,14 @@ running_stage:
       - hostname
       - echo $CI_COMMIT_SHA
       - echo $CI_COMMIT_BRANCH
-      #- cd build/sphere
-      #- echo "Running np_sphere"
-      #- chmod +x np_sphere
-      #- ./np_sphere
-      #- cd ../cluster
-      #- echo "Running np_cluster"
-      #- chmod +x np_cluster
-      #- ./np_cluster
+      - cd build/sphere
+      - echo "Running np_sphere"
+      - chmod +x np_sphere
+      - ./np_sphere
+      - cd ../cluster
+      - echo "Running np_cluster"
+      - chmod +x np_cluster
+      - ./np_cluster
       
 testing_stage:
    stage: test
@@ -109,12 +100,12 @@ testing_stage:
       - hostname
       - echo $CI_COMMIT_SHA
       - echo $CI_COMMIT_BRANCH
-      #- cd build/sphere
-      #- export FFILE=../../test_data/sphere/OSPH
-      #- echo "Comparing output of SPHERE"
-      #- python3 ../../src/scripts/pycompare.py --ffile=$FFILE --cfile=c_OSPH --html
-      #- cd ../cluster
-      #- echo "Comparing output of CLUSTER"
-      #- export FFILE=../../test_data/cluster/OCLU
-      #- python3 ../../src/scripts/pycompare.py --ffile=$FFILE --cfile=c_OCLU --html
+      - cd build/sphere
+      - export FFILE=../../test_data/sphere/OSPH
+      - echo "Comparing output of SPHERE"
+      - python3 ../../src/scripts/pycompare.py --ffile=$FFILE --cfile=c_OSPH --html
+      - cd ../cluster
+      - echo "Comparing output of CLUSTER"
+      - export FFILE=../../test_data/cluster/OCLU
+      - python3 ../../src/scripts/pycompare.py --ffile=$FFILE --cfile=c_OCLU --html
       
-- 
GitLab