Commit 50b7ecc5 authored by Giovanni La Mura's avatar Giovanni La Mura
Browse files

Create a memory sanity check stage

parent 9cbdda39
Loading
Loading
Loading
Loading
+28 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ workflow:
stages:
   - compatibility
   - build
   - sanity
   - run
   - test

@@ -153,6 +154,33 @@ building_stage:
      - cd ../build/latex
      - make

sanity_stage:
   stage: sanity
   tags: ["np-tmcode"]
   allow_failure: true
   needs:
      - job: building_stage
   dependencies:
      - building_stage
   artifacts:
      paths:
         - build/testing/valgrind.log
      exclude:
         - ".git*"
         - ".git/**/*"
      expire_in: 2 hours
   script:
      # bash commands to be executed
      - pwd
      - hostname
      - echo $CI_COMMIT_SHA
      - echo $CI_COMMIT_BRANCH
      - cd build/testing
      - echo "Running memory sanity check"
      - chmod +x test_ParticleDescriptor
      - valgrind --leak-check=full --log-file=valgrind.log ./test_ParticleDescriptor
      - grep "no leaks are possible" valgrind.log
      
running_stage:
   stage: run
   tags: ["np-tmcode"]