.gitlab-ci.yml 1.73 KB
Newer Older
Dion Haefner's avatar
typo  
Dion Haefner committed
1
image: dorie/dune-env:2.4
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 11
  - build
  - deploy
Dion Haefner's avatar
Dion Haefner committed
12

13
build:main:
14 15
  tags:
    - docker
Dion Haefner's avatar
Dion Haefner committed
16
  script:
17
    - MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --only=dorie all
Dion Haefner's avatar
Dion Haefner committed
18
    - export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
19 20 21 22 23 24 25 26
    - ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
    - ./dune-common/bin/dunecontrol --only=dorie make doc
  stage: build
  artifacts:
    name: "$CI_BUILD_NAME"
    paths:
      - $CI_PROJECT_DIR/build-cmake/doc/html/
    expire_in: 1 week
27

Dion Haefner's avatar
Dion Haefner committed
28
build:python3:
29 30
  tags:
    - docker
Dion Haefner's avatar
Dion Haefner committed
31 32 33
  script:
    - cd /opt/dune/venv
    - virtualenv dorie3 --py=/usr/bin/python3
Dion Haefner's avatar
Dion Haefner committed
34 35
    - source /opt/dune/venv/dorie3/bin/activate
    - python -m pip install virtualenv
Dion Haefner's avatar
Dion Haefner committed
36 37
    - cd /opt/dune
    - ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
38
    - MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol all
Dion Haefner's avatar
Dion Haefner committed
39 40 41 42
    - export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
    - ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
  stage: build

43
build:update_dune:
44 45
  tags:
    - docker
46
  script:
Dion Haefner's avatar
Dion Haefner committed
47
    - ./dune-common/bin/dunecontrol update || true
48
    - ./dune-common/bin/dunecontrol exec "rm -rf build-cmake"
49
    - MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol all
Dion Haefner's avatar
Dion Haefner committed
50
    - export PATH=/opt/dune/dorie/build-cmake/bin:$PATH
51 52 53
    - ARGS="--output-on-failure -j 2" ./dune-common/bin/dunecontrol --only=dorie make test
  stage: build

54
build:debug:
55 56
  tags:
    - docker
57 58
  script:
    - CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Debug" ./dune-common/bin/dunecontrol --only=dorie all
Dion Haefner's avatar
debug  
Dion Haefner committed
59
  stage: build
60

61
deploy:docs:
62 63
  tags:
    - docker
64
  script:
Dion Haefner's avatar
Dion Haefner committed
65
    - cd $CI_PROJECT_DIR && bash .deploy_docs
66 67 68
  stage: deploy
  only:
    - master