.gitlab-ci.yml 2.75 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
18
  - deploy
Dion Haefner's avatar
Dion Haefner committed
19

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

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

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

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

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

Lukas Riedel's avatar
Lukas Riedel committed
84
test:ode-update_dune:
85 86 87
  stage: test
  dependencies:
    - build:update_dune
88 89
  only:
    - master
90
  script:
Lukas Riedel's avatar
Lukas Riedel committed
91 92
    - $DUNECONTROL --only=dorie configure
    - $DUNECONTROL --only=dorie make test_run_ode
93 94 95 96
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
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 122 123
    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
    expire_in: 1 day
124 125 126 127 128 129

deploy:build_docs:
  stage: deploy
  dependencies:
    - build:main
  script:
Lukas Riedel's avatar
Lukas Riedel committed
130 131
    - $DUNECONTROL --only=dorie configure
    - $DUNECONTROL --only=dorie make doc
132 133 134 135 136
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/doc
    expire_in: 1 week