Commit a7934d60 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Use GCC compiler for C++ code in pipeline

parent e58e70c6
Loading
Loading
Loading
Loading
+10 −21
Original line number Original line Diff line number Diff line
@@ -22,12 +22,11 @@ stages:
building_stage:
building_stage:
   stage: build
   stage: build
   allow_failure: false
   allow_failure: false
   image: debian:bookworm-slim
   artifacts:
   artifacts:
      paths:
      paths:
         - build/cluster/*
         - build/cluster/*
         - build/sphere/*
         - build/sphere/*
         - build/trapping/*
         #- build/trapping/*
      exclude:
      exclude:
         - ".git*"
         - ".git*"
         - ".git/**/*"
         - ".git/**/*"
@@ -40,27 +39,25 @@ building_stage:
      - echo $CI_COMMIT_BRANCH
      - echo $CI_COMMIT_BRANCH
      - echo "Getting system info ..."
      - echo "Getting system info ..."
      - cat /etc/os-release
      - cat /etc/os-release
      - echo "Updating system ..."
      - cd src/sphere
      - apt update
      - echo "Building SPHERE ..."
      - echo "Installing dependencies"
      - gcc -O2 -lstdc++ -lm np_sphere.cpp sphere.cpp ../libnptm/Commons.cpp ../libnptm/Configuration.cpp ../libnptm/Parsers.cpp -o ../../build/sphere/np_sphere
      - apt install -y g++ gfortran make
      - cd ../cluster
      - cd src
      - echo "Building CLUSTER ..."
      - echo "Running make"
      - 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
      - make


running_stage:
running_stage:
   stage: run
   stage: run
   allow_failure: false
   allow_failure: false
   needs:
   needs:
      - job: building_stage
      - job: building_stage
   image: debian:bookworm-slim
   dependencies:
   dependencies:
      - building_stage
      - building_stage
   artifacts:
   artifacts:
      paths:
      paths:
         - build/cluster/*
         - build/cluster/c_*
         - build/sphere/*
         - build/sphere/c_*
         - build/trapping/*
         #- build/trapping/*
      exclude:
      exclude:
         - ".git*"
         - ".git*"
         - ".git/**/*"
         - ".git/**/*"
@@ -71,10 +68,6 @@ running_stage:
      - hostname
      - hostname
      - echo $CI_COMMIT_SHA
      - echo $CI_COMMIT_SHA
      - echo $CI_COMMIT_BRANCH
      - echo $CI_COMMIT_BRANCH
      - echo "Updating system ..."
      - apt update
      - echo "Installing dependencies ..."
      - apt install -y g++ gfortran gdb
      - cd build/sphere
      - cd build/sphere
      - echo "Running np_sphere"
      - echo "Running np_sphere"
      - chmod +x np_sphere
      - chmod +x np_sphere
@@ -107,10 +100,6 @@ testing_stage:
      - hostname
      - hostname
      - echo $CI_COMMIT_SHA
      - echo $CI_COMMIT_SHA
      - echo $CI_COMMIT_BRANCH
      - echo $CI_COMMIT_BRANCH
      - echo "Updating system ..."
      - apt update
      - echo "Installing dependencies ..."
      - apt install -y python3
      - cd build/sphere
      - cd build/sphere
      - export FFILE=../../test_data/sphere/OSPH
      - export FFILE=../../test_data/sphere/OSPH
      - echo "Comparing output of SPHERE"
      - echo "Comparing output of SPHERE"