.gitlab-ci.yml 1.81 KB
Newer Older
1
image: dorie/dune-env:2.5
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
  script:
32 33 34
    - ./dune-common/bin/dunecontrol --only=dune-python exec "rm -rf build-cmake"
    - ./dune-common/bin/dunecontrol --only=dune-testtools exec "rm -rf build-cmake"
    - ./dune-common/bin/dunecontrol --only=dorie exec "rm -rf build-cmake"
35
    - CMAKE_FLAGS="-DDUNE_FORCE_PYTHON3=True" MAKE_FLAGS="-j 2" ./dune-common/bin/dunecontrol --module=dorie all
Dion Haefner's avatar
Dion Haefner committed
36 37 38 39
    - 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

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

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

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