.gitlab-ci.yml 2.62 KB
Newer Older
1
2
3
4
5
image: mathiwr/dune:latest

stages:
  - setup
  - test
6
  - demo
Praetorius, Simon's avatar
Praetorius, Simon committed
7
  - pages
8
9

variables:
10
11
12
  BUILD_DIRECTORY:        "./build-cmake/"
  COMPILER:               UNDEFINED
  CMAKE_BUILD_TYPE:       UNDEFINED
13
14
15
16
17
18
19
20
21

# ------------------------------------------------------------------------------
# templates

# setup
.setup_template: &setup-definition
  stage: setup
  artifacts:
    paths:
22
    - $BUILD_DIRECTORY
23
24
    name: "$CI_BUILD_NAME"
    expire_in: 6 h
Praetorius, Simon's avatar
Praetorius, Simon committed
25
  script:
26
  - dunecontrol --opts=gitlab-ci.$COMPILER.opts --current all
27
  - cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE $BUILD_DIRECTORY
28
29
30
31
32
33
34
35
36
37
38
39

# test
.test_template: &test-definition
  stage: test
  script:
  - cmake --build $BUILD_DIRECTORY --target check

# demo
.demo_template: &demo-definition
  stage: demo
  script:
  - cmake --build $BUILD_DIRECTORY --target examples
40
41
42
43

# ------------------------------------------------------------------------------
# setup

44
45
46
47
48
49
50
setup:gcc-Default-Debug:
  variables:
    COMPILER:               gcc
    CMAKE_BUILD_TYPE:       Debug
  <<: *setup-definition

setup:gcc-Default-Release:
51
  variables:
52
53
54
55
56
57
58
59
    COMPILER:               gcc
    CMAKE_BUILD_TYPE:       Release
  <<: *setup-definition

setup:clang-Default-Debug:
  variables:
    COMPILER:               clang
    CMAKE_BUILD_TYPE:       Debug
60
61
  <<: *setup-definition

62
63
64
65
66
67
setup:clang-Default-Release:
  variables:
    COMPILER:               clang
    CMAKE_BUILD_TYPE:       Release
  <<: *setup-definition

68
  
69
# ------------------------------------------------------------------------------
70
# test
71

72
test:gcc-Default-Debug:
73
  dependencies:
74
75
  - setup:gcc-Default-Debug
  <<: *test-definition
76

77
test:gcc-Default-Release:
78
  dependencies:
79
80
  - setup:gcc-Default-Release
  <<: *test-definition
81

82
83
84
85
86
87
88
89
90
91
test:clang-Default-Debug:
  dependencies:
  - setup:clang-Default-Debug
  <<: *test-definition

test:clang-Default-Release:
  dependencies:
  - setup:clang-Default-Release
  <<: *test-definition

92
93

# ------------------------------------------------------------------------------
94
# demo
95

96
demo:gcc-Default-Debug:
97
  dependencies:
98
99
  - setup:gcc-Default-Debug
  <<: *demo-definition
100

101
demo:gcc-Default-Release:
102
  dependencies:
103
104
  - setup:gcc-Default-Release
  <<: *demo-definition
105

106
107
108
109
110
111
112
113
114
115
demo:clang-Default-Debug:
  dependencies:
  - setup:clang-Default-Debug
  <<: *demo-definition

demo:clang-Default-Release:
  dependencies:
  - setup:clang-Default-Release
  <<: *demo-definition

116
117
118
119
120
121
122
123
124
125
126
127
128

# ------------------------------------------------------------------------------
# generate doxygen documentation and upload to gitlab.pages
pages:
  script:
  - dunecontrol --current --make-opts=documentation all
  - mv doc/html/ public/
  artifacts:
    paths:
    - public
  only:
  - master