2020-12-09 21:10:42 +00:00
|
|
|
|
# In the interest of reliability and performance, please avoid installing
|
|
|
|
|
# external dependencies here, e.g. via tools/*-setup.sh, apt, dnf, or yum.
|
|
|
|
|
# Do so in the appropriate Dockerfile at
|
|
|
|
|
# https://gitlab.com/wireshark/wireshark-containers/ instead.
|
|
|
|
|
# The resulting images can be found at
|
2021-10-01 20:29:15 +00:00
|
|
|
|
# https://gitlab.com/wireshark/wireshark-containers/container_registry
|
2020-12-09 21:10:42 +00:00
|
|
|
|
|
2021-04-29 19:10:51 +00:00
|
|
|
|
stages:
|
|
|
|
|
- build
|
|
|
|
|
- analysis
|
|
|
|
|
- test
|
2021-05-06 01:38:13 +00:00
|
|
|
|
- fuzz-asan
|
|
|
|
|
- fuzz-randpkt
|
|
|
|
|
- fuzz-valgrind
|
2021-04-29 19:10:51 +00:00
|
|
|
|
|
2020-12-21 23:03:49 +00:00
|
|
|
|
variables:
|
2021-03-11 21:56:44 +00:00
|
|
|
|
# Ensure that checkouts are a) fast and b) have a reachable tag. In a
|
|
|
|
|
# brighter, more glorious future we might be able to use --shallow-since:
|
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3460
|
|
|
|
|
# In the mean time, fetching the last 5000 commits does the job.
|
|
|
|
|
GIT_DEPTH: "1"
|
|
|
|
|
GIT_FETCH_EXTRA_FLAGS: "--depth=5000"
|
2020-12-21 23:03:49 +00:00
|
|
|
|
CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
|
2021-04-30 21:06:21 +00:00
|
|
|
|
# Preferred version of clang available on wireshark-ubuntu-dev
|
2021-10-18 18:40:19 +00:00
|
|
|
|
CLANG_VERSION: 12
|
2021-04-12 19:13:02 +00:00
|
|
|
|
# Enable color output in CMake, Ninja, and other tools. https://bixense.com/clicolors/
|
|
|
|
|
CLICOLOR_FORCE: 1
|
2020-12-21 23:03:49 +00:00
|
|
|
|
|
2021-05-01 01:13:01 +00:00
|
|
|
|
# Scheduled builds additionally set SCHEDULE_TYPE, which can be one of:
|
2021-04-30 15:56:29 +00:00
|
|
|
|
# - daily: Daily at 10:00 UTC
|
|
|
|
|
# - coverity-visual-c++: Monday, Wednesday, & Friday at 12:00 UTC
|
|
|
|
|
# - coverity-gcc: Sunday, Tuesday, Thursday & Saturday at 12:00 UTC
|
|
|
|
|
|
2021-05-02 16:39:21 +00:00
|
|
|
|
# Common rule stanzas
|
|
|
|
|
# These must currently be including using "!reference tags". "extends:" and
|
|
|
|
|
# YAML anchors won't work:
|
|
|
|
|
# https://gitlab.com/gitlab-org/gitlab/-/issues/322992
|
2021-04-30 17:49:11 +00:00
|
|
|
|
|
|
|
|
|
# Commits that have been approved and merged. Run automatically in the main
|
2021-05-07 18:49:51 +00:00
|
|
|
|
# repo and allow manual runs in the web UI and in forks.
|
2021-04-30 17:49:11 +00:00
|
|
|
|
.if-merged:
|
2021-10-05 19:50:25 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
|
2021-05-02 16:39:21 +00:00
|
|
|
|
when: always
|
2021-05-07 18:49:51 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "web"'
|
|
|
|
|
when: always
|
2021-05-02 16:39:21 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_URL !~ /.*gitlab.com\/wireshark\/wireshark/'
|
|
|
|
|
when: manual
|
2021-06-29 17:39:00 +00:00
|
|
|
|
# Merged commits for runners which are only available in
|
|
|
|
|
# wireshark/wireshark, e.g. wireshark-windows-*. Run automatically in
|
|
|
|
|
# the main repo and allow manual runs in the web UI.
|
|
|
|
|
.if-w-w-only-merged:
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
|
|
|
|
|
when: always
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "web"'
|
|
|
|
|
when: always
|
2021-04-30 17:49:11 +00:00
|
|
|
|
# Incoming merge requests.
|
|
|
|
|
.if-merge-request:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
|
|
|
|
|
when: always
|
2021-04-30 17:49:11 +00:00
|
|
|
|
# Incoming non-detached merge requests. Must be used for runners which are only
|
|
|
|
|
# available in wireshark/wireshark, e.g. wireshark-windows-*
|
2021-06-29 17:39:00 +00:00
|
|
|
|
.if-w-w-only-merge-request:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
|
|
|
|
|
when: always
|
|
|
|
|
# Daily jobs. Care should be taken when changing this since the scheduler
|
|
|
|
|
# often doesn't report errors.
|
|
|
|
|
.if-daily-schedule:
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "daily"'
|
|
|
|
|
when: always
|
2021-05-04 19:22:32 +00:00
|
|
|
|
# Fuzz jobs. Care should be taken when changing this since the scheduler
|
|
|
|
|
# often doesn't report errors.
|
|
|
|
|
.if-fuzz-schedule:
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "fuzz"'
|
|
|
|
|
when: always
|
2021-04-30 17:49:11 +00:00
|
|
|
|
|
2021-08-03 04:27:57 +00:00
|
|
|
|
.build-linux:
|
2019-04-10 10:52:52 +00:00
|
|
|
|
stage: build
|
2021-08-03 04:27:57 +00:00
|
|
|
|
tags:
|
|
|
|
|
- docker
|
2019-04-10 10:52:52 +00:00
|
|
|
|
after_script:
|
2020-03-11 22:18:21 +00:00
|
|
|
|
- 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
|
2019-04-10 10:52:52 +00:00
|
|
|
|
- if [ -f $builddir/run/tshark ]; then $builddir/run/tshark --version; fi
|
2020-12-24 13:11:51 +00:00
|
|
|
|
needs: []
|
2019-05-04 21:02:33 +00:00
|
|
|
|
|
2021-08-03 04:27:57 +00:00
|
|
|
|
.test-linux:
|
|
|
|
|
stage: test
|
|
|
|
|
tags:
|
|
|
|
|
- docker
|
|
|
|
|
variables:
|
|
|
|
|
GIT_STRATEGY: none
|
|
|
|
|
|
2020-12-21 16:19:29 +00:00
|
|
|
|
.build-ubuntu:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .build-linux
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
|
2018-06-08 08:36:16 +00:00
|
|
|
|
retry: 1
|
2020-09-01 21:41:02 +00:00
|
|
|
|
# https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
|
|
|
|
|
cache:
|
|
|
|
|
# XXX Use ${CI_JOB_NAME}-${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} instead?
|
|
|
|
|
key: ${CI_JOB_NAME}-master
|
|
|
|
|
paths:
|
|
|
|
|
- ccache/
|
2018-06-08 08:36:16 +00:00
|
|
|
|
before_script:
|
2019-04-12 14:32:32 +00:00
|
|
|
|
- useradd user
|
|
|
|
|
- export LANG=en_US.UTF-8
|
|
|
|
|
- export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark
|
2020-09-01 21:41:02 +00:00
|
|
|
|
- mkdir -p ccache
|
|
|
|
|
- ccache --show-stats
|
2020-12-10 23:42:48 +00:00
|
|
|
|
- export DEB_BUILD_OPTIONS=nocheck,parallel=$(( $(getconf _NPROCESSORS_ONLN) + 2 ))
|
2020-09-09 20:20:46 +00:00
|
|
|
|
- export DH_QUIET=1
|
|
|
|
|
- export MAKEFLAGS=--silent
|
2018-06-08 08:36:16 +00:00
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
2020-12-13 23:43:59 +00:00
|
|
|
|
after_script:
|
|
|
|
|
# The cache should be large enough to be useful but it shouldn't take
|
|
|
|
|
# too long to restore+save each run.
|
|
|
|
|
- ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
|
2019-05-12 20:33:34 +00:00
|
|
|
|
script:
|
2020-12-09 17:13:42 +00:00
|
|
|
|
# setcap restricts our library paths
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2020-12-09 17:13:42 +00:00
|
|
|
|
- CFLAGS=-Wl,-rpath=$(pwd)/run CXXFLAGS=-Wl,-rpath=$(pwd)/run cmake -GNinja $CMAKE_ARGS ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2019-05-12 20:33:34 +00:00
|
|
|
|
- ninja
|
2020-12-21 20:09:55 +00:00
|
|
|
|
- ninja install
|
|
|
|
|
- ninja shellcheck
|
2019-05-12 20:33:34 +00:00
|
|
|
|
- ninja test-programs
|
|
|
|
|
- chown -R user .
|
2019-05-13 07:06:35 +00:00
|
|
|
|
- if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
|
2020-12-09 17:13:42 +00:00
|
|
|
|
- if [ -f run/dumpcap ]; then su user -c "run/dumpcap -D" ; fi
|
2019-05-12 20:33:34 +00:00
|
|
|
|
- su user -c pytest-3
|
|
|
|
|
|
2020-12-21 16:19:29 +00:00
|
|
|
|
.build-rpm:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .build-linux
|
2021-05-03 20:22:51 +00:00
|
|
|
|
rules: !reference [.if-merged]
|
2020-12-24 13:11:51 +00:00
|
|
|
|
before_script:
|
2021-01-08 19:04:00 +00:00
|
|
|
|
# It might make sense to set "GIT_STRATEGY: none" and build from
|
|
|
|
|
# the tarball.
|
2020-12-24 13:11:51 +00:00
|
|
|
|
- git config --global user.email "you@example.com"
|
|
|
|
|
- git config --global user.name "Your Name"
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
|
|
|
|
- perl ../tools/make-version.pl --set-release
|
2021-01-08 19:04:00 +00:00
|
|
|
|
- mv -v ../wireshark-*.tar.* .
|
2019-01-17 09:13:09 +00:00
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
|
|
|
|
- build/packaging/rpm/RPMS
|
|
|
|
|
expire_in: 3 days
|
2021-05-03 20:22:51 +00:00
|
|
|
|
needs:
|
2021-05-07 19:03:00 +00:00
|
|
|
|
- 'Source Package'
|
2021-05-03 20:22:51 +00:00
|
|
|
|
|
|
|
|
|
.test-rpm:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .test-linux
|
2021-05-03 20:22:51 +00:00
|
|
|
|
rules: !reference [.if-merged]
|
2019-05-12 20:33:34 +00:00
|
|
|
|
|
2021-04-05 18:35:23 +00:00
|
|
|
|
.build-windows:
|
|
|
|
|
stage: build
|
2021-07-25 21:59:35 +00:00
|
|
|
|
retry: 1
|
2021-04-05 18:35:23 +00:00
|
|
|
|
before_script:
|
2021-04-09 17:39:45 +00:00
|
|
|
|
- if (-Not (Test-Path C:\Development)) { New-Item -Path C:\Development -ItemType "directory" }
|
2021-04-05 18:35:23 +00:00
|
|
|
|
- $env:WIRESHARK_BASE_DIR = "C:\Development"
|
|
|
|
|
- $env:Configuration = "RelWithDebInfo"
|
|
|
|
|
- $env:Path += ";C:\Program Files\CMake\bin"
|
|
|
|
|
- $env:Path += ";C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin"
|
2021-05-05 16:48:05 +00:00
|
|
|
|
- $env:Path += ";C:\qt\5.15.2\msvc2019_64\bin"
|
2021-04-05 18:35:23 +00:00
|
|
|
|
# https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell
|
|
|
|
|
- cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
|
|
|
|
|
- Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
|
|
|
|
|
# Testing / debugging only.
|
|
|
|
|
# - cmd.exe /c "set CI_PIPELINE_SOURCE"
|
|
|
|
|
# - cmd.exe /c "set CI_PROJECT_URL"
|
|
|
|
|
#- dir c:\
|
|
|
|
|
#- dir c:\qt
|
|
|
|
|
#- $env:path.split(";")
|
|
|
|
|
#- cmd.exe /c "set"
|
|
|
|
|
#- Get-Location
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
2021-04-06 23:52:43 +00:00
|
|
|
|
needs: []
|
2021-04-05 18:35:23 +00:00
|
|
|
|
|
gitlab-ci: remove unnecessary jobs, upgrade versions
The point of testing multiple compiler versions is to catch bugs that
only occur in one particular version. After an analysis of 800+ failed
builds, it appears that a lot of the checks are redundant. Changes:
* Drop GCC 6 and keep GCC 5, Ubuntu 16.04 default GCC is 5.3. Fixes for
warnings in old compilers: commit 829d2c3752 (GCC 5 + 6), commit
e451ea0a4d (Clang 5, GCC 4 + 5). Maybe GCC 5 can also be dropped since
Ubuntu 18.04 is around for a while.
* Drop clang-nopcap, all errors caught by Clang were also caught by GCC.
One change caught by gcc-8-nopcap but not Clang: commit 036c3d6bc7.
* Remove Clang 5: even though it triggers some unique failures, no major
distro ships with it so remove it.
* Drop old Clang versions, newer versions catch all warnings from older.
* Upgrade to Clang 8 which is already installed in the Docker image.
* Remove EOL Fedora 28 and 29, use latest (31).
* Remove EOL openSUSE Leap 42.3, keep 15.1 as the latest.
Reduces from 20 jobs (15 build, 5 test) to 10 jobs (7 build, 3 test).
Change-Id: I4a355dd1a90cbbef9525bd63a8544fa3e22369a2
Reviewed-on: https://code.wireshark.org/review/36281
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-05 01:54:04 +00:00
|
|
|
|
# Rely on fedora:latest and debian-stable jobs for testing a recent GCC version.
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Latest Clang:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
extends: .build-ubuntu
|
|
|
|
|
rules: !reference [.if-merged]
|
2019-05-12 20:33:34 +00:00
|
|
|
|
variables:
|
2021-04-30 21:06:21 +00:00
|
|
|
|
CC: "clang-$CLANG_VERSION"
|
|
|
|
|
CXX: "clang++-$CLANG_VERSION"
|
gitlab-ci: remove unnecessary jobs, upgrade versions
The point of testing multiple compiler versions is to catch bugs that
only occur in one particular version. After an analysis of 800+ failed
builds, it appears that a lot of the checks are redundant. Changes:
* Drop GCC 6 and keep GCC 5, Ubuntu 16.04 default GCC is 5.3. Fixes for
warnings in old compilers: commit 829d2c3752 (GCC 5 + 6), commit
e451ea0a4d (Clang 5, GCC 4 + 5). Maybe GCC 5 can also be dropped since
Ubuntu 18.04 is around for a while.
* Drop clang-nopcap, all errors caught by Clang were also caught by GCC.
One change caught by gcc-8-nopcap but not Clang: commit 036c3d6bc7.
* Remove Clang 5: even though it triggers some unique failures, no major
distro ships with it so remove it.
* Drop old Clang versions, newer versions catch all warnings from older.
* Upgrade to Clang 8 which is already installed in the Docker image.
* Remove EOL Fedora 28 and 29, use latest (31).
* Remove EOL openSUSE Leap 42.3, keep 15.1 as the latest.
Reduces from 20 jobs (15 build, 5 test) to 10 jobs (7 build, 3 test).
Change-Id: I4a355dd1a90cbbef9525bd63a8544fa3e22369a2
Reviewed-on: https://code.wireshark.org/review/36281
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-05 01:54:04 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Source Package:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
extends: .build-ubuntu
|
2020-12-24 13:11:51 +00:00
|
|
|
|
stage: .pre
|
2021-05-02 16:39:21 +00:00
|
|
|
|
rules: !reference [.if-merged]
|
2020-12-07 20:35:33 +00:00
|
|
|
|
script:
|
|
|
|
|
- perl ../tools/make-version.pl --set-release || ../perl make-version.pl --set-release
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2020-12-07 20:35:33 +00:00
|
|
|
|
- cmake -G Ninja $CMAKE_ARGS -DENABLE_CCACHE=ON ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2020-12-22 10:59:00 +00:00
|
|
|
|
- cd $CI_PROJECT_DIR
|
|
|
|
|
- build/packaging/source/git-export-release.sh -d .
|
2020-12-21 20:09:55 +00:00
|
|
|
|
after_script:
|
2020-12-21 23:07:37 +00:00
|
|
|
|
# - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
|
2021-08-27 18:58:41 +00:00
|
|
|
|
- stat --format="%n %s bytes" wireshark-*.tar.*
|
2020-12-21 20:09:55 +00:00
|
|
|
|
- for digest in sha256 rmd160 sha1 ; do openssl $digest wireshark-*.tar.* ; done
|
|
|
|
|
# This will break if we produce multiple tarballs, which is arguably a good thing.
|
|
|
|
|
- if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_DIST" ] ; then aws s3 cp wireshark-*.tar.* "$S3_DESTINATION_DIST/" ; fi
|
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
|
|
|
|
- wireshark-*.tar.*
|
2020-12-07 20:35:33 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
CentOS 7 RPM Package:
|
2020-12-21 16:19:29 +00:00
|
|
|
|
extends: .build-rpm
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/centos-7-dev
|
2018-06-08 09:49:50 +00:00
|
|
|
|
script:
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2018-06-08 09:49:50 +00:00
|
|
|
|
- cmake3 -GNinja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2018-06-08 09:49:50 +00:00
|
|
|
|
- ninja-build rpm-package
|
2021-05-07 19:03:00 +00:00
|
|
|
|
CentOS 7 RPM Test:
|
2021-05-03 20:22:51 +00:00
|
|
|
|
extends: .test-rpm
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/centos-7-dev
|
2019-04-10 10:52:52 +00:00
|
|
|
|
script:
|
|
|
|
|
- yum --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm
|
|
|
|
|
- tshark --version
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'CentOS 7 RPM Package' ]
|
2020-11-17 01:22:37 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
CentOS 8 RPM Package:
|
2020-12-21 16:19:29 +00:00
|
|
|
|
extends: .build-rpm
|
2021-10-01 19:30:19 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/centos-8-dev
|
2020-10-31 11:14:18 +00:00
|
|
|
|
script:
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2020-10-31 11:14:18 +00:00
|
|
|
|
- cmake -GNinja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2020-10-31 11:14:18 +00:00
|
|
|
|
- ninja-build rpm-package
|
2021-05-07 19:03:00 +00:00
|
|
|
|
CentOS 8 RPM Test:
|
2021-05-03 20:22:51 +00:00
|
|
|
|
extends: .test-rpm
|
2021-10-01 19:30:19 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/centos-8-dev
|
2020-10-31 11:14:18 +00:00
|
|
|
|
script:
|
|
|
|
|
- dnf --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm
|
|
|
|
|
- tshark --version
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'CentOS 8 RPM Package' ]
|
2020-11-17 01:22:37 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
openSUSE 15.2 RPM Package:
|
2020-12-21 16:19:29 +00:00
|
|
|
|
extends: .build-rpm
|
2021-10-01 20:29:15 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.2-dev
|
2020-10-31 11:14:18 +00:00
|
|
|
|
script:
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2020-10-31 11:14:18 +00:00
|
|
|
|
- cmake -GNinja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2020-10-31 11:14:18 +00:00
|
|
|
|
- ninja rpm-package
|
2021-05-07 19:03:00 +00:00
|
|
|
|
openSUSE 15.2 RPM Test:
|
2021-05-03 20:22:51 +00:00
|
|
|
|
extends: .test-rpm
|
2021-10-01 20:29:15 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.2-dev
|
2020-10-31 11:14:18 +00:00
|
|
|
|
script:
|
2021-09-23 23:39:40 +00:00
|
|
|
|
- zypper --no-gpg-checks --no-remote install -y build/packaging/rpm/RPMS/x86_64/*.rpm
|
2020-10-31 11:14:18 +00:00
|
|
|
|
- tshark --version
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'openSUSE 15.2 RPM Package' ]
|
2020-11-16 23:14:27 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Fedora RPM Package:
|
2020-12-21 16:19:29 +00:00
|
|
|
|
extends: .build-rpm
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/fedora-dev
|
2018-06-17 21:01:01 +00:00
|
|
|
|
script:
|
2021-02-15 05:07:53 +00:00
|
|
|
|
# Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
|
|
|
|
|
# https://gitlab.com/gitlab-com/support-forum/issues/2790
|
2021-02-16 08:33:50 +00:00
|
|
|
|
- export FORCE_CMAKE_NINJA_NON_VERBOSE=1
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2018-06-17 21:01:01 +00:00
|
|
|
|
- cmake3 -GNinja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-02-16 08:33:50 +00:00
|
|
|
|
- ninja rpm-package
|
2021-05-07 19:03:00 +00:00
|
|
|
|
# Fedora RPM Test:
|
|
|
|
|
# extends: .test-rpm
|
2021-04-28 15:52:13 +00:00
|
|
|
|
# image: fedora
|
|
|
|
|
# script:
|
|
|
|
|
# - dnf install -y build/packaging/rpm/RPMS/x86_64/*.rpm
|
|
|
|
|
# - tshark --version
|
2021-05-07 19:03:00 +00:00
|
|
|
|
# needs: [ 'Fedora RPM Package' ]
|
2019-05-10 19:25:54 +00:00
|
|
|
|
|
|
|
|
|
# Job to generate packages for Debian stable
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Debian Stable APT Package:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .build-linux
|
2021-05-02 16:39:21 +00:00
|
|
|
|
rules: !reference [.if-merged]
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
2019-05-10 19:25:54 +00:00
|
|
|
|
script:
|
2021-03-12 17:55:04 +00:00
|
|
|
|
- perl tools/make-version.pl --set-release
|
2019-05-10 19:25:54 +00:00
|
|
|
|
# Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
|
|
|
|
|
# https://gitlab.com/gitlab-com/support-forum/issues/2790
|
2021-02-15 02:48:00 +00:00
|
|
|
|
- export DH_QUIET=1
|
|
|
|
|
- export MAKEFLAGS=--silent
|
2020-09-09 20:20:46 +00:00
|
|
|
|
- dpkg-buildpackage -b --no-sign -jauto
|
2021-10-24 21:24:35 +00:00
|
|
|
|
- lintian --suppress-tags library-not-linked-against-libc,copyright-excludes-files-in-native-package --display-experimental --display-info --pedantic --profile debian
|
2019-05-10 19:25:54 +00:00
|
|
|
|
- mkdir debian-packages
|
|
|
|
|
- mv ../*.deb debian-packages/
|
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
|
|
|
|
- debian-packages/*.deb
|
|
|
|
|
expire_in: 3 days
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Debian Stable APT Test:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .test-linux
|
2021-05-02 16:39:21 +00:00
|
|
|
|
rules: !reference [.if-merged]
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
|
2020-05-31 21:34:00 +00:00
|
|
|
|
stage: test
|
|
|
|
|
script:
|
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get install ./debian-packages/*.deb -y
|
|
|
|
|
- tshark --version
|
|
|
|
|
variables:
|
|
|
|
|
GIT_STRATEGY: none
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'Debian Stable APT Package' ]
|
2020-08-18 23:00:32 +00:00
|
|
|
|
|
2021-06-15 01:32:25 +00:00
|
|
|
|
Win64 Package:
|
|
|
|
|
extends: .build-windows
|
2021-06-29 17:39:00 +00:00
|
|
|
|
rules: !reference [.if-w-w-only-merged]
|
2021-06-15 01:32:25 +00:00
|
|
|
|
tags:
|
|
|
|
|
- wireshark-win64-package
|
|
|
|
|
before_script:
|
|
|
|
|
- $env:WIRESHARK_BASE_DIR = "C:\Development"
|
|
|
|
|
- $env:Configuration = "RelWithDebInfo"
|
|
|
|
|
- $env:Path += ";C:\Program Files\CMake\bin"
|
|
|
|
|
- $env:Path += ";C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin"
|
|
|
|
|
- $env:Path += ";C:\qt\5.15.2\msvc2019_64\bin"
|
|
|
|
|
- $env:Path += ";C:\Program Files (x86)\NSIS"
|
|
|
|
|
- $env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin"
|
|
|
|
|
- $env:Path += ";C:\Program Files\Amazon\AWSCLIV2"
|
|
|
|
|
# https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell
|
|
|
|
|
- cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvars64.bat`" && set > %temp%\vcvars.txt"
|
|
|
|
|
- Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
|
|
|
|
script:
|
|
|
|
|
- perl ../tools/make-version.pl --set-release
|
|
|
|
|
- cmake -G "Visual Studio 16 2019" -A x64 -DENABLE_LTO=off ..
|
|
|
|
|
- msbuild /verbosity:minimal "/consoleloggerparameters:PerformanceSummary;NoSummary" /maxcpucount Wireshark.sln
|
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount test-programs.vcxproj
|
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount nsis_package_prep.vcxproj
|
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount wix_package_prep.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Recurse -Path run\RelWithDebInfo
|
|
|
|
|
- msbuild /verbosity:minimal nsis_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\nsis
|
|
|
|
|
- msbuild /verbosity:minimal wix_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\wix
|
2021-06-19 21:36:10 +00:00
|
|
|
|
- msbuild /verbosity:minimal portableapps_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\portableapps
|
2021-06-19 23:51:55 +00:00
|
|
|
|
- $plugins = Get-ChildItem run\RelWithDebInfo\plugins\*\*.dll ; signtool verify /v /pa /all run\RelWithDebInfo\*.exe run\RelWithDebInfo\extcap\*.exe $plugins run\RelWithDebInfo\libwireshark.dll run\RelWithDebInfo\libwiretap.dll run\RelWithDebInfo\libwsutil.dll packaging\nsis\Wireshark-win??-*.exe packaging\wix\Wireshark-win??-*.msi packaging\portableapps\WiresharkPortable??_*.paf.exe
|
2021-06-15 01:32:25 +00:00
|
|
|
|
- msbuild /verbosity:minimal pdb_zip_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\mse-scan.ps1
|
2021-08-25 21:02:28 +00:00
|
|
|
|
- $packages = Get-ChildItem "packaging\nsis\Wireshark-win??-*.exe", "packaging\wix\Wireshark-win??-*.msi", "packaging\portableapps\WiresharkPortable??_*.paf.exe", "Wireshark-pdb-win??-*.zip"
|
2021-08-27 18:58:41 +00:00
|
|
|
|
- foreach ($package in $packages) { Write-Host $package.name $package.length "bytes" }
|
2021-06-15 01:32:25 +00:00
|
|
|
|
- foreach ($package in $packages) { certutil -hashfile $package SHA256 }
|
|
|
|
|
- |
|
|
|
|
|
if ((Test-Path env:AWS_ACCESS_KEY_ID) -and (Test-Path env:AWS_SECRET_ACCESS_KEY) -and (Test-Path env:S3_DESTINATION_WIN64)) {
|
|
|
|
|
foreach ($package in $packages) {
|
|
|
|
|
aws s3 cp "$package" "$env:S3_DESTINATION_WIN64/"
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-14 17:58:16 +00:00
|
|
|
|
- ctest -C RelWithDebInfo --parallel 3 --force-new-ctest-process --output-on-failure
|
2021-06-15 01:32:25 +00:00
|
|
|
|
|
|
|
|
|
Win32 Package:
|
|
|
|
|
extends: .build-windows
|
2021-06-29 17:39:00 +00:00
|
|
|
|
rules: !reference [.if-w-w-only-merged]
|
2021-06-15 01:32:25 +00:00
|
|
|
|
tags:
|
|
|
|
|
- wireshark-win32-package
|
|
|
|
|
before_script:
|
|
|
|
|
- $env:WIRESHARK_BASE_DIR = "C:\Development"
|
|
|
|
|
- $env:Configuration = "RelWithDebInfo"
|
|
|
|
|
- $env:Path += ";C:\Program Files\CMake\bin"
|
|
|
|
|
- $env:Path += ";C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin"
|
|
|
|
|
- $env:Path += ";C:\qt\5.15.2\msvc2019\bin"
|
|
|
|
|
- $env:Path += ";C:\Program Files (x86)\NSIS"
|
|
|
|
|
- $env:Path += ";C:\Program Files (x86)\WiX Toolset v3.11\bin"
|
|
|
|
|
- $env:Path += ";C:\Program Files\Amazon\AWSCLIV2"
|
|
|
|
|
# https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell
|
|
|
|
|
- cmd.exe /c "call `"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsamd64_x86.bat`" && set > %temp%\vcvars.txt"
|
|
|
|
|
- Get-Content "$env:temp\vcvars.txt" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
|
|
|
|
|
- $env:Platform = "Win32"
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
|
|
|
|
script:
|
|
|
|
|
- perl ../tools/make-version.pl --set-release
|
|
|
|
|
- cmake -G "Visual Studio 16 2019" -A Win32 -DENABLE_LTO=off ..
|
|
|
|
|
- msbuild /verbosity:minimal "/consoleloggerparameters:PerformanceSummary;NoSummary" /maxcpucount Wireshark.sln
|
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount test-programs.vcxproj
|
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount nsis_package_prep.vcxproj
|
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount wix_package_prep.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Recurse -Path run\RelWithDebInfo
|
|
|
|
|
- msbuild /verbosity:minimal nsis_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\nsis
|
|
|
|
|
- msbuild /verbosity:minimal wix_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\wix
|
|
|
|
|
- msbuild /verbosity:minimal portableapps_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\portableapps
|
2021-06-19 23:51:55 +00:00
|
|
|
|
- $plugins = Get-ChildItem run\RelWithDebInfo\plugins\*\*.dll ; signtool verify /v /pa /all run\RelWithDebInfo\*.exe run\RelWithDebInfo\extcap\*.exe $plugins run\RelWithDebInfo\libwireshark.dll run\RelWithDebInfo\libwiretap.dll run\RelWithDebInfo\libwsutil.dll packaging\nsis\Wireshark-win??-*.exe packaging\wix\Wireshark-win??-*.msi packaging\portableapps\WiresharkPortable??_*.paf.exe
|
2021-06-15 01:32:25 +00:00
|
|
|
|
- msbuild /verbosity:minimal pdb_zip_package.vcxproj
|
|
|
|
|
- C:\gitlab-builds\bin\mse-scan.ps1
|
2021-08-25 21:02:28 +00:00
|
|
|
|
- $packages = Get-ChildItem "packaging\nsis\Wireshark-win??-*.exe", "packaging\wix\Wireshark-win??-*.msi", "packaging\portableapps\WiresharkPortable??_*.paf.exe", "Wireshark-pdb-win??-*.zip"
|
2021-08-27 18:58:41 +00:00
|
|
|
|
- foreach ($package in $packages) { Write-Host $package.name $package.length "bytes" }
|
2021-06-15 01:32:25 +00:00
|
|
|
|
- foreach ($package in $packages) { certutil -hashfile $package SHA256 }
|
|
|
|
|
- |
|
|
|
|
|
if ((Test-Path env:AWS_ACCESS_KEY_ID) -and (Test-Path env:AWS_SECRET_ACCESS_KEY) -and (Test-Path env:S3_DESTINATION_WIN32)) {
|
|
|
|
|
foreach ($package in $packages) {
|
|
|
|
|
aws s3 cp "$package" "$env:S3_DESTINATION_WIN32/"
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-07-14 17:58:16 +00:00
|
|
|
|
- ctest -C RelWithDebInfo --parallel 3 --force-new-ctest-process --output-on-failure
|
2021-06-15 01:32:25 +00:00
|
|
|
|
|
2021-07-25 15:57:55 +00:00
|
|
|
|
macOS Arm Package:
|
|
|
|
|
stage: build
|
|
|
|
|
rules: !reference [.if-w-w-only-merged]
|
2021-08-24 23:24:59 +00:00
|
|
|
|
variables:
|
|
|
|
|
CODE_SIGN_IDENTITY: "Wireshark Foundation, Inc."
|
2021-07-25 15:57:55 +00:00
|
|
|
|
tags:
|
|
|
|
|
- wireshark-macos-arm-package
|
|
|
|
|
retry: 1
|
|
|
|
|
before_script:
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
|
|
|
|
script:
|
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
|
|
|
|
# XXX - Move this to a separate DENABLE_PCAP=OFF job?
|
|
|
|
|
- arch -arch arm64 cmake -DENABLE_CCACHE=ON -DENABLE_PCAP=OFF -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DCMAKE_OSX_ARCHITECTURES=arm64 -G Ninja ..
|
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
|
|
|
|
- arch -arch arm64 ninja
|
|
|
|
|
- cd ..
|
|
|
|
|
- git clean -d --force --force -x
|
|
|
|
|
- perl tools/make-version.pl --set-release
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
|
|
|
|
- arch -arch arm64 cmake -DENABLE_CCACHE=ON -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_SYSROOT=macosx11.3 -DCMAKE_OSX_ARCHITECTURES=arm64 -DTEST_EXTRA_ARGS=--enable-release -G Ninja ..
|
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
|
|
|
|
- arch -arch arm64 ninja
|
2021-08-24 23:24:59 +00:00
|
|
|
|
- package-prep
|
2021-07-25 15:57:55 +00:00
|
|
|
|
- arch -arch arm64 ninja dmg_package
|
2021-08-24 23:24:59 +00:00
|
|
|
|
- cd run
|
|
|
|
|
- notarize-build
|
2021-08-27 22:47:40 +00:00
|
|
|
|
- stat -f "%N %z bytes" Wireshark*Arm*.dmg
|
2021-08-27 18:58:41 +00:00
|
|
|
|
- for digest in sha256 rmd160 sha1 ; do openssl $digest Wireshark*Arm*.dmg ; done
|
2021-07-25 15:57:55 +00:00
|
|
|
|
- |
|
2021-08-24 23:24:59 +00:00
|
|
|
|
if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_MACOS_ARM64" ] ; then
|
2021-08-25 22:15:23 +00:00
|
|
|
|
aws s3 cp Wireshark*Arm*.dmg "$S3_DESTINATION_MACOS_ARM64/"
|
2021-07-25 15:57:55 +00:00
|
|
|
|
fi
|
2021-08-24 23:24:59 +00:00
|
|
|
|
- cd ..
|
2021-07-25 15:57:55 +00:00
|
|
|
|
- arch -arch arm64 ninja test-programs
|
|
|
|
|
- arch -arch arm64 ctest --parallel 4 --output-on-failure
|
2021-08-24 23:24:59 +00:00
|
|
|
|
needs: []
|
2021-07-25 15:57:55 +00:00
|
|
|
|
|
2021-10-09 16:00:24 +00:00
|
|
|
|
macOS Intel Package:
|
|
|
|
|
stage: build
|
|
|
|
|
rules: !reference [.if-w-w-only-merged]
|
|
|
|
|
variables:
|
|
|
|
|
CODE_SIGN_IDENTITY: "Wireshark Foundation, Inc."
|
|
|
|
|
tags:
|
|
|
|
|
- wireshark-macos-intel-package
|
|
|
|
|
retry: 1
|
|
|
|
|
script:
|
2021-11-15 23:29:55 +00:00
|
|
|
|
- export CMAKE_PREFIX_PATH=/usr/local/Qt-5.15.3/lib/cmake
|
2021-10-09 16:00:24 +00:00
|
|
|
|
- export PATH="$PATH:$HOME/bin"
|
|
|
|
|
- perl tools/make-version.pl --set-release
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2021-11-15 23:59:51 +00:00
|
|
|
|
- cmake -DENABLE_CCACHE=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DCMAKE_OSX_SYSROOT=macosx10.15 -DTEST_EXTRA_ARGS=--enable-release -G Ninja ..
|
2021-10-09 16:00:24 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
|
|
|
|
- ninja
|
|
|
|
|
- package-prep
|
|
|
|
|
- ninja dmg_package
|
|
|
|
|
- cd run
|
|
|
|
|
- notarize-build
|
|
|
|
|
- stat -f "%N %z bytes" Wireshark*Intel*.dmg
|
|
|
|
|
- for digest in sha256 rmd160 sha1 ; do openssl $digest Wireshark*Intel*.dmg ; done
|
|
|
|
|
- |
|
|
|
|
|
if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_MACOS_INTEL64" ] ; then
|
|
|
|
|
aws s3 cp Wireshark*Intel*.dmg "$S3_DESTINATION_MACOS_INTEL64/"
|
|
|
|
|
fi
|
|
|
|
|
- cd ..
|
|
|
|
|
- ninja test-programs
|
|
|
|
|
- ctest --parallel 4 --output-on-failure
|
|
|
|
|
needs: []
|
|
|
|
|
|
2021-05-04 18:47:33 +00:00
|
|
|
|
# Build the User's Guide and Developer's Guide
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Documentation:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .build-linux
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
|
2020-09-03 15:40:05 +00:00
|
|
|
|
rules:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
|
|
|
|
|
changes:
|
|
|
|
|
- "docbook/**"
|
|
|
|
|
- "epan/wslua/**"
|
|
|
|
|
when: always
|
2021-05-04 18:47:33 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "push"'
|
2021-05-07 21:40:20 +00:00
|
|
|
|
changes:
|
|
|
|
|
- "docbook/**"
|
|
|
|
|
- "epan/wslua/**"
|
2021-05-02 16:39:21 +00:00
|
|
|
|
when: manual
|
2020-09-03 15:40:05 +00:00
|
|
|
|
script:
|
2021-05-04 18:47:33 +00:00
|
|
|
|
# XXX We might want to move this to wireshark-ubuntu-dev or debian-setup.sh.
|
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get update
|
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get --yes install ruby-coderay ruby-asciidoctor-pdf
|
2021-07-28 17:23:50 +00:00
|
|
|
|
- NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install asciidoctor-epub3
|
2020-09-03 15:40:05 +00:00
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2020-09-03 15:40:05 +00:00
|
|
|
|
- cmake -GNinja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2020-09-03 15:40:05 +00:00
|
|
|
|
- ninja all_guides
|
2021-05-04 18:47:33 +00:00
|
|
|
|
- cd docbook
|
|
|
|
|
- for HTML_DIR in wsug_html wsug_html_chunked wsdg_html wsdg_html_chunked ; do zip -9 -r "$HTML_DIR.zip" "$HTML_DIR" ; done
|
2020-09-03 15:40:05 +00:00
|
|
|
|
after_script:
|
2021-05-04 18:47:33 +00:00
|
|
|
|
- mv -v build/docbook/ws[ud]g_html{,_chunked}.zip .
|
2021-08-03 20:42:20 +00:00
|
|
|
|
- mv -v build/docbook/Wireshark*Guide.{epub,pdf} .
|
2021-05-04 20:11:23 +00:00
|
|
|
|
- |
|
|
|
|
|
if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_DOCS" ] ; then
|
2021-08-03 20:42:20 +00:00
|
|
|
|
for DOC_FILE in ws[ud]g_html{,_chunked}.zip Wireshark*Guide.{epub,pdf} ; do
|
2021-05-04 20:11:23 +00:00
|
|
|
|
aws s3 cp "$DOC_FILE" "$S3_DESTINATION_DOCS/"
|
|
|
|
|
done
|
|
|
|
|
fi
|
2020-09-03 15:40:05 +00:00
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
2021-05-04 18:47:33 +00:00
|
|
|
|
- wsug_html.zip
|
|
|
|
|
- wsug_html_chunked.zip
|
|
|
|
|
- wsdg_html.zip
|
|
|
|
|
- wsdg_html_chunked.zip
|
2021-08-26 22:44:23 +00:00
|
|
|
|
- "Wireshark User's Guide.pdf"
|
|
|
|
|
- "Wireshark Developer's Guide.pdf"
|
|
|
|
|
- "Wireshark User's Guide.epub"
|
|
|
|
|
- "Wireshark Developer's Guide.epub"
|
2020-12-24 13:11:51 +00:00
|
|
|
|
needs: []
|
2020-09-03 15:40:05 +00:00
|
|
|
|
|
2020-10-18 03:40:28 +00:00
|
|
|
|
|
2020-08-18 23:00:32 +00:00
|
|
|
|
# https://docs.gitlab.com/ee/user/gitlab_com/index.html#linux-shared-runners
|
2020-09-15 23:55:41 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Commit Check:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
extends: .build-ubuntu
|
|
|
|
|
rules: !reference [.if-merge-request]
|
2020-08-18 23:00:32 +00:00
|
|
|
|
script:
|
|
|
|
|
# build-ubuntu puts us in `build`.
|
|
|
|
|
- cd ..
|
|
|
|
|
- bash ./tools/pre-commit 'HEAD^1'
|
2020-09-15 23:55:41 +00:00
|
|
|
|
- tools/validate-commit.py
|
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Ubuntu .dpkg:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
extends: .build-ubuntu
|
|
|
|
|
rules: !reference [.if-merge-request]
|
2020-09-15 23:55:41 +00:00
|
|
|
|
script:
|
|
|
|
|
# build-ubuntu puts us in `build`.
|
|
|
|
|
- cd ..
|
2020-12-10 23:42:48 +00:00
|
|
|
|
- CC=/usr/lib/ccache/gcc CXX=/usr/lib/ccache/g++ MAKE=ninja dpkg-buildpackage -us -uc -rfakeroot -jauto -Zgzip -zfast
|
2020-12-13 23:43:59 +00:00
|
|
|
|
after_script:
|
|
|
|
|
# dpkg-buildpackage builds in obj-<triplet>, so we need to override
|
2020-12-10 23:42:48 +00:00
|
|
|
|
# .build-ubuntu. We also build more stuff, so decrease our multiplier.
|
|
|
|
|
- ccache --max-size $( du --summarize --block-size=1M --total "$CI_PROJECT_DIR"/obj-* | awk '/total$/ {printf ("%dM", $1 * 1.25)}' )
|
2020-08-18 23:00:32 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
GCC Warnings:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
extends: .build-ubuntu
|
|
|
|
|
rules: !reference [.if-merge-request]
|
2020-08-18 23:00:32 +00:00
|
|
|
|
script:
|
|
|
|
|
# build-ubuntu puts us in `build`.
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2020-09-01 21:41:02 +00:00
|
|
|
|
- CC=gcc CXX=g++ cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DENABLE_CCACHE=ON -G Ninja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-04-12 19:13:02 +00:00
|
|
|
|
- script --command ninja --flush --quiet --return ../gcc_report.txt
|
|
|
|
|
- ansi2html < ../gcc_report.txt > ../gcc_report.html
|
2020-08-18 23:00:32 +00:00
|
|
|
|
- ninja test-programs
|
|
|
|
|
- chown -R user .
|
2021-07-14 17:58:16 +00:00
|
|
|
|
- su user -c "ctest --parallel $(getconf _NPROCESSORS_ONLN) --force-new-ctest-process --output-on-failure"
|
2021-04-12 19:13:02 +00:00
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
|
|
|
|
- gcc_report.html
|
2020-08-18 23:00:32 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Code Checks + Clang Warnings:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
extends: .build-ubuntu
|
|
|
|
|
rules: !reference [.if-merge-request]
|
2021-04-30 17:49:11 +00:00
|
|
|
|
variables:
|
2021-04-30 21:06:21 +00:00
|
|
|
|
CC: "clang-$CLANG_VERSION"
|
|
|
|
|
CXX: "clang++-$CLANG_VERSION"
|
2020-08-18 23:00:32 +00:00
|
|
|
|
script:
|
|
|
|
|
# build-ubuntu puts us in `build`.
|
|
|
|
|
- cd ..
|
|
|
|
|
- python3 tools/checklicenses.py
|
2021-09-03 19:26:11 +00:00
|
|
|
|
- mkdir cppcheck
|
|
|
|
|
- ./tools/cppcheck/cppcheck.sh -l 1 | tee cppcheck/cppcheck_report.txt
|
|
|
|
|
- if [[ -s "cppcheck/cppcheck_report.txt" ]]; then ./tools/cppcheck/cppcheck.sh -l 1 -x > cppcheck/cppcheck_report.xml ; fi
|
|
|
|
|
- if [[ -s "cppcheck/cppcheck_report.txt" ]]; then cppcheck-htmlreport --file cppcheck/cppcheck_report.xml --report-dir cppcheck ; fi
|
2020-12-20 20:04:00 +00:00
|
|
|
|
- ./tools/check_typed_item_calls.py --commits 1 | tee item_calls_check.txt
|
|
|
|
|
- ./tools/check_tfs.py --commits 1 | tee tfs_check.txt
|
2020-08-18 23:00:32 +00:00
|
|
|
|
- cd build
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2020-09-01 21:41:02 +00:00
|
|
|
|
- cmake -DENABLE_EXTRA_COMPILER_WARNINGS=on -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DENABLE_CCACHE=ON -G Ninja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-09-15 13:58:33 +00:00
|
|
|
|
- mkdir ../html
|
|
|
|
|
- script --command ninja --flush --quiet --return ../tmp_clang_report.txt
|
|
|
|
|
- ansi2txt < ../tmp_clang_report.txt > ../clang_report.txt
|
|
|
|
|
- ansi2html < ../tmp_clang_report.txt > ../html/clang_report.html
|
2021-09-02 21:05:17 +00:00
|
|
|
|
- ./run/tshark -v 2> >(tee ../checkhf_conflict.txt)
|
2021-09-13 18:53:50 +00:00
|
|
|
|
- ../tools/validate-clang-check.sh -c $CLANG_VERSION 2> >(tee ../tmp_clang_analyzer_check.txt)
|
|
|
|
|
- ansi2txt < ../tmp_clang_analyzer_check.txt > ../clang_analyzer_check.txt
|
2021-09-15 13:58:33 +00:00
|
|
|
|
- ansi2html < ../tmp_clang_analyzer_check.txt > ../html/clang_analyzer_check.html
|
2021-09-23 23:39:40 +00:00
|
|
|
|
- ninja checkAPI
|
2020-08-24 18:47:20 +00:00
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
2021-09-15 13:58:33 +00:00
|
|
|
|
- clang_report.txt
|
2021-09-01 07:01:52 +00:00
|
|
|
|
- clang_analyzer_check.txt
|
2021-09-03 19:26:11 +00:00
|
|
|
|
- cppcheck
|
2020-12-20 20:04:00 +00:00
|
|
|
|
- item_calls_check.txt
|
|
|
|
|
- tfs_check.txt
|
2021-09-02 21:05:17 +00:00
|
|
|
|
- checkhf_conflict.txt
|
2021-09-15 13:58:33 +00:00
|
|
|
|
- html/
|
2020-08-18 23:00:32 +00:00
|
|
|
|
|
2021-04-05 18:35:23 +00:00
|
|
|
|
# Windows runners are still beta, at least technically:
|
2020-08-18 23:00:32 +00:00
|
|
|
|
# https://docs.gitlab.com/ee/user/gitlab_com/index.html#windows-shared-runners-beta
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Windows Build:
|
2021-05-02 16:39:21 +00:00
|
|
|
|
extends: .build-windows
|
2021-06-29 17:39:00 +00:00
|
|
|
|
rules: !reference [.if-w-w-only-merge-request]
|
2020-08-18 23:00:32 +00:00
|
|
|
|
tags:
|
2021-04-04 20:28:16 +00:00
|
|
|
|
- wireshark-windows-merge-req
|
2020-08-18 23:00:32 +00:00
|
|
|
|
script:
|
2020-12-12 23:29:05 +00:00
|
|
|
|
- cmake -G "Visual Studio 16 2019" -A x64 -DENABLE_LTO=off ..
|
2021-07-13 23:02:39 +00:00
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount Wireshark.sln
|
2021-06-15 01:32:25 +00:00
|
|
|
|
- msbuild /verbosity:minimal /maxcpucount test-programs.vcxproj
|
2021-07-14 17:58:16 +00:00
|
|
|
|
- ctest -C RelWithDebInfo --parallel 3 --force-new-ctest-process --output-on-failure
|
2021-04-29 19:10:51 +00:00
|
|
|
|
|
|
|
|
|
# Adapted from https://www.synopsys.com/blogs/software-security/integrating-coverity-scan-with-gitlab-ci/
|
|
|
|
|
# and https://gitlab.gnome.org/GNOME/glib/-/blob/8f57a5b9/.gitlab-ci.yml#L481
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Coverity GCC Scan:
|
2021-10-01 22:27:11 +00:00
|
|
|
|
image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
|
2021-05-01 01:13:01 +00:00
|
|
|
|
rules:
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-gcc"'
|
|
|
|
|
when: always
|
2021-04-29 19:10:51 +00:00
|
|
|
|
stage: analysis
|
|
|
|
|
needs: []
|
|
|
|
|
variables:
|
|
|
|
|
CC: gcc
|
|
|
|
|
CXX: g++
|
|
|
|
|
# cov-build doesn’t handle GLIB_DEPRECATED_ENUMERATOR
|
|
|
|
|
CFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
|
|
|
|
|
CXXFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
|
|
|
|
|
script:
|
2021-04-30 00:36:52 +00:00
|
|
|
|
- curl --output /tmp/cov-analysis-linux64.tar.gz --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN https://scan.coverity.com/download/linux64
|
2021-04-29 19:10:51 +00:00
|
|
|
|
- tar --directory=/tmp --extract --gzip --file /tmp/cov-analysis-linux64.tar.gz
|
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
|
|
|
|
- cmake -G Ninja ..
|
2021-05-03 01:32:12 +00:00
|
|
|
|
- /tmp/cov-analysis-linux64-*/bin/cov-build --return-emit-failures --dir ../cov-int ninja
|
|
|
|
|
- cd ..
|
2021-04-29 19:10:51 +00:00
|
|
|
|
- tar --create --gzip --file cov-int.tar.gz cov-int
|
2021-05-03 15:38:16 +00:00
|
|
|
|
- echo "export ARTIFACT_JOB_URL=$CI_JOB_URL" > job_environment_variables.sh
|
|
|
|
|
- echo "export GIT_DESCRIPTION=$( git describe --tags )" >> job_environment_variables.sh
|
2021-04-30 19:18:23 +00:00
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
2021-05-03 01:32:12 +00:00
|
|
|
|
- cov-int.tar.gz
|
2021-05-03 15:38:16 +00:00
|
|
|
|
- job_environment_variables.sh
|
2021-08-03 04:27:57 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Coverity GCC Submit:
|
2021-05-03 01:32:12 +00:00
|
|
|
|
image: curlimages/curl
|
|
|
|
|
rules:
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-gcc"'
|
|
|
|
|
when: always
|
|
|
|
|
stage: .post
|
|
|
|
|
script:
|
2021-05-03 15:38:16 +00:00
|
|
|
|
- . job_environment_variables.sh
|
|
|
|
|
- echo $ARTIFACT_JOB_URL
|
|
|
|
|
- echo $GIT_DESCRIPTION
|
2021-05-03 16:46:18 +00:00
|
|
|
|
- curl --fail --data "project=$COVERITY_SCAN_PROJECT_NAME&token=$COVERITY_SCAN_TOKEN&email=$GITLAB_USER_EMAIL&url=$ARTIFACT_JOB_URL/artifacts/raw/cov-int.tar.gz&version=$GIT_DESCRIPTION&description=Ubuntu $GIT_DESCRIPTION $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID" https://scan.coverity.com/builds
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'Coverity GCC Scan' ]
|
2021-04-29 20:55:35 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Coverity Visual C++ Scan:
|
2021-04-29 20:55:35 +00:00
|
|
|
|
extends: .build-windows
|
2021-05-01 01:13:01 +00:00
|
|
|
|
rules:
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-visual-c++"'
|
|
|
|
|
when: always
|
2021-04-29 20:55:35 +00:00
|
|
|
|
tags:
|
|
|
|
|
- wireshark-windows-merge-req
|
|
|
|
|
stage: analysis
|
|
|
|
|
needs: []
|
|
|
|
|
script:
|
|
|
|
|
- $gitDescription = (( git describe --tags ) | Out-String).Trim()
|
2021-04-30 01:50:51 +00:00
|
|
|
|
- C:\Windows\System32\curl --output $env:temp\cov-analysis-win64.zip --form project=$COVERITY_SCAN_PROJECT_NAME --form token=$COVERITY_SCAN_TOKEN https://scan.coverity.com/download/win64
|
2021-04-29 20:55:35 +00:00
|
|
|
|
- C:\ProgramData\chocolatey\tools\7z x "$env:temp\cov-analysis-win64.zip" -y -r -o"$env:temp"
|
|
|
|
|
- cmake -DTEST_EXTRA_ARGS=--enable-release -DENABLE_LTO=off -G "Visual Studio 16 2019" -A x64 ..
|
|
|
|
|
- $covAnalysisWin64 = (Get-ChildItem -Path $env:temp -Filter "cov-analysis-win64-*" -Directory)[0].FullName
|
2021-05-03 01:32:12 +00:00
|
|
|
|
- Invoke-Expression "& $covAnalysisWin64\bin\cov-build.exe --return-emit-failures --dir ..\cov-int msbuild /verbosity:minimal `"/consoleloggerparameters:PerformanceSummary;NoSummary`" /maxcpucount:1 Wireshark.sln"
|
|
|
|
|
- cd ..
|
2021-04-29 20:55:35 +00:00
|
|
|
|
- C:\ProgramData\chocolatey\tools\7z a -tzip cov-int.zip cov-int
|
2021-05-03 15:38:16 +00:00
|
|
|
|
- '"export ARTIFACT_JOB_URL=$env:CI_JOB_URL" | Out-File -Encoding ascii job_environment_variables.sh'
|
|
|
|
|
- '"export GIT_DESCRIPTION=$gitDescription" | Out-File -Encoding ascii -Append job_environment_variables.sh'
|
2021-04-30 19:18:23 +00:00
|
|
|
|
artifacts:
|
|
|
|
|
paths:
|
2021-05-03 03:28:50 +00:00
|
|
|
|
- cov-int.zip
|
2021-05-03 15:38:16 +00:00
|
|
|
|
- job_environment_variables.sh
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Coverity Visual C++ Submit:
|
2021-05-03 01:32:12 +00:00
|
|
|
|
image: curlimages/curl
|
|
|
|
|
rules:
|
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-visual-c++"'
|
|
|
|
|
when: always
|
|
|
|
|
stage: .post
|
|
|
|
|
script:
|
2021-05-03 15:38:16 +00:00
|
|
|
|
- sed -i -e 's/\r//' job_environment_variables.sh
|
|
|
|
|
- . job_environment_variables.sh
|
|
|
|
|
- echo $ARTIFACT_JOB_URL
|
|
|
|
|
- echo $GIT_DESCRIPTION
|
2021-05-03 16:46:18 +00:00
|
|
|
|
- curl --fail --data "project=$COVERITY_SCAN_PROJECT_NAME&token=$COVERITY_SCAN_TOKEN&email=$GITLAB_USER_EMAIL&url=$ARTIFACT_JOB_URL/artifacts/raw/cov-int.zip&version=$GIT_DESCRIPTION&description=Windows $GIT_DESCRIPTION $CI_COMMIT_REF_NAME:$CI_PIPELINE_ID" https://scan.coverity.com/builds
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'Coverity Visual C++ Scan' ]
|
2021-04-30 00:33:48 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Clang Static Analyzer:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .build-ubuntu
|
2021-05-02 16:39:21 +00:00
|
|
|
|
rules: !reference [.if-daily-schedule]
|
2021-04-30 00:33:48 +00:00
|
|
|
|
stage: analysis
|
|
|
|
|
needs: []
|
|
|
|
|
variables:
|
|
|
|
|
CC: "clang-${CLANG_VERSION}"
|
|
|
|
|
CXX: "clang++-${CLANG_VERSION}"
|
|
|
|
|
script:
|
|
|
|
|
- scan-build-${CLANG_VERSION} cmake -DCMAKE_BUILD_TYPE=Debug -DDISABLE_WERROR=ON -G Ninja ..
|
|
|
|
|
- scan-build-${CLANG_VERSION} -o ../sbout ninja
|
|
|
|
|
- cd ../sbout
|
|
|
|
|
- RAW_DIR=$( find ../sbout -type d -name "20??-??-??-*" -printf "%P\n" | head )
|
|
|
|
|
- SB_DIR="scan-build-$RAW_DIR"
|
|
|
|
|
- mv "$RAW_DIR" "$SB_DIR"
|
|
|
|
|
- if [ -d logs ] ; then mv logs $SB_DIR ; fi
|
|
|
|
|
- chmod -R u=rwX,go=rX "$SB_DIR"
|
|
|
|
|
- zip -9 -r "${SB_DIR}.zip" "$SB_DIR"
|
|
|
|
|
- if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_ANALYSIS" ] ; then aws s3 cp "${SB_DIR}.zip" "$S3_DESTINATION_ANALYSIS/" ; fi
|
2021-04-30 15:56:29 +00:00
|
|
|
|
|
|
|
|
|
# Windows runners are still beta, at least technically:
|
|
|
|
|
# https://docs.gitlab.com/ee/user/gitlab_com/index.html#windows-shared-runners-beta
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Visual Studio Code Analysis:
|
2021-04-30 15:56:29 +00:00
|
|
|
|
extends: .build-windows
|
|
|
|
|
tags:
|
|
|
|
|
- wireshark-windows-dev
|
|
|
|
|
rules:
|
|
|
|
|
# The wireshark-windows-* tags are only available in wireshark/wireshark.
|
2021-05-01 01:13:01 +00:00
|
|
|
|
- if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "daily" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
|
2021-04-30 15:56:29 +00:00
|
|
|
|
when: always
|
|
|
|
|
script:
|
|
|
|
|
- $env:caexcludepath = "C:\Qt;$env:INCLUDE"
|
|
|
|
|
- cmake -DENABLE_CODE_ANALYSIS=ON -G "Visual Studio 16 2019" -A x64 -DENABLE_LTO=off ..
|
|
|
|
|
- msbuild /verbosity:minimal "/consoleloggerparameters:PerformanceSummary;NoSummary" /maxcpucount:2 Wireshark.sln
|
2021-04-30 17:11:29 +00:00
|
|
|
|
|
2021-05-03 17:34:31 +00:00
|
|
|
|
# Build all doxygen docs
|
2021-05-07 19:03:00 +00:00
|
|
|
|
API Reference:
|
2021-08-03 04:27:57 +00:00
|
|
|
|
extends: .build-ubuntu
|
2021-05-03 17:34:31 +00:00
|
|
|
|
rules: !reference [.if-daily-schedule]
|
|
|
|
|
script:
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2021-05-03 17:34:31 +00:00
|
|
|
|
- cmake -GNinja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-05-03 17:34:31 +00:00
|
|
|
|
- ninja wsar_html_zip 2>&1 > doxygen_output.txt | tee doxygen_errors.txt
|
|
|
|
|
after_script:
|
2021-05-04 21:06:57 +00:00
|
|
|
|
- mv build/wsar_html.zip .
|
2021-05-03 17:34:31 +00:00
|
|
|
|
- mv build/doxygen_output.txt .
|
|
|
|
|
- mv build/doxygen_errors.txt .
|
2021-05-04 21:06:57 +00:00
|
|
|
|
- |
|
|
|
|
|
if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_DOCS" ] ; then
|
|
|
|
|
aws s3 cp wsar_html.zip "$S3_DESTINATION_DOCS/"
|
|
|
|
|
fi
|
2021-05-03 17:34:31 +00:00
|
|
|
|
artifacts:
|
|
|
|
|
when: always
|
|
|
|
|
paths:
|
|
|
|
|
- doxygen_errors.txt
|
|
|
|
|
- doxygen_output.txt
|
|
|
|
|
- wsar_html.zip
|
|
|
|
|
needs: []
|
|
|
|
|
|
2021-06-07 18:05:44 +00:00
|
|
|
|
Code Lines:
|
2021-05-01 01:13:01 +00:00
|
|
|
|
extends: .build-ubuntu
|
2021-05-02 16:39:21 +00:00
|
|
|
|
rules: !reference [.if-daily-schedule]
|
2021-04-30 17:11:29 +00:00
|
|
|
|
stage: analysis
|
|
|
|
|
variables:
|
2021-06-07 18:05:44 +00:00
|
|
|
|
CLOC_OUT: /tmp/cloc.txt
|
|
|
|
|
SCC_OUT: /tmp/scc.txt
|
|
|
|
|
SLOC_OUT: /tmp/sloccount.txt
|
|
|
|
|
TOKEI_OUT: /tmp/tokei.txt
|
2021-06-07 18:40:19 +00:00
|
|
|
|
script:
|
2021-06-07 18:05:44 +00:00
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get update
|
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get --yes install sloccount cloc curl unzip
|
2021-06-07 18:40:19 +00:00
|
|
|
|
- pushd /tmp
|
2021-06-07 18:05:44 +00:00
|
|
|
|
- curl -L -O https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip
|
|
|
|
|
- unzip scc-3.0.0-x86_64-unknown-linux.zip
|
|
|
|
|
- curl -L -O https://github.com/XAMPPRocky/tokei/releases/download/v12.1.2/tokei-x86_64-unknown-linux-gnu.tar.gz
|
|
|
|
|
- tar -xf tokei-x86_64-unknown-linux-gnu.tar.gz
|
2021-06-07 18:40:19 +00:00
|
|
|
|
- popd
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
2021-04-30 17:11:29 +00:00
|
|
|
|
- cmake -G Ninja ..
|
2021-05-28 18:11:06 +00:00
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-04-30 17:11:29 +00:00
|
|
|
|
- ninja
|
|
|
|
|
- cd ..
|
2021-06-07 18:05:44 +00:00
|
|
|
|
- echo -n "cloc version:\ "
|
|
|
|
|
- cloc --version
|
|
|
|
|
- cloc --quiet . | tee $CLOC_OUT
|
|
|
|
|
- /tmp/scc --version
|
|
|
|
|
- /tmp/scc --not-match 'qt/.*.ts' . | tee $SCC_OUT
|
2021-04-30 17:11:29 +00:00
|
|
|
|
- echo -n "SLOCCount version:\ "
|
|
|
|
|
- sloccount --version
|
2021-06-07 18:05:44 +00:00
|
|
|
|
- sloccount . | awk "/^Computing results/ { results=1 } { if (results) print }" | tee $SLOC_OUT
|
|
|
|
|
- /tmp/tokei --version
|
|
|
|
|
- /tmp/tokei --exclude 'qt/*.ts' . | tee $TOKEI_OUT
|
|
|
|
|
- |
|
|
|
|
|
if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_ANALYSIS" ] ; then
|
|
|
|
|
aws s3 cp "$CLOC_OUT" "$S3_DESTINATION_ANALYSIS/"
|
|
|
|
|
aws s3 cp "$SCC_OUT" "$S3_DESTINATION_ANALYSIS/"
|
|
|
|
|
aws s3 cp "$SLOC_OUT" "$S3_DESTINATION_ANALYSIS/"
|
|
|
|
|
aws s3 cp "$TOKEI_OUT" "$S3_DESTINATION_ANALYSIS/"
|
|
|
|
|
fi
|
2021-05-04 19:22:32 +00:00
|
|
|
|
|
2021-05-06 01:38:13 +00:00
|
|
|
|
# Fuzz TShark using ASAN and valgrind.
|
|
|
|
|
.fuzz-ubuntu:
|
2021-05-04 19:22:32 +00:00
|
|
|
|
extends: .build-ubuntu
|
|
|
|
|
rules: !reference [.if-fuzz-schedule]
|
2021-05-05 22:44:14 +00:00
|
|
|
|
tags:
|
|
|
|
|
- wireshark-ubuntu-fuzz
|
2021-05-04 19:22:32 +00:00
|
|
|
|
resource_group: fuzz-master
|
|
|
|
|
variables:
|
2021-05-06 01:38:13 +00:00
|
|
|
|
CC: "clang-$CLANG_VERSION"
|
|
|
|
|
CXX: "clang++-$CLANG_VERSION"
|
|
|
|
|
INSTALL_PREFIX: "$CI_PROJECT_DIR/_install"
|
2021-05-04 19:22:32 +00:00
|
|
|
|
MIN_PLUGINS: 10
|
2021-05-06 01:38:13 +00:00
|
|
|
|
MAX_PASSES: 15
|
|
|
|
|
before_script:
|
2021-10-28 18:20:25 +00:00
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get update
|
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get --yes install llvm-$CLANG_VERSION
|
2021-05-06 16:24:35 +00:00
|
|
|
|
- mkdir -p ccache
|
2021-05-06 01:38:13 +00:00
|
|
|
|
# Signal after_script, which runs in its own shell.
|
|
|
|
|
- echo "export FUZZ_PASSED=true" > /tmp/fuzz_result.sh
|
2021-05-04 19:22:32 +00:00
|
|
|
|
- mkdir /tmp/fuzz
|
2021-05-06 16:24:35 +00:00
|
|
|
|
- mkdir build
|
|
|
|
|
- cd build
|
2021-05-06 01:38:13 +00:00
|
|
|
|
after_script:
|
|
|
|
|
- . /tmp/fuzz_result.sh
|
2021-05-04 19:22:32 +00:00
|
|
|
|
- if $FUZZ_PASSED ; then exit 0 ; fi
|
2021-05-05 22:44:14 +00:00
|
|
|
|
- echo Fuzzing failed. Generating report.
|
|
|
|
|
- FUZZ_CAPTURE=$( ls /tmp/fuzz/fuzz-*.pcap | head -n 1 )
|
|
|
|
|
- FUZZ_ERRORS="/tmp/fuzz/$( basename "$FUZZ_CAPTURE" .pcap ).err"
|
2021-05-06 01:38:13 +00:00
|
|
|
|
- printf "\nfuzz-test.sh stderr:\n" >> "$FUZZ_ERRORS"
|
2021-05-05 22:44:14 +00:00
|
|
|
|
- cat fuzz-test.err >> "$FUZZ_ERRORS"
|
|
|
|
|
- |
|
|
|
|
|
if [ -n "$AWS_ACCESS_KEY_ID" ] && [ -n "$AWS_SECRET_ACCESS_KEY" ] && [ -n "$S3_DESTINATION_FUZZ" ] ; then
|
|
|
|
|
aws s3 cp "$FUZZ_CAPTURE" "$S3_DESTINATION_FUZZ/"
|
|
|
|
|
aws s3 cp "$FUZZ_ERRORS" "$S3_DESTINATION_FUZZ/"
|
|
|
|
|
fi
|
2021-05-06 16:24:35 +00:00
|
|
|
|
# The cache should be large enough to be useful but it shouldn't take
|
|
|
|
|
# too long to restore+save each run.
|
|
|
|
|
- ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
|
2021-05-06 01:38:13 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
ASan Menagerie Fuzz:
|
2021-05-06 01:38:13 +00:00
|
|
|
|
extends: .fuzz-ubuntu
|
|
|
|
|
stage: fuzz-asan
|
|
|
|
|
script:
|
2021-05-07 16:21:30 +00:00
|
|
|
|
- MAX_SECONDS=$(( 4 * 60 * 60 ))
|
2021-05-24 20:45:31 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
|
|
|
|
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON ..
|
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-05-06 01:38:13 +00:00
|
|
|
|
- ninja
|
|
|
|
|
- ninja install
|
|
|
|
|
- cd ..
|
|
|
|
|
# /var/menagerie contains captures harvested from wireshark.org's mailing list, wiki, issues, etc.
|
|
|
|
|
# We have more captures than we can fuzz in $MAX_SECONDS, so we shuffle them each run.
|
|
|
|
|
- ./tools/fuzz-test.sh -a -2 -P $MIN_PLUGINS -b $INSTALL_PREFIX/bin -d /tmp/fuzz -t $MAX_SECONDS $( shuf -e /var/menagerie/*/* ) 2> fuzz-test.err || echo "export FUZZ_PASSED=false" > /tmp/fuzz_result.sh
|
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
ASan randpkt Fuzz:
|
2021-05-06 01:38:13 +00:00
|
|
|
|
extends: .fuzz-ubuntu
|
|
|
|
|
stage: fuzz-randpkt
|
|
|
|
|
script:
|
|
|
|
|
# XXX Reuse fuzz-asan?
|
2021-05-24 20:45:31 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
|
|
|
|
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON ..
|
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-05-06 01:38:13 +00:00
|
|
|
|
- ninja
|
|
|
|
|
- ninja install
|
|
|
|
|
- cd ..
|
|
|
|
|
- ./tools/randpkt-test.sh -a -b $INSTALL_PREFIX/bin -d /tmp/fuzz -p $MAX_PASSES 2> fuzz-test.err || echo "export FUZZ_PASSED=false" > /tmp/fuzz_result.sh
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'ASan Menagerie Fuzz' ]
|
2021-05-06 01:38:13 +00:00
|
|
|
|
|
2021-05-07 19:03:00 +00:00
|
|
|
|
Valgrind Menagerie Fuzz:
|
2021-05-06 01:38:13 +00:00
|
|
|
|
extends: .fuzz-ubuntu
|
|
|
|
|
stage: fuzz-valgrind
|
|
|
|
|
script:
|
2021-05-06 21:49:31 +00:00
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get update
|
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get --yes install valgrind
|
2021-05-07 16:21:30 +00:00
|
|
|
|
- MAX_SECONDS=$(( 3 * 60 * 60 ))
|
2021-05-24 20:45:31 +00:00
|
|
|
|
- printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
|
|
|
|
|
- cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON ..
|
|
|
|
|
- printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
|
2021-05-06 01:38:13 +00:00
|
|
|
|
- ninja
|
|
|
|
|
- ninja install
|
|
|
|
|
- cd ..
|
|
|
|
|
- ./tools/fuzz-test.sh -g -P $MIN_PLUGINS -b $INSTALL_PREFIX/bin -d /tmp/fuzz -t $MAX_SECONDS $( shuf -e /var/menagerie/*/* ) 2> fuzz-test.err || echo "export FUZZ_PASSED=false" > /tmp/fuzz_result.sh
|
2021-05-07 19:03:00 +00:00
|
|
|
|
needs: [ 'ASan randpkt Fuzz' ]
|