forked from Cockatrice/Cockatrice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
139 lines (115 loc) · 3.8 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
137
138
139
---
stages:
- build
.artifacts: &artifacts
artifacts:
paths:
- build/
.cache: &cache
cache:
key: "$CI_BUILD_NAME"
paths:
- cache/
.branches: &branches
only:
- master
.tags: &tags
tags:
- linux
- docker
#================================ DEBIAN-BASED ================================
.build_rc_package_deb: &build_rc_package_deb
stage: build
script:
- mkdir -p build
- cd build
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Release -DCPACK_GENERATOR=DEB
- make package -j2
.build_debug_package_deb: &build_debug_package_deb
stage: build
script:
- mkdir -p build
- cd build
- cmake .. -DWITH_SERVER=1 -DCMAKE_BUILD_TYPE=Debug -DCPACK_GENERATOR=DEB
- make package -j2
.deb-artifacts: &artifacts_deb
artifacts:
paths:
- build/*.deb
- build/CMakeFiles/*.log
when: always
#----------------------------------- UBUNTU -----------------------------------
.requirements_16xx: &install_requirements_16xx
before_script:
- apt-get -o dir::cache::archives="cache" update -qq
- apt-get -o dir::cache::archives="cache" install -y build-essential g++ cmake git
- apt-get -o dir::cache::archives="cache" install -y libprotobuf-dev protobuf-compiler
- apt-get -o dir::cache::archives="cache" install -y qt5-default qttools5-dev qttools5-dev-tools
- apt-get -o dir::cache::archives="cache" install -y qtmultimedia5-dev libqt5multimedia5-plugins
- apt-get -o dir::cache::archives="cache" install -y libqt5svg5-dev libqt5sql5-mysql
- apt-get -o dir::cache::archives="cache" install -y libqt5websockets5-dev
.requirements_17xx: &install_requirements_17xx
before_script:
- apt-get -o dir::cache::archives="cache" update -qq
- apt-get -o dir::cache::archives="cache" install -y build-essential g++ cmake git
- apt-get -o dir::cache::archives="cache" install -y libprotobuf-dev protobuf-compiler
- apt-get -o dir::cache::archives="cache" install -y qt5-default qttools5-dev qttools5-dev-tools
- apt-get -o dir::cache::archives="cache" install -y qtmultimedia5-dev libqt5multimedia5-plugins
- apt-get -o dir::cache::archives="cache" install -y libqt5svg5-dev libqt5sql5-mysql
- apt-get -o dir::cache::archives="cache" install -y libqt5websockets5-dev
.build_1604: &1604
image: ubuntu:16.04
<<: *tags
<<: *branches
<<: *install_requirements_16xx
<<: *artifacts_deb
<<: *cache
.build_1710: &1710
image: ubuntu:17.10
<<: *tags
<<: *branches
<<: *install_requirements_17xx
<<: *artifacts_deb
<<: *cache
build_rc_1604:
<<: *1604
<<: *build_rc_package_deb
when: always
build_debug_1604:
<<: *1604
<<: *build_debug_package_deb
when: always
build_rc_1710:
<<: *1710
<<: *build_rc_package_deb
when: always
build_debug_1710:
<<: *1710
<<: *build_debug_package_deb
when: always
allow_failure: true
#----------------------------------- DEBIAN -----------------------------------
.requirements_stretch: &install_requirements_stretch
before_script:
- apt-get -o dir::cache::archives="cache" update -qq
- apt-get -o dir::cache::archives="cache" install -y build-essential g++ cmake git
- apt-get -o dir::cache::archives="cache" install -y qt5-default qtbase5-dev-tools
- apt-get -o dir::cache::archives="cache" install -y qttools5-dev-tools qtmultimedia5-dev
- apt-get -o dir::cache::archives="cache" install -y libqt5svg5-dev libqt5websockets5-dev
- apt-get -o dir::cache::archives="cache" install -y libprotobuf-dev protobuf-compiler
.build_stretch: &stretch
image: debian:stretch
<<: *tags
<<: *branches
<<: *install_requirements_stretch
<<: *artifacts_deb
<<: *cache
build_rc_stretch:
<<: *stretch
<<: *build_rc_package_deb
when: always
build_debug_stretch:
<<: *stretch
<<: *build_debug_package_deb
when: always
allow_failure: true