build:gcc10-mpi-debug:
  image: localhost:5000/ubuntu_gcc10_mpi
  stage: build
  needs: []
  script:
    - mkdir -p build/gcc10-debug-mpi
    - cd build/gcc10-debug-mpi
    - CXX=g++-10 CC=gcc-10 cmake ../.. -DCMAKE_BUILD_TYPE=Debug
    - make pugs
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc10-debug-mpi"
    paths:
      - build/gcc10-debug-mpi
    untracked: true

test:gcc10-mpi-debug:
  image: localhost:5000/ubuntu_gcc10_mpi
  stage: test
  needs: ["build:gcc10-mpi-debug"]
  script:
    - mkdir -p build/gcc10-debug-mpi
    - cd build/gcc10-debug-mpi
    - CXX=g++-10 CC=gcc-10 cmake ../.. -DCMAKE_BUILD_TYPE=Debug
    - make test
  cache:
    key: "${CI_COMMIT_REF_SLUG}-gcc10-debug-mpi"
    paths:
      - build/gcc10-debug-mpi
    untracked: true
