forked from wireshark/wireshark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
191 lines (187 loc) · 4.97 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
.build: &build
stage: build
after_script:
- for builddir in build/packaging/rpm/BUILD/wireshark-*/build build/packaging/rpm/BUILD/wireshark-* build; do [ ! -d "$builddir" ] || break; done
- if [ "$CI_JOB_NAME" = "rpm-opensuse-42.3" ]; then export LD_LIBRARY_PATH=$builddir/run; fi
- if [ -f $builddir/run/tshark ]; then $builddir/run/tshark --version; fi
# The custom Ubuntu image pre-installs dependencies and compilers to speed up the build:
# https://hub.docker.com/r/wireshark/wireshark-ubuntu-dev
# https://github.com/wireshark/wireshark-ubuntu-dev-docker
.build-ubuntu: &build-ubuntu
<<: *build
image: wireshark/wireshark-ubuntu-dev
retry: 1
before_script:
- apt-get update -qq
- ./tools/debian-setup.sh --install-optional --install-test-deps -y
- useradd user
- locale-gen en_US.UTF-8
- export LANG=en_US.UTF-8
- export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark
- mkdir build
- cd build
script:
- cmake -GNinja $CMAKE_ARGS ..
- ninja
- ninja test-programs
- chown -R user .
- if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
- su user -c pytest-3
.build-rpm: &build-rpm
<<: *build
artifacts:
paths:
- build/packaging/rpm/RPMS
expire_in: 3 days
gcc-5:
<<: *build-ubuntu
variables:
CC: gcc-5
CXX: g++-5
gcc-6:
<<: *build-ubuntu
variables:
CC: gcc-6
CXX: g++-6
gcc-7:
<<: *build-ubuntu
variables:
CC: gcc-7
CXX: g++-7
gcc-8:
<<: *build-ubuntu
variables:
CC: gcc-8
CXX: g++-8
gcc-8-nopcap:
<<: *build-ubuntu
variables:
CMAKE_ARGS: -DENABLE_PCAP=NO
CC: gcc-8
CXX: g++-8
clang-5:
<<: *build-ubuntu
variables:
CMAKE_ARGS: -DCMAKE_C_FLAGS=-Wframe-larger-than=20000
CC: clang-5.0
CXX: clang++-5.0
clang-6:
<<: *build-ubuntu
variables:
CMAKE_ARGS: -DCMAKE_C_FLAGS=-Wframe-larger-than=20000
CC: clang-6.0
CXX: clang++-6.0
clang-7:
<<: *build-ubuntu
variables:
CMAKE_ARGS: -DCMAKE_C_FLAGS=-Wframe-larger-than=20000
CC: clang-7
CXX: clang++-7
clang-7-nopcap:
<<: *build-ubuntu
variables:
CMAKE_ARGS: -DENABLE_PCAP=NO -DCMAKE_C_FLAGS=-Wframe-larger-than=20000
CC: clang-7
CXX: clang++-7
build:rpm-centos-7:
<<: *build-rpm
image: centos:7
script:
- yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- tools/rpm-setup.sh --install-optional -y
- mkdir build
- cd build
- cmake3 -GNinja ..
- ninja-build rpm-package
test:rpm-centos-7:
stage: test
image: centos:7
script:
- yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
- yum --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version
dependencies:
- build:rpm-centos-7
variables:
GIT_STRATEGY: none
.build-rpm-opensuse: &build-rpm-opensuse
<<: *build-rpm
script:
- zypper --non-interactive install update-desktop-files
- tools/rpm-setup.sh --install-optional ruby
- gem install asciidoctor -v 1.5.8 --no-ri --no-rdoc
- mkdir build
- cd build
- cmake -GNinja ..
- ninja rpm-package
.test-rpm-opensuse: &test-rpm-opensuse
stage: test
script:
- zypper --no-gpg-checks install -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version
variables:
GIT_STRATEGY: none
build:rpm-opensuse-42.3:
<<: *build-rpm-opensuse
image: opensuse/leap:42.3
test:rpm-opensuse-42.3:
<<: *test-rpm-opensuse
image: opensuse/leap:42.3
dependencies:
- build:rpm-opensuse-42.3
build:rpm-opensuse-15.0:
<<: *build-rpm-opensuse
image: opensuse/leap:15.0
test:rpm-opensuse-15.0:
<<: *test-rpm-opensuse
image: opensuse/leap:15.0
dependencies:
- build:rpm-opensuse-15.0
.build-rpm-fedora: &build-rpm-fedora
<<: *build-rpm
script:
- dnf upgrade -y
- tools/rpm-setup.sh --install-optional -y
- mkdir build
- cd build
- cmake3 -GNinja ..
- ninja-build rpm-package
.test-rpm-fedora: &test-rpm-fedora
stage: test
script:
- dnf install -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version
variables:
GIT_STRATEGY: none
build:rpm-fedora-28:
<<: *build-rpm-fedora
image: fedora:28
test:rpm-fedora-28:
<<: *test-rpm-fedora
image: fedora:28
dependencies:
- build:rpm-fedora-28
build:rpm-fedora-29:
<<: *build-rpm-fedora
image: fedora:29
test:rpm-fedora-29:
<<: *test-rpm-fedora
image: fedora:29
dependencies:
- build:rpm-fedora-29
# Job to generate packages for Debian stable
build:debian-stable:
image: debian:stable
stage: build
before_script:
- ./tools/debian-setup.sh --install-optional --install-test-deps -y --install-deb-deps
script:
# Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
# https://gitlab.com/gitlab-com/support-forum/issues/2790
- DH_QUIET=1 dpkg-buildpackage -b --no-sign -jauto
- mkdir debian-packages
- mv ../*.deb debian-packages/
artifacts:
paths:
- debian-packages/*.deb
expire_in: 3 days