-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
74 lines (66 loc) · 1.51 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
image: alpine
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS
when: never
- if: $CI_COMMIT_REF_PROTECTED
variables:
GIT_SUBMODULE_STRATEGY: recursive
stages:
- build
- test
- docs
- publish
before_script:
- apk update
- "apk add build-base linux-headers make cmake git bash \
zlib-dev openssl-libs-static openssl-dev openssl \
doxygen ttf-freefont graphviz"
build:mud:
stage: build
rules:
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
when: manual
allow_failure: true
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
script:
- make -j install # build and install (copies web files to bin/www/ and libs to build/)
artifacts:
paths:
- bin
- build
publish:dev-docs:
stage: docs
script:
- doxygen Doxyfile
artifacts:
paths:
- documentation/html
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
publish:client:
stage: docs
dependencies:
- build:mud
script:
- cp -r bin/www/ client-pages
artifacts:
paths:
- client-pages
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH
pages:
stage: publish
dependencies:
- publish:dev-docs
- publish:client
script:
- cp -r homepage public
- cp -r documentation/html public/dev-docs
- cp -r client-pages public/client
artifacts:
paths:
- public
rules: # publish only on default branch
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH