-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
132 lines (126 loc) · 3.76 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
.build: &build
stage: build
after_script:
- for builddir in build/packaging/rpm/BUILD/wireshark-*/build build/packaging/rpm/BUILD/wireshark-* build obj-*; do [ ! -d "$builddir/run" ] || break; done
- if [[ "$CI_JOB_NAME" == "build:rpm-opensuse-"* ]]; 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
# Rely on fedora:latest and debian-stable jobs for testing a recent GCC version.
# Since this broke sporadically in the past, test lack of capture support.
gcc-7-nopcap:
<<: *build-ubuntu
variables:
CMAKE_ARGS: -DENABLE_PCAP=NO
CC: gcc-7
CXX: g++-7
clang-10:
<<: *build-ubuntu
variables:
CC: clang-10
CXX: clang++-10
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-15.1:
image: opensuse/leap:15.1
<<: *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-15.1:
image: opensuse/leap:15.1
stage: test
script:
- zypper --no-gpg-checks install -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version
variables:
GIT_STRATEGY: none
dependencies:
- build:rpm-opensuse-15.1
build:rpm-fedora:
<<: *build-rpm
image: fedora
script:
- dnf upgrade -y
- tools/rpm-setup.sh --install-optional -y
- mkdir build
- cd build
- cmake3 -GNinja ..
- ninja-build rpm-package
test:rpm-fedora:
image: fedora
stage: test
script:
- dnf install -y build/packaging/rpm/RPMS/x86_64/*.rpm
- tshark --version
variables:
GIT_STRATEGY: none
dependencies:
- build:rpm-fedora
# Job to generate packages for Debian stable
build:debian-stable:
<<: *build
image: debian:stable
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