image: irmb/virtualfluids-deps:latest

stages:
  - build
  - test

build:
  stage: build

  artifacts:
    paths:
      - build/

  before_script:
    - export DEBIAN_FRONTEND=noninteractive
    - apt-get update

  script:
    - cmake -S . -B build -DBUILD_VF_CPU:BOOL=ON -DBUILD_VF_UNIT_TESTS:BOOL=ON
    - cmake --build build --target VirtualFluidsCore
    - cmake --build build --target basicsTests


test:
  stage: test

  before_script:
    - export DEBIAN_FRONTEND=noninteractive

  script:
    - build/bin/basicsTests