---
image: mathiwr/amdis-base:debian9

cache:
  - install/

stages:
  - build
  - demo
  - test


# compile amdis
build:9-debug-gcc:
  stage: build
  script:
  - tools/build_amdis.sh --stage build --config Debug
  only:
  - master

build:9-release-gcc:
  stage: build
  script:
  - tools/build_amdis.sh --stage build --config Release
  only:
  - master

build:9-parallel-debug-gcc:
  stage: build
  script:
  - tools/build_amdis.sh --stage build --config Debug --parallel
  only:
  - master

build:9-parallel-release-gcc:
  stage: build
  script:
  - tools/build_amdis.sh --stage build --config Release --parallel
  only:
  - master


# compile the demos
demo:9-debug-gcc:
  stage: demo
  script:
  - tools/build_amdis.sh --stage demo --config Debug
  only:
  - master

demo:9-release-gcc:
  stage: demo
  script:
  - tools/build_amdis.sh --stage demo --config Release
  only:
  - master

demo:9-parallel-debug-gcc:
  stage: demo
  script:
  - tools/build_amdis.sh --stage demo --config Debug --parallel
  only:
  - master

demo:9-parallel-release-gcc:
  stage: demo
  script:
  - tools/build_amdis.sh --stage demo --config Release --parallel
  only:
  - master


# compiel and run the tests
test:9-debug-gcc:
  stage: test
  script:
  - tools/build_amdis.sh --stage test --config Debug
  only:
  - master

test:9-release-gcc:
  stage: test
  script:
  - tools/build_amdis.sh --stage test --config Release
  only:
  - master

test:9-parallel-debug-gcc:
  stage: test
  script:
  - tools/build_amdis.sh --stage test --config Debug --parallel
  only:
  - master

test:9-parallel-release-gcc:
  stage: test
  script:
  - tools/build_amdis.sh --stage test --config Release --parallel
  only:
  - master

