.gitlab-ci.yml 2.47 KB
Newer Older
1
image: dorie/dune-env:2.5.1
Dion Haefner's avatar
Dion Haefner committed
2

Dion Haefner's avatar
Dion Haefner committed
3 4
variables:
  DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR
Lukas Riedel's avatar
Lukas Riedel committed
5 6 7 8 9 10
  DUNECONTROL: ./dune-common/bin/dunecontrol
  CMAKE_FLAGS:
    -DDUNE_PYTHON_VIRTUALENV_SETUP=True
    -DDUNE_PYTHON_ALLOW_GET_PIP=True
  MAKE_FLAGS:
    -j 2
Dion Haefner's avatar
Dion Haefner committed
11 12 13

before_script:
  - cd /opt/dune
Dion Haefner's avatar
Dion Haefner committed
14

Dion Haefner's avatar
Dion Haefner committed
15
stages:
16
  - build
17
  - test
Dion Haefner's avatar
Dion Haefner committed
18

19
build:main:
20
  stage: build
Dion Haefner's avatar
Dion Haefner committed
21
  script:
Lukas Riedel's avatar
Lukas Riedel committed
22 23 24
    - CMAKE_FLAGS="$CMAKE_FLAGS"
      MAKE_FLAGS="$MAKE_FLAGS"
      $DUNECONTROL --only=dorie all
25
  artifacts:
26
    name: "$CI_JOB_NAME"
27
    paths:
28
      - $CI_PROJECT_DIR/build-cmake
Lukas Riedel's avatar
Lukas Riedel committed
29
    expire_in: 1 day
30

31
build:update_dune:
32
  stage: build
33 34
  only:
    - master
35
  script:
Lukas Riedel's avatar
Lukas Riedel committed
36 37 38 39
    - $DUNECONTROL update
    - CMAKE_FLAGS="$CMAKE_FLAGS"
      MAKE_FLAGS="$MAKE_FLAGS"
      $DUNECONTROL --module=dorie all
40 41 42 43
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake
Lukas Riedel's avatar
Lukas Riedel committed
44
    expire_in: 1 day
45

46
build:debug:
47
  stage: build
48
  allow_failure: true
49
  script:
Lukas Riedel's avatar
Lukas Riedel committed
50 51 52 53 54 55
    - CMAKE_FLAGS="
        $CMAKE_FLAGS
        -DCMAKE_BUILD_TYPE=Debug 
        -DCMAKE_CXX_FLAGS_DEBUG='-Werror'"
      MAKE_FLAGS="$MAKE_FLAGS"
      $DUNECONTROL --only=dorie all
56

Lukas Riedel's avatar
Lukas Riedel committed
57
test:exec_cmds:
Lukas Riedel's avatar
Lukas Riedel committed
58 59 60 61
  stage: test
  dependencies:
    - build:main
  script:
Lukas Riedel's avatar
Lukas Riedel committed
62 63
    - $DUNECONTROL --only=dorie configure
    - $DUNECONTROL --only=dorie make test_dorie_exec
Lukas Riedel's avatar
Lukas Riedel committed
64 65 66 67
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
68
    expire_in: 1 day
Lukas Riedel's avatar
Lukas Riedel committed
69 70

test:ode:
71 72 73
  stage: test
  dependencies:
    - build:main
74
  script:
Lukas Riedel's avatar
Lukas Riedel committed
75 76
    - $DUNECONTROL --only=dorie configure
    - $DUNECONTROL --only=dorie make test_run_ode
77 78 79 80
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
81
    expire_in: 1 day
82

Lukas Riedel's avatar
Lukas Riedel committed
83
test:ode-update_dune:
84 85 86
  stage: test
  dependencies:
    - build:update_dune
87 88
  only:
    - master
89
  script:
Lukas Riedel's avatar
Lukas Riedel committed
90 91
    - $DUNECONTROL --only=dorie configure
    - $DUNECONTROL --only=dorie make test_run_ode
92 93 94 95
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121
    expire_in: 1 day

test:parallel:
  stage: test
  dependencies:
    - build:main
  script:
    - $DUNECONTROL --only=dorie configure
    - $DUNECONTROL --only=dorie make test_run_parallel
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
    expire_in: 1 day

test:reference:
  stage: test
  dependencies:
    - build:main
  script:
    - $DUNECONTROL --only=dorie configure
    - $DUNECONTROL --only=dorie make test_run_ref
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
122
    expire_in: 1 day