forked from wireshark/wireshark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
209 lines (209 loc) · 6.7 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
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
.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
.build-ubuntu: &build-ubuntu
<<: *build
image: crondaemon/wireshark
retry: 1
before_script:
- rm -rf /etc/apt/sources.list.d/*
- echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial main" > /etc/apt/sources.list.d/clang.list
- echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-6.0 main" > /etc/apt/sources.list.d/clang6.list
- echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-7 main" > /etc/apt/sources.list.d/clang7.list
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 15CF4D18AF4F7421
- echo "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main" > /etc/apt/sources.list.d/gcc.list
- apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1E9377A2BA9EF27F
- apt-get update -qq
- apt-get install -y python3-pip locales
- pip3 install pytest pytest-xdist
- 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
.build-rpm: &build-rpm
<<: *build
artifacts:
paths:
- build/packaging/rpm/RPMS
expire_in: 3 days
gcc-4:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps gcc-4.9 g++-4.9 -y
- cmake -GNinja -DCMAKE_C_COMPILER=gcc-4.9 -DCMAKE_CXX_COMPILER=g++-4.9 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
gcc-5:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps gcc-5 g++-5 -y
- cmake -GNinja -DCMAKE_C_COMPILER=gcc-5 -DCMAKE_CXX_COMPILER=g++-5 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
gcc-6:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps gcc-6 g++-6 -y
- cmake -GNinja -DCMAKE_C_COMPILER=gcc-6 -DCMAKE_CXX_COMPILER=g++-6 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
gcc-7:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps gcc-7 g++-7 -y
- cmake -GNinja -DCMAKE_C_COMPILER=gcc-7 -DCMAKE_CXX_COMPILER=g++-7 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
gcc-8:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps gcc-8 g++-8 -y
- cmake -GNinja -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
gcc-8-nopcap:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps gcc-8 g++-8 -y
- cmake -GNinja -DENABLE_PCAP=OFF -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
clang-5:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps clang-5.0 -y
- cmake -GNinja -DCMAKE_C_COMPILER=clang-5.0 -DCMAKE_CXX_COMPILER=clang++-5.0 -DCMAKE_C_FLAGS=-Wframe-larger-than=20000 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
clang-6:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps clang-6.0 -y
- cmake -GNinja -DCMAKE_C_COMPILER=clang-6.0 -DCMAKE_CXX_COMPILER=clang++-6.0 -DCMAKE_C_FLAGS=-Wframe-larger-than=20000 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
clang-7:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps clang-7 -y
- cmake -GNinja -DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7 -DCMAKE_C_FLAGS=-Wframe-larger-than=20000 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
clang-7-nopcap:
<<: *build-ubuntu
script:
- ../tools/debian-setup.sh --install-optional --install-test-deps clang-7 -y
- cmake -GNinja -DENABLE_PCAP=OFF -DCMAKE_C_COMPILER=clang-7 -DCMAKE_CXX_COMPILER=clang++-7 -DCMAKE_C_FLAGS=-Wframe-larger-than=20000 ..
- ninja
- ninja test-programs
- chown -R user .
- su user -c pytest
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:42.3
test:rpm-opensuse-42.3:
<<: *test-rpm-opensuse
image: opensuse: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