forked from osmocom/wireshark
b1e74c527b
Inspired by the description in https://about.gitlab.com/2016/10/12/automated-debian-package-build-with-gitlab-ci/ the gitlab-ci job build-debian-deb generates *.deb files These files are available as build artifacts for 3 days. Change-Id: Ic0b01c161e659c3ed9dbbd6387fa8960e34d50d3 Signed-off-by: Juergen Kosel <juergen.kosel@gmx.de> Reviewed-on: https://code.wireshark.org/review/34042 Reviewed-by: Dario Lombardo <lomato@gmail.com> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
192 lines
5 KiB
YAML
192 lines
5 KiB
YAML
.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
|