build:clang8-mpi-release:
  image: localhost:5000/ubuntu_clang8_mpi
  stage: build
  script:
    - mkdir -p build/clang8-release-mpi
    - cd build/clang8-release-mpi
    - CXX=clang++-8 CC=clang-8 cmake ../.. -DCMAKE_BUILD_TYPE=Release -DCLANG_FORMAT=/usr/bin/clang-format-8
    - make pugs
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang8-release-mpi"
    paths:
      - build/clang8-release-mpi
    untracked: true

test:clang8-mpi-release:
  image: localhost:5000/ubuntu_clang8_mpi
  stage: test
  dependencies:
    - build:clang8-mpi-release
  script:
    - mkdir -p build/clang8-release-mpi
    - cd build/clang8-release-mpi
    - CXX=clang++-8 CC=clang-8 cmake ../.. -DCMAKE_BUILD_TYPE=Release -DCLANG_FORMAT=/usr/bin/clang-format-8
    - make run_unit_tests
  cache:
    key: "${CI_COMMIT_REF_SLUG}-clang8-release-mpi"
    paths:
      - build/clang8-release-mpi
    untracked: true
