-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
136 lines (117 loc) · 2.89 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# Build OS = Ubuntu LTS (latest)
image: mxklb/docker-qt5-deb
stages:
- tests
- build
- deploy
- release
before_script:
- chmod +x gitlab.sh && ./gitlab.sh
## 1 Debug builds (++ test)
.debug_compile: &debug_compile
script:
- qmake cuteproject.pro -r CONFIG+=debug
- make
.debug_build_with_tests:
stage: tests
<<: *debug_compile
rules:
# don't run on tags
- if: $CI_COMMIT_TAG == null
# Debug build (++ test coverage)
debug_tests_coverage:
extends: .debug_build_with_tests
after_script:
- gcovr -r . -e '.*extern.*' -e '.*moc_.*'
- chmod +x lcov.sh && ./lcov.sh
- mv coverage/*.pdf .
- mv coverage/*.tar.gz .
artifacts:
paths:
- coverage.pdf
- coverage.tar.gz
name: "test_coverage"
# Test latest Ubuntu (rolling)
debug_tests_rolling:
extends: .debug_build_with_tests
image: mxklb/docker-qt5-deb:rolling
allow_failure: true
# Test bleeding Ubuntu (devel)
debug_tests_devel:
extends: .debug_build_with_tests
image: mxklb/docker-qt5-deb:devel
allow_failure: true
## 2 Release build (++ tests)
.release_compile: &release_compile
script:
- qmake cuteproject.pro -r CONFIG+=release
- make
release_tests:
stage: tests
<<: *release_compile
## 3 Release build (no tests)
release_build:
stage: build
<<: *release_compile
before_script:
- chmod +x gitlab.sh && ./gitlab.sh
- echo "catchTests=false" > globals.pri
## 4 Build & Deploy debian packages
.build_debian_pkg:
stage: deploy
script:
- chmod +x pkgs/version.sh
- chmod +x pkgs/debian.sh && pkgs/debian.sh
- mv pkgs/deb/cuteproject-*.deb .
artifacts:
paths:
- cuteproject-*.deb
# Continuous deployments
debian_xenial_latest:
extends: .build_debian_pkg
image: mxklb/docker-qt5-deb:xenial
artifacts:
name: "cuteproject-xenial_amd64"
debian_trusty_latest:
extends: .build_debian_pkg
image: mxklb/docker-qt5-deb:trusty
before_script:
- chmod +x gitlab.sh && ./gitlab.sh
- export USER=$GITLAB_USER_LOGIN
artifacts:
name: "cuteproject-trusty_amd64"
# Release deployments
.release_deployment: &release_deployment
stage: release
rules:
# run only on tags
- if: $CI_COMMIT_TAG
debian_xenial_stable:
extends: debian_xenial_latest
<<: *release_deployment
debian_trusty_stable:
extends: debian_trusty_latest
<<: *release_deployment
## 5 Build & Deploy .AppImage's
.build_appimage:
stage: deploy
image: mxklb/docker-qt5-deb:xenial
<<: *release_compile
before_script:
- chmod +x gitlab.sh && ./gitlab.sh
- echo "catchTests=false" > globals.pri
after_script:
- chmod +x pkgs/version.sh
- chmod +x pkgs/appimage.sh && pkgs/appimage.sh
- mv pkgs/cuteproject-* .
artifacts:
paths:
- cuteproject-*
name: "cuteproject-x86_64"
# Continuous deployment
appimage_latest:
extends: .build_appimage
# Release deployment
appimage_stable:
extends: .build_appimage
<<: *release_deployment