.gitlab-ci.yml 2.11 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 5 6 7
variables:
  DUNE_CONTROL_PATH: /opt/dune:$CI_PROJECT_DIR

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

Dion Haefner's avatar
Dion Haefner committed
9
stages:
10
  - build
11
  - test
12
  - deploy
Dion Haefner's avatar
Dion Haefner committed
13

14
build:main:
15
  stage: build
Dion Haefner's avatar
Dion Haefner committed
16
  script:
17
    - CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
18
  artifacts:
19
    name: "$CI_JOB_NAME"
20
    paths:
21 22
      - $CI_PROJECT_DIR/build-cmake
    expire_in: 3 days
23

24
build:update_dune:
25
  stage: build
26 27
  only:
    - master
28
  script:
29
    - ./dune-common/bin/dunecontrol update
30
    - ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
31 32 33 34 35 36
    - CMAKE_FLAGS="-DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --module=dorie all
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake
    expire_in: 3 days
37

38
build:debug:
39
  stage: build
40
  script:
41
    - CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug -DDUNE_PYTHON_VIRTUALENV_SETUP=True -DDUNE_PYTHON_ALLOW_GET_PIP=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
42

43 44 45 46 47
test:main:
  stage: test
  dependencies:
    - build:main
  allow_failure: true
48
  script:
49 50 51 52 53 54 55 56 57 58 59 60
    - ./dune-common/bin/dunecontrol --only=dorie configure
    - ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
    expire_in: 1 week

test:update_dune:
  stage: test
  dependencies:
    - build:update_dune
61 62
  only:
    - master
63
  allow_failure: true
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
  script:
    - ./dune-common/bin/dunecontrol --only=dorie configure
    - ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/Testing
    expire_in: 1 week

deploy:build_docs:
  stage: deploy
  dependencies:
    - build:main
  script:
    - ./dune-common/bin/dunecontrol --only=dorie configure
79 80 81 82 83 84
    - ./dune-common/bin/dunecontrol --only=dorie make doc
  artifacts:
    name: "$CI_JOB_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/doc
    expire_in: 1 week