1 # In the interest of reliability and performance, please avoid installing
2 # external dependencies here, e.g. via tools/*-setup.sh, apt, dnf, or yum.
3 # Do so in the appropriate Dockerfile at
4 # https://gitlab.com/wireshark/wireshark-containers/ instead.
5 # The resulting images can be found at
6 # https://gitlab.com/wireshark/wireshark-containers/container_registry
17 # Ensure that checkouts are a) fast and b) have a reachable tag. In a
18 # brighter, more glorious future we might be able to use --shallow-since:
19 # https://gitlab.com/gitlab-org/gitlab-runner/-/issues/3460
20 # In the mean time, fetching the last 5000 commits does the job.
21 # Ensure that all variables are string
23 GIT_FETCH_EXTRA_FLAGS: "--depth=5000"
24 CCACHE_DIR: "${CI_PROJECT_DIR}/ccache"
25 # The Qt versions that we ship in the development installers.
26 WINDOWS_QT_VERSION: "6.8.1"
27 MACOS_QT_VERSION: "6.5.3"
28 # Enable color output in various tools.
29 # CMake, Ninja, and others: https://bixense.com/clicolors/
35 # Skip irrelevant SAST scanners:
36 SAST_EXCLUDED_ANALYZERS: "brakeman,eslint,security-code-scan,semgrep,spotbugs"
40 # Automatically cancel pipelines if new changes are pushed to a branch
41 # and the job is interruptible. Jobs are not interruptible by default.
42 on_new_commit: interruptible
44 # Scheduled builds additionally set SCHEDULE_TYPE, which can be one of:
45 # - 2x-daily: Twice daily at 07:00 and 19:00 UTC
46 # - daily: Daily at 10:00 UTC
47 # - weekly: Sunday at 14:00 UTC
48 # - coverity-visual-c++: Monday, Wednesday, & Friday at 12:00 UTC
49 # - coverity-gcc: Sunday, Tuesday, Thursday & Saturday at 12:00 UTC
52 # These must currently be including using "!reference tags". "extends:" and
53 # YAML anchors won't work:
54 # https://gitlab.com/gitlab-org/gitlab/-/issues/322992
56 # Commits that have been approved and merged. Run automatically in the main
57 # repo and allow manual runs in the web UI and in forks.
58 # Release builds: CI_PIPELINE_SOURCE=api
60 # Regular commits: CI_PIPELINE_SOURCE=push, CI_COMMIT_BRANCH=master
61 - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
62 # "Run pipeline" button commits, cherry picks
63 - if: '$CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
64 # Tagged release builds: CI_PIPELINE_SOURCE=api (should be "web"?)
65 - if: '$CI_PIPELINE_SOURCE == "api"'
66 - if: '$CI_PIPELINE_SOURCE == "push" && $CI_PROJECT_URL !~ /.*gitlab.com\/wireshark\/wireshark/'
68 # Merged commits for runners which are only available in
69 # wireshark/wireshark, e.g. wireshark-windows-*. Run automatically in
70 # the main repo and allow manual runs in the web UI.
72 - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
73 - if: '$CI_PIPELINE_SOURCE == "web" && $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
74 - if: '$CI_PIPELINE_SOURCE == "api"'
75 # Incoming merge requests.
77 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
79 # Incoming non-detached merge requests. Must be used for runners which are only
80 # available in wireshark/wireshark, e.g. wireshark-windows-*
81 .if-w-w-only-merge-request:
82 - if: '$CI_PIPELINE_SOURCE == "merge_request_event" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
84 # Scheduled jobs. Care should be taken when changing this since the scheduler
85 # often doesn't report errors.
87 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "weekly"'
89 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "daily"'
90 .if-2x-daily-schedule:
91 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "2x-daily"'
92 # Fuzz jobs. Care should be taken when changing this since the scheduler
93 # often doesn't report errors.
95 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "fuzz"'
100 - saas-linux-small-amd64
102 - printf "\e[0Ksection_start:%s:ci_env_section[collapsed=true]\r\e[0KCI environment variables" "$(date +%s)"
103 - env | grep ^CI | sort
104 - printf "\e[0Ksection_end:%s:ci_env_section\r\e[0K" "$(date +%s)"
106 - for builddir in build/packaging/rpm/BUILD/wireshark-*/build build/packaging/rpm/BUILD/wireshark-* build obj-*; do [ ! -d "$builddir/run" ] || break; done
107 - if [[ "$CI_JOB_NAME" == "build:rpm-opensuse-"* ]]; then export LD_LIBRARY_PATH=$builddir/run; fi
108 - if [ -f $builddir/run/tshark ]; then $builddir/run/tshark --version; fi
114 - saas-linux-small-amd64
119 extends: .build-linux
120 image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
122 # https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
124 # XXX Use ${CI_JOB_NAME}-${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} instead?
125 key: ${CI_JOB_NAME}-master
129 - printf "\e[0Ksection_start:%s:ci_env_section[collapsed=true]\r\e[0KCI environment variables" "$(date +%s)"
130 - env | grep ^CI | sort
131 - printf "\e[0Ksection_end:%s:ci_env_section\r\e[0K" "$(date +%s)"
133 - export LANG=en_US.UTF-8
134 - export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark
136 - ccache --show-stats
137 - export DEB_BUILD_OPTIONS="nocheck parallel=$(( $(getconf _NPROCESSORS_ONLN) + 2 ))"
139 - export MAKEFLAGS=--silent
140 - NUM_COMMITS=$(curl --silent $CI_API_V4_URL/projects/$CI_MERGE_REQUEST_PROJECT_ID/merge_requests/$CI_MERGE_REQUEST_IID/commits | jq length)
141 - echo "$NUM_COMMITS commit(s) in this MR"
145 # setcap restricts our library paths
146 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
147 - CFLAGS=-Wl,-rpath=$(pwd)/run CXXFLAGS=-Wl,-rpath=$(pwd)/run cmake -GNinja -DENABLE_CCACHE=ON $CMAKE_ARGS ..
148 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
152 # The cache should be large enough to be useful but it shouldn't take
153 # too long to restore+save each run.
154 - cd "$CI_PROJECT_DIR"
155 - ccache --max-size $( du --total --summarize --block-size=1M *build*/ | awk 'END {printf ("%dM", $1 * 1.5)}' )
158 extends: .build-linux
159 rules: !reference [.if-2x-daily-schedule]
161 # Hack to let ninja make full use of the system on Fedora and Rocky.
162 - export RPM_BUILD_NCPUS=$(( $( getconf _NPROCESSORS_ONLN ) + 2 ))
163 - git config --global user.email "you@example.com"
164 - git config --global user.name "Your Name"
167 - ../tools/make-version.py --set-release ..
168 - mv -v ../wireshark-*.tar.* .
171 - build/packaging/rpm/RPMS
178 rules: !reference [.if-2x-daily-schedule]
184 - if (-Not (Test-Path C:\Development)) { New-Item -Path C:\Development -ItemType "directory" }
185 - $env:WIRESHARK_BASE_DIR = "C:\Development"
186 - $env:Configuration = "RelWithDebInfo"
187 - $env:Path += ";C:\Program Files\CMake\bin"
188 - $env:CMAKE_PREFIX_PATH = "C:\qt\$($env:WINDOWS_QT_VERSION)\msvc2022_64"
189 # https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell
190 - cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat`" && set " | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
191 # Testing / debugging only.
192 # - cmd.exe /c "set CI_PIPELINE_SOURCE"
193 # - cmd.exe /c "set CI_PROJECT_URL"
196 #- $env:path.split(";")
203 # macOS runners are still beta:
204 # https://about.gitlab.com/blog/2021/08/23/build-cloud-for-macos-beta/
205 # https://docs.gitlab.com/ee/ci/runners/saas/macos/environment.html#vm-images
206 # https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/macstadium/orka/-/blob/main/toolchain/monterey.yml
209 tags: [ saas-macos-medium-m1 ] # https://docs.gitlab.com/ee/ci/runners/saas/macos/environment.html
211 # https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/
213 key: ${CI_JOB_NAME}-master
217 HOMEBREW_NO_AUTO_UPDATE: "1"
218 HOMEBREW_DISPLAY_INSTALL_TIMES: "1"
219 HOMEBREW_NO_INSTALL_CLEANUP: "1"
220 HOMEBREW_NO_INSTALL_UPGRADE: "1"
221 HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: "1"
222 HOMEBREW_NO_UPDATE_REPORT_NEW: "1"
224 - printf "\e[0Ksection_start:%s:ci_env_section[collapsed=true]\r\e[0KCI environment variables" "$(date +%s)"
225 - env | grep ^CI | sort
226 - printf "\e[0Ksection_end:%s:ci_env_section\r\e[0K" "$(date +%s)"
228 - printf "\e[0Ksection_start:%s:brew_section[collapsed=true]\r\e[0KInstalling prerequisites" "$( date +%s)"
229 - ./tools/macos-setup-brew.sh --install-optional --install-test-deps
230 - printf "\e[0Ksection_end:%s:brew_section\r\e[0K" "$( date +%s)"
231 - python3 -m venv $CI_PROJECT_DIR/.venv
232 - source $CI_PROJECT_DIR/.venv/bin/activate
233 - pip3 install pytest pytest-xdist
234 - export PYTEST_ADDOPTS=--skip-missing-programs=dumpcap,rawshark
236 - ccache --show-stats
240 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
241 - cmake -G Ninja -DENABLE_CCACHE=ON -DTEST_EXTRA_ARGS=--disable-capture ..
242 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
244 - ninja test-programs
245 - pytest --disable-capture
247 # The cache should be large enough to be useful but it shouldn't take
248 # too long to restore+save each run.
249 - ccache --max-size $( gdu --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
254 image: registry.gitlab.com/wireshark/wireshark-containers/mingw-dev
256 - saas-linux-small-amd64
258 # XXX Use ${CI_JOB_NAME}-${CI_MERGE_REQUEST_TARGET_BRANCH_NAME} instead?
259 key: ${CI_JOB_NAME}-master
263 - printf "\e[0Ksection_start:%s:ci_env_section[collapsed=true]\r\e[0KCI environment variables" "$(date +%s)"
264 - env | grep ^CI | sort
265 - printf "\e[0Ksection_end:%s:ci_env_section\r\e[0K" "$(date +%s)"
267 - ccache --show-stats
271 - mingw64-cmake -G Ninja -DENABLE_CCACHE=Yes -DFETCH_lua=Yes ..
274 # The cache should be large enough to be useful but it shouldn't take
275 # too long to restore+save each run.
276 - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
280 extends: .build-ubuntu
283 - !reference [.if-w-w-only-merged]
284 - !reference [.if-2x-daily-schedule]
286 - ../tools/make-version.py --set-release --wireshark-version-file=wireshark_version.txt --stratoshark-version-file=stratoshark_version.txt ..
287 - ../tools/update-appdata.py
288 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
289 - cmake -G Ninja $CMAKE_ARGS ..
290 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
292 - build/packaging/source/git-export-release.sh -d .
294 - ninja release_notes
295 - WIRESHARK_VERSION=$(< wireshark_version.txt)
296 - cp -v "doc/Wireshark Release Notes.html" ../wireshark-release-notes-${WIRESHARK_VERSION}.html
297 - cp -v "doc/Wireshark Release Notes.txt" ../wireshark-release-notes-${WIRESHARK_VERSION}.txt
298 - STRATOSHARK_VERSION=$(< stratoshark_version.txt)
299 - cp -v "doc/Stratoshark Release Notes.html" ../stratoshark-release-notes-${STRATOSHARK_VERSION}.html
300 - cp -v "doc/Stratoshark Release Notes.txt" ../stratoshark-release-notes-${STRATOSHARK_VERSION}.txt
302 - zstdcat --threads=0 wireshark-${WIRESHARK_VERSION}.tar.zst | xz --threads=0 > wireshark-${WIRESHARK_VERSION}.tar.xz
304 # - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
305 - if [ "$CI_JOB_STATUS" != "success" ]; then exit 0 ; fi
306 - if [ -n "$SCHEDULE_TYPE" ] ; then exit 0 ; fi
307 - stat --format="%n %s bytes" wireshark-*.tar.*
308 - for digest in sha512 sha256 sha1 ; do openssl $digest wireshark-*.tar.* ; done
309 - if [ -n "$MC_DESTINATION_DIST" ] ; then mc --quiet cp wireshark-*.tar.* "$MC_DESTINATION_DIST/" ; fi
310 - if [ -n "$MC_DESTINATION_RELEASE" ] ; then mc --quiet cp {wire,strato}shark-release-notes-*.{txt,html} "$MC_DESTINATION_RELEASE/" ; fi
314 - wireshark-release-notes-*.html
315 - wireshark-release-notes-*.txt
316 - stratoshark-release-notes-*.html
317 - stratoshark-release-notes-*.txt
319 # Job to generate packages for Debian stable
320 Debian Stable APT Package:
321 extends: .build-linux
322 rules: !reference [.if-2x-daily-schedule]
323 image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
325 - ln --symbolic --no-dereference --force packaging/debian
326 - tools/make-version.py --set-release .
327 # Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
328 # https://gitlab.com/gitlab-com/support-forum/issues/2790
329 - export DEB_BUILD_OPTIONS="nocheck parallel=$(( $(getconf _NPROCESSORS_ONLN) + 2 ))"
331 - export MAKEFLAGS=--silent
332 - CC=/usr/lib/ccache/gcc CXX=/usr/lib/ccache/g++ dpkg-buildpackage -b --no-sign -jauto -zfast
333 # Please don't add a Lintian step unless you can guarantee that someone
334 # will fix any breakages that invariably pop up.
335 - mkdir debian-packages
336 - mv -v ../*.deb debian-packages/
339 - debian-packages/*.deb
342 Debian Stable APT Test:
344 rules: !reference [.if-2x-daily-schedule]
345 image: registry.gitlab.com/wireshark/wireshark-containers/debian-stable-dev
348 - DEBIAN_FRONTEND=noninteractive apt-get install ./debian-packages/*.deb -y
352 needs: [ 'Debian Stable APT Package' ]
356 image: registry.gitlab.com/wireshark/wireshark-containers/fedora-dev
358 # Shared GitLab runners limit the log size to 4M, so reduce verbosity. See
359 # https://gitlab.com/gitlab-com/support-forum/issues/2790
360 - export FORCE_CMAKE_NINJA_NON_VERBOSE=1
361 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
363 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
364 - ninja wireshark_rpm
370 # - dnf install -y build/packaging/rpm/RPMS/x86_64/*.rpm
372 # needs: [ 'Fedora RPM Package' ]
374 openSUSE 15.6 RPM Package:
376 image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.6-dev
378 - source /gcc-latest.env
379 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
381 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
382 - ninja wireshark_rpm
384 openSUSE 15.6 RPM Test:
386 image: registry.gitlab.com/wireshark/wireshark-containers/opensuse-15.6-dev
388 - zypper --no-gpg-checks --no-remote install -y build/packaging/rpm/RPMS/x86_64/*.rpm
390 needs: [ 'openSUSE 15.6 RPM Package' ]
392 Rocky Linux 9 RPM Package:
394 image: registry.gitlab.com/wireshark/wireshark-containers/rockylinux-9-dev
396 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
397 - cmake -G Ninja -DUSE_qt6=OFF ..
398 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
399 - ninja wireshark_rpm
401 Rocky Linux 9 RPM Test:
403 image: registry.gitlab.com/wireshark/wireshark-containers/rockylinux-9-dev
405 - dnf --nogpgcheck localinstall -y build/packaging/rpm/RPMS/x86_64/*.rpm
407 needs: [ 'Rocky Linux 9 RPM Package' ]
410 extends: .build-ubuntu
411 rules: !reference [.if-2x-daily-schedule]
413 # build-ubuntu puts us in `build`.
415 - ln --symbolic --no-dereference --force packaging/debian
416 - CC=/usr/lib/ccache/gcc CXX=/usr/lib/ccache/g++ MAKE=ninja dpkg-buildpackage -us -uc -rfakeroot -jauto -zfast
417 # Please don't add a Lintian step unless you can guarantee that someone
418 # will fix any breakages that invariably pop up.
419 - mkdir ubuntu-packages
420 - mv ../*.deb ubuntu-packages/
422 # dpkg-buildpackage builds in obj-<triplet>, so we need to override
423 # .build-ubuntu. We also build more stuff, so decrease our multiplier.
424 - ccache --max-size $( du --summarize --block-size=1M --total "$CI_PROJECT_DIR"/obj-* | awk '/total$/ {printf ("%dM", $1 * 1.25)}' )
427 - ubuntu-packages/*.deb
432 rules: !reference [.if-2x-daily-schedule]
433 image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
436 - DEBIAN_FRONTEND=noninteractive apt-get install ./ubuntu-packages/*.deb -y
440 needs: [ 'Ubuntu APT Package' ]
443 extends: .build-linux
444 rules: !reference [.if-2x-daily-schedule]
445 image: registry.gitlab.com/wireshark/wireshark-containers/arch-dev
447 - COMMON_PACMAN_ARGS="--sync --refresh --sysupgrade --needed --noconfirm"
448 - ./tools/make-version.py --set-release --wireshark-version-file=wireshark_version.txt .
449 - WIRESHARK_VERSION=$(cat wireshark_version.txt)
450 - WIRESHARK_PREFIX="/opt/wireshark-$WIRESHARK_VERSION"
451 # There are no falcosecurity/libs or falcosecurity/plugins packages for Arch,
452 # so just build them ourselves for now.
454 # falcosecurity/plugins
455 - pacman $COMMON_PACMAN_ARGS go
456 - git clone https://github.com/falcosecurity/plugins.git falco-plugins
457 - pushd /tmp/falco-plugins/plugins/cloudtrail
460 - pushd /tmp/falco-plugins/plugins/gcpaudit
464 - pacman $COMMON_PACMAN_ARGS uthash libelf onetbb jsoncpp re2
465 - export LDFLAGS=-Wl,-rpath,'$ORIGIN/../lib'
466 - git clone https://github.com/falcosecurity/libs.git falco-libs
468 - git switch -c 0.18.1 0.18.1
469 - printf "\e[0Ksection_start:%s:fslibs_cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
470 - cmake -B build -G Ninja -DBUILD_SHARED_LIBS=on -DMINIMAL_BUILD=on -DBUILD_DRIVER=off -DENABLE_ENGINE_KMOD=off -DBUILD_LIBSCAP_EXAMPLES=off -DUSE_BUNDLED_DEPS=off -DUSE_BUNDLED_VALIJSON=on -DCREATE_TEST_TARGETS=off -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_RPATH='$ORIGIN/../lib' -DCMAKE_INSTALL_PREFIX=$WIRESHARK_PREFIX
471 - printf "\e[0Ksection_end:%s:fslibs_cmake_section\r\e[0K" "$( date +%s)"
473 - ninja -C build install
474 - sed -i -e 's/-linstall_lib_link_libraries-NOTFOUND/-lscap_platform -lscap_platform_util/g' $WIRESHARK_PREFIX/lib/pkgconfig/libscap.pc
476 - export CMAKE_PREFIX_PATH=$WIRESHARK_PREFIX
479 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
480 - cmake -G Ninja -DBUILD_stratoshark=on -DBUILD_sshdig=on -DBUILD_falcodump=on -DFALCO_PLUGINS="/tmp/falco-plugins/plugins/cloudtrail/libcloudtrail.so;/tmp/falco-plugins/plugins/gcpaudit/libgcpaudit.so" -DCMAKE_INSTALL_PREFIX=$WIRESHARK_PREFIX ..
481 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
484 - install -v -D -m 755 -t $WIRESHARK_PREFIX/lib/stratoshark/plugins/4.5/epan run/plugins/4.5/epan/falco-bridge.so
485 - install -v -D -m 755 -t $WIRESHARK_PREFIX/lib/stratoshark/plugins/falco run/plugins/falco/*.so
486 # XXX Need to add an install prereqs script
487 - tar -C / -cJf $CI_PROJECT_DIR/wireshark-arch-$WIRESHARK_VERSION.tar.xz opt/wireshark-$WIRESHARK_VERSION
490 - $CI_PROJECT_DIR/wireshark-arch-*.tar.xz
493 extends: .build-windows
494 rules: !reference [.if-w-w-only-merged]
496 - wireshark-windows-x64-package
498 - $env:WIRESHARK_BASE_DIR = "C:\Development"
499 - $env:Configuration = "RelWithDebInfo"
500 - $env:CMAKE_PREFIX_PATH = "C:\Qt\$($env:WINDOWS_QT_VERSION)\msvc2022_64"
501 # https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell
502 - cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat`" && set" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
506 - C:\Windows\py.exe ..\tools\make-version.py --set-release --wireshark-version-file=wireshark_version.txt --stratoshark-version-file=stratoshark_version.txt ..
507 - cmake -G "Visual Studio 17 2022" -A x64 -DENABLE_LTO=off -DBUILD_stratoshark=on -DBUILD_sshdig=on -DBUILD_falcodump=on -DENABLE_SIGNED_NSIS=on ..
508 - msbuild /verbosity:minimal "/consoleloggerparameters:PerformanceSummary;NoSummary" /maxcpucount Wireshark.sln
509 - msbuild /verbosity:minimal /maxcpucount test-programs.vcxproj
510 - msbuild /verbosity:minimal /maxcpucount wireshark_nsis_prep.vcxproj
511 - msbuild /verbosity:minimal /maxcpucount stratoshark_nsis_prep.vcxproj
512 - msbuild /verbosity:minimal /maxcpucount wireshark_wix_prep.vcxproj
513 - C:\gitlab-builds\bin\sign-files.ps1 -Recurse -Path run\RelWithDebInfo
514 - msbuild /verbosity:minimal wireshark_nsis.vcxproj
515 - msbuild /verbosity:minimal stratoshark_nsis.vcxproj
516 # No need for explicit signing of NSIS installer here. The signing is done by makensis.
517 - msbuild /verbosity:minimal wireshark_wix.vcxproj
518 - C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\wix\Wireshark-*.msi
519 - msbuild /verbosity:minimal wireshark_portableapps.vcxproj
520 - C:\gitlab-builds\bin\sign-files.ps1 -Path packaging\portableapps\WiresharkPortable*.exe
521 - $plugins = Get-ChildItem run\RelWithDebInfo\plugins\*\*.dll ; signtool verify /q /pa /all run\RelWithDebInfo\*.exe run\RelWithDebInfo\extcap\wireshark\*.exe $plugins run\RelWithDebInfo\libwireshark.dll run\RelWithDebInfo\libwiretap.dll run\RelWithDebInfo\libwsutil.dll packaging\nsis\Wireshark-*-x64.exe packaging\nsis\Stratoshark-*-x64.exe packaging\wix\Wireshark-*-x64.msi packaging\portableapps\WiresharkPortable??_*.paf.exe
522 - msbuild /verbosity:minimal pdb_zip_package.vcxproj
523 - C:\gitlab-builds\bin\mse-scan.ps1
524 - run\RelWithDebInfo\tshark --version
525 - $packages = Get-ChildItem "packaging\nsis\Wireshark-*-x64.exe", "packaging\nsis\Stratoshark-*-x64.exe", "packaging\wix\Wireshark-*-x64.msi", "packaging\portableapps\WiresharkPortable??_*.paf.exe", "Wireshark-pdb-*x64.zip"
526 - foreach ($package in $packages) { Write-Host $package.name $(Get-Filehash -Algorithm SHA256 $package).Hash $package.length "bytes" }
527 - if (Test-Path env:MC_DESTINATION_WINDOWS_X64) { C:\gitlab-builds\bin\mc --quiet cp $packages "$env:MC_DESTINATION_WINDOWS_X64/" }
528 - $wiresharkVersion = Get-Content .\wireshark_version.txt
529 - $wiresharkNsisSha256 = (Get-FileHash -Algorithm SHA256 .\packaging\nsis\Wireshark-*-x64.exe).Hash
530 - Set-Content -Path wireshark-release-info-$($wiresharkVersion)-windows-x64.ini -Value ("[DEFAULT]`nnsis_sha256 = $wiresharkNsisSha256")
531 - $stratosharkVersion = Get-Content .\stratoshark_version.txt
532 - $stratosharkNsisSha256 = (Get-FileHash -Algorithm SHA256 .\packaging\nsis\Stratoshark-*-x64.exe).Hash
533 - Set-Content -Path stratoshark-release-info-$($stratosharkVersion)-windows-x64.ini -Value ("[DEFAULT]`nnsis_sha256 = $stratosharkNsisSha256")
534 - if (Test-Path env:MC_DESTINATION_RELEASE) { C:\gitlab-builds\bin\mc --quiet cp $(Get-ChildItem "*shark-release-info-*-windows-*.ini") "$env:MC_DESTINATION_RELEASE/" }
535 - C:\Windows\py.exe -m pytest
538 - build/*shark-release-info-*-windows-*.ini
540 Windows Arm64 Package:
541 extends: .build-windows
542 rules: !reference [.if-w-w-only-merged]
544 - wireshark-windows-arm64-package
546 - $env:WIRESHARK_BASE_DIR = "C:\Development"
547 - $env:Configuration = "RelWithDebInfo"
548 - $env:CMAKE_PREFIX_PATH = "C:\Qt\$($env:WINDOWS_QT_VERSION)\msvc2022_arm64"
549 # https://help.appveyor.com/discussions/questions/18777-how-to-use-vcvars64bat-from-powershell
550 - cmd.exe /c "call `"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsarm64.bat`" && set" | Foreach-Object { if ($_ -match "^(.*?)=(.*)$") { Set-Content "env:\$($matches[1])" $matches[2] } }
554 - C:\Windows\py.exe ..\tools\make-version.py --set-release --wireshark-version-file=wireshark_version.txt --stratoshark-version-file=stratoshark_version.txt ..
555 - cmake -G "Visual Studio 17 2022" -A arm64 -DENABLE_LTO=off -DBUILD_stratoshark=on -DBUILD_sshdig=on -DBUILD_falcodump=on -DENABLE_SIGNED_NSIS=on ..
556 - msbuild /verbosity:minimal "/consoleloggerparameters:PerformanceSummary;NoSummary" /maxcpucount Wireshark.sln
557 - msbuild /verbosity:minimal /maxcpucount test-programs.vcxproj
558 - msbuild /verbosity:minimal /maxcpucount wireshark_nsis_prep.vcxproj
559 - msbuild /verbosity:minimal /maxcpucount stratoshark_nsis_prep.vcxproj
560 - C:\gitlab-builds\bin\sign-files.ps1 -Recurse -Path run\RelWithDebInfo
561 - msbuild /verbosity:minimal wireshark_nsis.vcxproj
562 - msbuild /verbosity:minimal stratoshark_nsis.vcxproj
563 - $plugins = Get-ChildItem run\RelWithDebInfo\plugins\*\*.dll ; signtool verify /q /pa /all run\RelWithDebInfo\*.exe run\RelWithDebInfo\extcap\wireshark\*.exe $plugins run\RelWithDebInfo\libwireshark.dll run\RelWithDebInfo\libwiretap.dll run\RelWithDebInfo\libwsutil.dll packaging\nsis\Wireshark-*-arm64.exe packaging\nsis\Stratoshark-*-arm64.exe
564 - msbuild /verbosity:minimal pdb_zip_package.vcxproj
565 - C:\gitlab-builds\bin\mse-scan.ps1
566 - run\RelWithDebInfo\tshark --version
567 - $packages = Get-ChildItem "packaging\nsis\Wireshark-*-arm64.exe", "packaging\nsis\Stratoshark-*-arm64.exe", "Wireshark-pdb-*arm64.zip"
568 - foreach ($package in $packages) { Write-Host $package.name $(Get-Filehash -Algorithm SHA256 $package).Hash $package.length "bytes" }
569 - if (Test-Path env:MC_DESTINATION_WINDOWS_ARM64) { C:\gitlab-builds\bin\mc --quiet cp $packages "$env:MC_DESTINATION_WINDOWS_ARM64/" }
570 - $wiresharkVersion = Get-Content .\wireshark_version.txt
571 - $wiresharkNsisSha256 = (Get-FileHash -Algorithm SHA256 .\packaging\nsis\Wireshark-*-arm64.exe).Hash
572 - Set-Content -Path wireshark-release-info-$($wiresharkVersion)-windows-arm64.ini -Value ("[DEFAULT]`nnsis_sha256 = $wiresharkNsisSha256")
573 - $stratosharkVersion = Get-Content .\stratoshark_version.txt
574 - $stratosharkNsisSha256 = (Get-FileHash -Algorithm SHA256 .\packaging\nsis\Stratoshark-*-arm64.exe).Hash
575 - Set-Content -Path stratoshark-release-info-$($stratosharkVersion)-windows-arm64.ini -Value ("[DEFAULT]`nnsis_sha256 = $stratosharkNsisSha256")
576 - if (Test-Path env:MC_DESTINATION_RELEASE) { C:\gitlab-builds\bin\mc --quiet cp $(Get-ChildItem "*shark-release-info-*-windows-*.ini") "$env:MC_DESTINATION_RELEASE/" }
577 - C:\Windows\py.exe -m pytest
580 - build/*shark-release-info-*-windows-*.ini
582 Windows MinGW-w64 Package:
583 extends: .build-mingw
584 rules: !reference [.if-w-w-only-merged]
586 - mingw64-cmake -G Ninja -DENABLE_CCACHE=Yes -DFETCH_lua=Yes ..
588 - ninja user_guide_html
589 - ninja wireshark_nsis_prep
590 - ninja wireshark_nsis
593 - build/packaging/nsis/wireshark-*.exe
598 rules: !reference [.if-w-w-only-merged]
600 CODE_SIGN_IDENTITY: "Wireshark Foundation"
602 - wireshark-macos-arm-package
605 - export CMAKE_PREFIX_PATH=/usr/local/Qt-$MACOS_QT_VERSION
606 # Not needed for Falco libs 0.19?
607 - export CXXFLAGS="-isystem /usr/local/include/falcosecurity"
608 - export PATH="$PATH:$HOME/bin"
611 - ../tools/make-version.py --set-release --wireshark-version-file=wireshark_version.txt --stratoshark-version-file=stratoshark_version.txt ..
612 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
613 - cmake -DENABLE_CCACHE=ON -DCMAKE_APPLE_SILICON_PROCESSOR=arm64 -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DCMAKE_OSX_ARCHITECTURES=arm64 -DBUILD_stratoshark=on -DBUILD_sshdig=on -DBUILD_falcodump=on -DFALCO_PLUGINS=/usr/local/lib/falco-plugins/libcloudtrail.so -DTEST_EXTRA_ARGS=--enable-release -G Ninja ..
614 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
617 - security find-identity -v -s "$CODE_SIGN_IDENTITY"
618 - ninja wireshark_dmg
619 - ninja stratoshark_dmg
621 - xcrun notarytool submit Wireshark?[1-9]*.dmg --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD" --wait --timeout 10m
622 - xcrun stapler staple Wireshark?[1-9]*.dmg
623 - xcrun notarytool submit Stratoshark?[0-9]*.dmg --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD" --wait --timeout 10m
624 - xcrun stapler staple Stratoshark?[0-9]*.dmg
625 - spctl --assess --type open --context context:primary-signature --verbose=2 Wireshark?[1-9]*.dmg Stratoshark?[0-9]*.dmg
626 - stat -f "%N %z bytes" Wireshark*.dmg Stratoshark*.dmg
627 - for digest in sha512 sha256 sha1 ; do openssl $digest Wireshark*.dmg Stratoshark*.dmg ; done
629 if [ -n "$S3_DESTINATION_MACOS_ARM64" ] ; then
630 aws s3 cp Wireshark?[1-9]*Arm*.dmg "$S3_DESTINATION_MACOS_ARM64/"
631 aws s3 cp Wireshark?dSYM*Arm*.dmg "$S3_DESTINATION_MACOS_ARM64/"
632 aws s3 cp Stratoshark?[0-9]*Arm*.dmg "$S3_DESTINATION_MACOS_ARM64/"
633 aws s3 cp Stratoshark?dSYM*Arm*.dmg "$S3_DESTINATION_MACOS_ARM64/"
635 - $CI_PROJECT_DIR/build/run/tshark --version
636 - WIRESHARK_SPARKLE_SIGNATURE=$( age --decrypt --identity="$MACOS_AGE_IDENTITY" "$MACOS_SPARKLE_BLOB" | /usr/local/Sparkle-2.2.2/bin/sign_update --ed-key-file - Wireshark?[1-9]*.dmg )
637 - WIRESHARK_DMG_SHA256=$( shasum --algorithm 256 Wireshark?[1-9]*.dmg | awk '{print $1}' )
638 - WIRESHARK_VERSION=$(< ../wireshark_version.txt)
639 - printf '[DEFAULT]\nsparkle_signature = %s\ndmg_sha256 = %s\n' "$WIRESHARK_SPARKLE_SIGNATURE" "$WIRESHARK_DMG_SHA256" > wireshark-release-info-${WIRESHARK_VERSION}-macos-arm64.ini
640 - STRATOSHARK_SPARKLE_SIGNATURE=$( age --decrypt --identity="$MACOS_AGE_IDENTITY" "$MACOS_SPARKLE_BLOB" | /usr/local/Sparkle-2.2.2/bin/sign_update --ed-key-file - Stratoshark?[0-9]*.dmg )
641 - STRATOSHARK_DMG_SHA256=$( shasum --algorithm 256 Stratoshark?[0-9]*.dmg | awk '{print $1}' )
642 - STRATOSHARK_VERSION=$(< ../stratoshark_version.txt)
643 - printf '[DEFAULT]\nsparkle_signature = %s\ndmg_sha256 = %s\n' "$STRATOSHARK_SPARKLE_SIGNATURE" "$STRATOSHARK_DMG_SHA256" > stratoshark-release-info-${STRATOSHARK_VERSION}-macos-arm64.ini
645 if [ -n "$S3_DESTINATION_RELEASE" ] ; then
646 aws s3 cp wireshark-release-info-*-macos-*.ini "$S3_DESTINATION_RELEASE/"
647 aws s3 cp stratoshark-release-info-*-macos-*.ini "$S3_DESTINATION_RELEASE/"
653 - build/run/*shark-release-info-*-macos-*.ini
658 rules: !reference [.if-w-w-only-merged]
660 CODE_SIGN_IDENTITY: "Wireshark Foundation"
662 - wireshark-macos-intel-package
665 - export CMAKE_PREFIX_PATH=/usr/local/Qt-$MACOS_QT_VERSION
666 # Not needed for Falco libs 0.19?
667 - export CXXFLAGS="-isystem /usr/local/include/falcosecurity"
668 - export PATH="$PATH:$HOME/bin"
671 - ../tools/make-version.py --set-release --wireshark-version-file=wireshark_version.txt --stratoshark-version-file=stratoshark_version.txt ..
672 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
673 - cmake -DENABLE_CCACHE=ON -DCMAKE_OSX_DEPLOYMENT_TARGET=11.0 -DBUILD_stratoshark=on -DBUILD_sshdig=on -DBUILD_falcodump=on -DFALCO_PLUGINS=/usr/local/lib/falco-plugins/libcloudtrail.so -DTEST_EXTRA_ARGS=--enable-release -G Ninja ..
674 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
677 - security find-identity -v -s "$CODE_SIGN_IDENTITY"
678 - ninja wireshark_dmg
679 - ninja stratoshark_dmg
681 - xcrun notarytool submit Wireshark?[1-9]*.dmg --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD" --wait --timeout 10m
682 - xcrun stapler staple Wireshark?[1-9]*.dmg
683 - xcrun notarytool submit Stratoshark?[0-9]*.dmg --apple-id "$MACOS_NOTARIZATION_APPLE_ID" --team-id "$MACOS_NOTARIZATION_TEAM_ID" --password "$MACOS_NOTARIZATION_PWD" --wait --timeout 10m
684 - xcrun stapler staple Stratoshark?[0-9]*.dmg
685 - spctl --assess --type open --context context:primary-signature --verbose=2 Wireshark?[1-9]*.dmg Stratoshark?[0-9]*.dmg
686 - stat -f "%N %z bytes" Wireshark*.dmg Stratoshark*.dmg
687 - for digest in sha512 sha256 sha1 ; do openssl $digest Wireshark*.dmg Stratoshark*.dmg ; done
689 if [ -n "$S3_DESTINATION_MACOS_INTEL64" ] ; then
690 aws s3 cp Wireshark?[1-9]*Intel*.dmg "$S3_DESTINATION_MACOS_INTEL64/"
691 aws s3 cp Wireshark?dSYM*Intel*.dmg "$S3_DESTINATION_MACOS_INTEL64/"
692 aws s3 cp Stratoshark?[0-9]*Intel*.dmg "$S3_DESTINATION_MACOS_INTEL64/"
693 aws s3 cp Stratoshark?dSYM*Intel*.dmg "$S3_DESTINATION_MACOS_INTEL64/"
695 - $CI_PROJECT_DIR/build/run/tshark --version
696 - WIRESHARK_SPARKLE_SIGNATURE=$( age --decrypt --identity="$MACOS_AGE_IDENTITY" "$MACOS_SPARKLE_BLOB" | /usr/local/Sparkle-2.2.2/bin/sign_update --ed-key-file - Wireshark?[1-9]*.dmg )
697 - WIRESHARK_DMG_SHA256=$( shasum --algorithm 256 Wireshark?[1-9]*.dmg | awk '{print $1}' )
698 - WIRESHARK_VERSION=$(< ../wireshark_version.txt)
699 - printf '[DEFAULT]\nsparkle_signature = %s\ndmg_sha256 = %s\n' "$WIRESHARK_SPARKLE_SIGNATURE" "$WIRESHARK_DMG_SHA256" > wireshark-release-info-${WIRESHARK_VERSION}-macos-intel64.ini
700 - STRATOSHARK_SPARKLE_SIGNATURE=$( age --decrypt --identity="$MACOS_AGE_IDENTITY" "$MACOS_SPARKLE_BLOB" | /usr/local/Sparkle-2.2.2/bin/sign_update --ed-key-file - Stratoshark?[0-9]*.dmg )
701 - STRATOSHARK_DMG_SHA256=$( shasum --algorithm 256 Stratoshark?[0-9]*.dmg | awk '{print $1}' )
702 - STRATOSHARK_VERSION=$(< ../stratoshark_version.txt)
703 - printf '[DEFAULT]\nsparkle_signature = %s\ndmg_sha256 = %s\n' "$STRATOSHARK_SPARKLE_SIGNATURE" "$STRATOSHARK_DMG_SHA256" > stratoshark-release-info-${STRATOSHARK_VERSION}-macos-intel64.ini
705 if [ -n "$S3_DESTINATION_RELEASE" ] ; then
706 aws s3 cp wireshark-release-info-*-macos-*.ini "$S3_DESTINATION_RELEASE/"
707 aws s3 cp stratoshark-release-info-*-macos-*.ini "$S3_DESTINATION_RELEASE/"
713 - build/run/*shark-release-info-*-macos-*.ini
716 # Build the User's Guide and Developer's Guide
718 extends: .build-linux
719 image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
721 - if: '$CI_PIPELINE_SOURCE == "push" && $CI_COMMIT_BRANCH == "master" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
725 - if: '$CI_PIPELINE_SOURCE == "push"'
729 # XXX We might want to move this to wireshark-ubuntu-dev or debian-setup.sh.
730 - DEBIAN_FRONTEND=noninteractive apt-get update
731 - DEBIAN_FRONTEND=noninteractive apt-get --yes install ruby-asciidoctor-pdf ruby-coderay ruby-dev
732 - NOKOGIRI_USE_SYSTEM_LIBRARIES=1 gem install asciidoctor-epub3
735 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
737 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
740 - for HTML_DIR in ws[ud]g_html{,_chunked} ; do zip -9 -r "$HTML_DIR.zip" "$HTML_DIR" ; done
741 - if [ -n "$MC_DESTINATION_DOCS" ] ; then mc --quiet cp ws[ud]g_html{,_chunked}.zip Wireshark*Guide.{epub,pdf} "$MC_DESTINATION_DOCS/" ; fi
742 - mv -v ws[ud]g_html{,_chunked}.zip Wireshark*Guide.{epub,pdf} ../..
744 - if [ "$CI_JOB_STATUS" != "success" ]; then exit 0 ; fi
748 - wsug_html_chunked.zip
750 - wsdg_html_chunked.zip
751 - "Wireshark User's Guide.pdf"
752 - "Wireshark Developer's Guide.pdf"
753 - "Wireshark User's Guide.epub"
754 - "Wireshark Developer's Guide.epub"
758 # https://docs.gitlab.com/ee/user/gitlab_com/index.html#linux-shared-runners
761 extends: .build-ubuntu
762 rules: !reference [.if-merge-request]
764 # build-ubuntu puts us in `build`.
767 # We have the following options for displaying information in a merge request
768 # from a pipleline job:
770 # - The Notes API, which requires a valid GitLab CI_JOB_TOKEN variable, which
771 # isn't available for outside projects:
772 # https://gitlab.com/gitlab-org/gitlab/-/issues/464591.
774 # - Code Quality, which requires extra configuration, using a special container
775 # image, and writing a custom plugin:
776 # https://docs.gitlab.com/ee/ci/testing/code_quality.html.
778 # - Unit test reports, which must be formatted as JUnit XML:
779 # https://docs.gitlab.com/ee/ci/testing/unit_test_reports.html
780 # https://www.ibm.com/docs/en/developer-for-zos/14.2?topic=formats-junit-xml-format
782 # Let's generate a unit test report using tools/wrap-ci-test.py.
783 - REPORT_FILE=commit_checks.xml
784 - TEST_SUITE=commit_checks
786 - ./tools/wrap-ci-test.py --file $REPORT_FILE --suite $TEST_SUITE --case num_commits --command "[ $NUM_COMMITS -lt 2 ] || (echo 'ℹ️ This merge request has more than one commit. Please squash any trivial ones:\n'; git log --oneline --no-decorate --max-count=$NUM_COMMITS ; false)" || true
787 - ./tools/wrap-ci-test.py --file $REPORT_FILE --suite $TEST_SUITE --case tools/pre-commit ./tools/pre-commit $( git log --max-count=$NUM_COMMITS --pretty=format:%h ) || EXIT_CODE=1
788 - ./tools/wrap-ci-test.py --file $REPORT_FILE --suite $TEST_SUITE --case tools/validate-commit ./tools/validate-commit.py $( git log --max-count=$NUM_COMMITS --pretty=format:%h ) || EXIT_CODE=1
789 - ./tools/wrap-ci-test.py --file $REPORT_FILE --suite $TEST_SUITE --case tools/checklicenses ./tools/checklicenses.py || EXIT_CODE=1
790 - ./tools/wrap-ci-test.py --file $REPORT_FILE --suite $TEST_SUITE --case tools/check_help_urls ./tools/check_help_urls.py || EXIT_CODE=1
797 junit: commit_checks.xml
800 extends: .build-ubuntu
801 rules: !reference [.if-merge-request]
805 needs: [ 'Commit Check' ]
807 - source /gcc-latest.env
808 # build-ubuntu puts us in `build`.
810 - mv build "🦈 build 🦈"
812 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
813 # Test release build.
814 - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_CCACHE=ON -DENABLE_WERROR=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=on ..
815 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
816 - script --command ninja --flush --quiet --return ../gcc_report.txt
817 - ansi2html < ../gcc_report.txt > ../gcc_report.html
818 - ninja test-programs
820 - if [ -f run/dumpcap ]; then setcap cap_net_raw,cap_net_admin+eip run/dumpcap; fi
821 - if [ -f run/dumpcap ]; then su user -c "run/dumpcap -D" ; fi
822 - su user -c "pytest-3 --junitxml=../ubuntu_tests.xml"
823 # Test CMake install code and CPack config code. Select any one of the archive generators.
824 - ninja user_guide_html
825 - ninja developer_guide_html
827 - ls wireshark-*.tar.zst{,.sha256}
833 junit: ubuntu_tests.xml
836 extends: .build-ubuntu
838 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
842 - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
845 needs: [ 'Commit Check' ]
847 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
848 - cmake -G Ninja -DENABLE_CCACHE=ON -DENABLE_WERROR=ON -DUSE_qt6=OFF ..
849 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
854 extends: .build-mingw
855 rules: !reference [.if-merge-request]
856 needs: [ 'Commit Check' ]
859 extends: .build-ubuntu
861 - saas-linux-medium-amd64
862 rules: !reference [.if-merge-request]
863 needs: [ 'Commit Check' ]
865 - source /clang-latest.env
866 - apt-get update && apt-get --yes install python3-venv
867 - python3 -m venv $CI_PROJECT_DIR/.venv
868 - source $CI_PROJECT_DIR/.venv/bin/activate
869 # build-ubuntu puts us in `build`.
872 - ./tools/cppcheck/cppcheck.sh -l $NUM_COMMITS | tee cppcheck/cppcheck_report.txt
873 - if [[ -s "cppcheck/cppcheck_report.txt" ]]; then ./tools/cppcheck/cppcheck.sh -l $NUM_COMMITS -x > cppcheck/cppcheck_report.xml ; fi
874 - if [[ -s "cppcheck/cppcheck_report.txt" ]]; then cppcheck-htmlreport --file cppcheck/cppcheck_report.xml --report-dir cppcheck ; fi
876 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
877 # We don't have an "All options" job, so build fuzzshark and tfshark here.
878 - cmake -DENABLE_CHECKHF_CONFLICT=on -DCMAKE_EXPORT_COMPILE_COMMANDS=on -DCMAKE_C_CLANG_TIDY=clang-tidy-$CLANG_VERSION -DCMAKE_CXX_CLANG_TIDY=clang-tidy-$CLANG_VERSION -DBUILD_fuzzshark=ON -DBUILD_tfshark=On -DBUILD_stratoshark=ON -DENABLE_DEBUG=ON -DENABLE_CCACHE=ON -DENABLE_WERROR=ON -G Ninja ..
879 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
880 - printf "\e[0Ksection_start:%s:asn1_section[collapsed=false]\r\e[0KRegenerating ASN.1 dissectors" "$( date +%s)"
882 - git diff --exit-code ${CI_COMMIT_SHA} ..
883 - printf "\e[0Ksection_end:%s:asn1_section\r\e[0K" "$( date +%s)"
884 - printf "\e[0Ksection_start:%s:pidl_section[collapsed=true]\r\e[0KRegenerating PIDL dissectors" "$( date +%s)"
885 - ninja pidl-dissectors
886 - ninja idl2wrs-dissectors
887 - git diff --exit-code ${CI_COMMIT_SHA} ..
888 - printf "\e[0Ksection_end:%s:pidl_section\r\e[0K" "$( date +%s)"
890 - script --command ninja --flush --quiet --return ../tmp_clang_report.txt
891 - ansi2txt < ../tmp_clang_report.txt > ../clang_report.txt
892 - ansi2html < ../tmp_clang_report.txt > ../html/clang_report.html
893 - ./run/tshark -v 2> >(tee ../checkhf_conflict.txt)
894 - ../tools/validate-clang-check.sh -c $CLANG_VERSION 2> >(tee ../tmp_clang_analyzer_check.txt)
895 - ansi2txt < ../tmp_clang_analyzer_check.txt > ../clang_analyzer_check.txt
896 - ansi2html < ../tmp_clang_analyzer_check.txt > ../html/clang_analyzer_check.html
900 - pip3 install pyspellchecker
901 - ./tools/check_spelling.py --no-wikipedia --comments --commits $NUM_COMMITS | tee spelling_check.txt
902 - ./tools/check_typed_item_calls.py --consecutive --label --mask --check-bitmask-fields --commits $NUM_COMMITS | tee item_calls_check.txt
903 - ./tools/check_tfs.py --check-value-strings --commits $NUM_COMMITS | tee tfs_check.txt
904 - ./tools/check_val_to_str.py --commits $NUM_COMMITS | tee val_to_str_check.txt
905 - ./tools/check_col_apis.py --commits $NUM_COMMITS | tee col_apis_check.txt
909 - clang_analyzer_check.txt
912 - item_calls_check.txt
914 - val_to_str_check.txt
916 - checkhf_conflict.txt
920 extends: .build-ubuntu
921 rules: !reference [.if-merge-request]
922 needs: [ 'Commit Check' ]
924 cmake -GNinja -DENABLE_CCACHE=ON \
925 -DENABLE_BROTLI=OFF -DENABLE_CAP=OFF -DENABLE_CHECKHF_CONFLICT=ON -DENABLE_GNUTLS=OFF \
926 -DENABLE_KERBEROS=OFF -DENABLE_LIBXML2=OFF -DENABLE_ILBC=OFF -DENABLE_LUA=OFF -DENABLE_LZ4=OFF \
927 -DENABLE_MINIZIP=OFF -DENABLE_NETLINK=OFF -DENABLE_NGHTTP2=OFF -DENABLE_NGHTTP3=OFF \
928 -DENABLE_BCG729=OFF -DENABLE_OPUS=OFF -DENABLE_PCAP=OFF -DENABLE_PLUGIN_IFDEMO=ON \
929 -DENABLE_PLUGINS=OFF -DENABLE_SBC=OFF -DENABLE_SMI=OFF -DENABLE_SNAPPY=OFF -DENABLE_SPANDSP=OFF \
930 -DENABLE_ZLIB=OFF -DENABLE_ZSTD=OFF -DBUILD_mmdbresolve=OFF ..
933 # Windows runners are still beta, at least technically:
934 # https://docs.gitlab.com/ee/user/gitlab_com/index.html#windows-shared-runners-beta
936 extends: .build-windows
937 rules: !reference [.if-w-w-only-merge-request]
939 - wireshark-windows-merge-req
940 needs: [ 'Commit Check' ]
942 # lib{sinsp,scap} don't support Configuration=Debug, so we can't enable
943 # BUILD_stratoshark or BUILD_falcodump here just yet.
944 - cmake -G "Visual Studio 17 2022" -A x64 -DENABLE_LTO=off ..
945 - msbuild /verbosity:minimal /maxcpucount /property:Configuration=Debug Wireshark.sln
946 - msbuild /verbosity:minimal /maxcpucount /property:Configuration=Debug test-programs.vcxproj
947 - C:\Windows\py.exe -m pytest --disable-gui --build-type=Debug --junitxml=../windows_tests.xml
951 junit: windows_tests.xml
954 extends: .build-macos
955 rules: !reference [.if-w-w-only-merge-request]
957 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
958 - cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DENABLE_CCACHE=ON -DTEST_EXTRA_ARGS=--disable-capture ..
959 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
961 - ninja test-programs
962 - pytest --disable-capture --junitxml=../macos_tests.xml
966 junit: macos_tests.xml
967 needs: [ 'Commit Check' ]
969 # Adapted from https://www.synopsys.com/blogs/software-security/integrating-coverity-scan-with-gitlab-ci/
970 # and https://gitlab.gnome.org/GNOME/glib/-/blob/8f57a5b9/.gitlab-ci.yml#L481
972 image: registry.gitlab.com/wireshark/wireshark-containers/ubuntu-dev
974 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-gcc"'
980 # cov-build doesn’t handle GLIB_DEPRECATED_ENUMERATOR
981 CFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
982 CXXFLAGS: '-DGLIB_DISABLE_DEPRECATION_WARNINGS'
984 - 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
985 - tar --directory=/tmp --extract --gzip --file /tmp/cov-analysis-linux64.tar.gz
989 - /tmp/cov-analysis-linux64-*/bin/cov-build --return-emit-failures --dir ../cov-int ninja
991 - tar --create --gzip --file cov-int.tar.gz cov-int
992 - echo "export ARTIFACT_JOB_URL=$CI_JOB_URL" > job_environment_variables.sh
993 - echo "export GIT_DESCRIPTION=$( git describe --tags --match "v[1-9]*" )" >> job_environment_variables.sh
997 - job_environment_variables.sh
1000 image: curlimages/curl
1002 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-gcc"'
1005 - . job_environment_variables.sh
1006 - echo $ARTIFACT_JOB_URL
1007 - echo $GIT_DESCRIPTION
1008 - 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
1009 needs: [ 'Coverity GCC Scan' ]
1011 Coverity Visual C++ Scan:
1012 extends: .build-windows
1014 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-visual-c++"'
1016 - wireshark-windows-merge-req
1020 - $gitDescription = (( git describe --tags ) | Out-String).Trim()
1021 - 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
1022 - C:\ProgramData\chocolatey\tools\7z x "$env:temp\cov-analysis-win64.zip" -y -r -o"$env:temp"
1023 - cmake -DTEST_EXTRA_ARGS=--enable-release -DENABLE_LTO=off -G "Visual Studio 17 2022" -A x64 ..
1024 - $covAnalysisWin64 = (Get-ChildItem -Path $env:temp -Filter "cov-analysis-win64-*" -Directory)[0].FullName
1025 - Invoke-Expression "& $covAnalysisWin64\bin\cov-build.exe --return-emit-failures --dir ..\cov-int msbuild /verbosity:minimal `"/consoleloggerparameters:PerformanceSummary;NoSummary`" /maxcpucount:1 Wireshark.sln"
1027 - C:\ProgramData\chocolatey\tools\7z a -tzip cov-int.zip cov-int
1028 - '"export ARTIFACT_JOB_URL=$env:CI_JOB_URL" | Out-File -Encoding ascii job_environment_variables.sh'
1029 - '"export GIT_DESCRIPTION=$gitDescription" | Out-File -Encoding ascii -Append job_environment_variables.sh'
1033 - job_environment_variables.sh
1035 Coverity Visual C++ Submit:
1036 image: curlimages/curl
1038 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "coverity-visual-c++"'
1041 - sed -i -e 's/\r//' job_environment_variables.sh
1042 - . job_environment_variables.sh
1043 - echo $ARTIFACT_JOB_URL
1044 - echo $GIT_DESCRIPTION
1045 - 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
1046 needs: [ 'Coverity Visual C++ Scan' ]
1048 Clang Static Analyzer:
1049 extends: .build-ubuntu
1050 rules: !reference [.if-daily-schedule]
1054 - source /clang-latest.env
1055 - scan-build-${CLANG_VERSION} --exclude tools cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_WERROR=OFF -G Ninja ..
1056 - scan-build-${CLANG_VERSION} --exclude tools -o ../sbout ninja
1058 - RAW_DIR=$( find ../sbout -type d -name "20??-??-??-*" -printf "%P\n" | head )
1059 - SB_DIR="scan-build-$RAW_DIR"
1060 - mv "$RAW_DIR" "$SB_DIR"
1061 - if [ -d logs ] ; then mv logs $SB_DIR ; fi
1062 - chmod -R u=rwX,go=rX "$SB_DIR"
1063 - zip -9 -r "${SB_DIR}.zip" "$SB_DIR"
1064 - if [ -n "$MC_DESTINATION_ANALYSIS" ] ; then mc --quiet cp "${SB_DIR}.zip" "$MC_DESTINATION_ANALYSIS/" ; fi
1066 # Windows runners are still beta, at least technically:
1067 # https://docs.gitlab.com/ee/user/gitlab_com/index.html#windows-shared-runners-beta
1068 Visual Studio Code Analysis:
1069 extends: .build-windows
1071 - wireshark-windows-dev
1073 # The wireshark-windows-* tags are only available in wireshark/wireshark.
1074 - if: '$CI_PIPELINE_SOURCE == "schedule" && $SCHEDULE_TYPE == "daily" && $CI_PROJECT_URL =~ /.*gitlab.com\/wireshark\/wireshark/'
1076 - py -m venv sarif-tools.venv
1077 - sarif-tools.venv\Scripts\pip.exe install sarif-tools
1078 - New-Item -Path C:\MinIO -Type "directory"
1079 - Invoke-Webrequest -OutFile C:\MinIO\mc.exe https://dl.min.io/client/mc/release/windows-amd64/archive/mc.RELEASE.2024-07-03T20-17-25Z
1080 - if ($( Get-FileHash -Algorithm SHA256 -Path C:\MinIO\mc.exe ).Hash -ne "A379139FB32C0ADDB6C05786782602B5106D13402759AC1B4A88285A4D5EAAD3" ) { Exit 1 }
1081 - $env:caexcludepath = "C:\Qt;$env:INCLUDE"
1082 - cmake -DENABLE_CODE_ANALYSIS=ON -G "Visual Studio 17 2022" -A x64 -DENABLE_LTO=off ..
1083 - msbuild /verbosity:minimal "/consoleloggerparameters:PerformanceSummary;NoSummary" /maxcpucount:2 Wireshark.sln
1084 - $report = "visual-c++-analyze-" + (Get-Date -format "yyyy-MM-dd") + ".html"
1085 - sarif-tools.venv\Scripts\sarif html --output $report
1086 - if (Test-Path env:MC_DESTINATION_ANALYSIS) { C:\MinIO\mc --quiet cp "$report" "$env:MC_DESTINATION_ANALYSIS/" }
1088 # Build all doxygen docs
1090 extends: .build-ubuntu
1091 rules: !reference [.if-daily-schedule]
1093 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
1095 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
1096 - ninja wsar_html_zip 2>&1 > doxygen_output.txt | tee doxygen_errors.txt
1097 - mv wsar_html.zip doxygen_{output,errors}.txt ..
1099 - if [ -n "$MC_DESTINATION_DOCS" ] ; then mc --quiet cp wsar_html.zip "$MC_DESTINATION_DOCS/" ; fi
1101 - if [ "$CI_JOB_STATUS" != "success" ]; then exit 0 ; fi
1104 - doxygen_errors.txt
1105 - doxygen_output.txt
1109 Code Lines and Data:
1110 extends: .build-ubuntu
1111 rules: !reference [.if-daily-schedule]
1114 CLOC_OUT: /tmp/cloc.txt
1115 SCC_OUT: /tmp/scc.txt
1116 SLOC_OUT: /tmp/sloccount.txt
1117 TOKEI_OUT: /tmp/tokei.txt
1119 - DEBIAN_FRONTEND=noninteractive apt-get update
1120 - DEBIAN_FRONTEND=noninteractive apt-get --yes install sloccount cloc curl unzip
1122 - curl -L -O https://github.com/boyter/scc/releases/download/v3.0.0/scc-3.0.0-x86_64-unknown-linux.zip
1123 - unzip scc-3.0.0-x86_64-unknown-linux.zip
1124 - curl -L -O https://github.com/XAMPPRocky/tokei/releases/download/v12.1.2/tokei-x86_64-unknown-linux-gnu.tar.gz
1125 - tar -xf tokei-x86_64-unknown-linux-gnu.tar.gz
1127 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
1129 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
1132 - echo -n "cloc version:\ "
1134 - cloc --quiet . | tee $CLOC_OUT
1135 - /tmp/scc --version
1136 - /tmp/scc --not-match 'qt/.*.ts' . | tee $SCC_OUT
1137 - echo -n "SLOCCount version:\ "
1138 - sloccount --version
1139 - sloccount . | awk "/^Computing results/ { results=1 } { if (results) print }" | tee $SLOC_OUT
1140 - /tmp/tokei --version
1141 - /tmp/tokei --exclude 'qt/*.ts' . | tee $TOKEI_OUT
1144 # This file was generated by TShark $(git describe --tags | sed -e 's/^v//') with the
1145 # command \`tshark -G manuf\`. Its canonical location is
1147 # https://www.wireshark.org/download/automated/data/manuf.gz
1149 # The first column contains the MAC address block (24, 28 or 36 bits wide,
1150 # per IEEE allocation sizes), the second column contains the shortened name
1151 # used by Wireshark for address name resolution and the third column contains the
1152 # full vendor name from the registry.
1155 - build/run/tshark -G manuf | sed -e 's,:00:00:00/24,,' >> manuf
1156 - gzip --best --keep manuf
1157 - if [ -n "$MC_DESTINATION_ANALYSIS" ] ; then mc --quiet cp "$CLOC_OUT" "$SCC_OUT" "$SLOC_OUT" "$TOKEI_OUT" "$MC_DESTINATION_ANALYSIS/" ; fi
1158 - if [ -n "$MC_DESTINATION_DATA" ] ; then mc --quiet cp manuf manuf.gz "$MC_DESTINATION_DATA/" ; fi
1165 # Fuzz TShark using ASAN and valgrind.
1167 extends: .build-ubuntu
1169 rules: !reference [.if-fuzz-schedule]
1171 - wireshark-ubuntu-fuzz
1172 resource_group: fuzz-master
1174 INSTALL_PREFIX: "$CI_PROJECT_DIR/_install"
1178 - source /clang-latest.env
1179 - DEBIAN_FRONTEND=noninteractive apt-get update
1180 # Use DPkg::options::="--force-overwrite" until
1181 # https://bugs.launchpad.net/ubuntu/+source/llvm-toolchain-15/+bug/2008755
1182 # https://github.com/llvm/llvm-project/issues/62104
1184 - DEBIAN_FRONTEND=noninteractive apt-get --yes --option DPkg::options::="--force-overwrite" install llvm-$CLANG_VERSION
1190 # The cache should be large enough to be useful but it shouldn't take
1191 # too long to restore+save each run.
1192 - ccache --max-size $( du --summarize --block-size=1M "$CI_PROJECT_DIR/build" | awk '{printf ("%dM", $1 * 1.5)}' )
1193 - if [ "$CI_JOB_STATUS" == "canceled" ]; then exit 0 ; fi
1194 - . /tmp/fuzz_result.sh
1195 - if $FUZZ_PASSED ; then exit 0 ; fi
1196 - echo Fuzzing failed. Generating report.
1197 - FUZZ_CAPTURE=$( find /tmp/fuzz -name "fuzz-*.pcap" -o -name "randpkt-*.pcap" | head -n 1 )
1198 - FUZZ_ERRORS="/tmp/fuzz/$( basename "$FUZZ_CAPTURE" .pcap ).err"
1199 - printf "\nfuzz-test.sh stderr:\n" >> "$FUZZ_ERRORS"
1200 - cat fuzz-test.err >> "$FUZZ_ERRORS"
1201 - if [ -n "$MC_DESTINATION_FUZZ" ] ; then mc --quiet cp "$FUZZ_CAPTURE" "$FUZZ_ERRORS" "$MC_DESTINATION_FUZZ/" ; fi
1203 ASan Menagerie Fuzz:
1204 extends: .fuzz-ubuntu
1207 WIRESHARK_LOG_FATAL: "critical"
1209 - MAX_SECONDS=$(( 6 * 60 * 60 ))
1210 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
1211 - cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON -DENABLE_WERROR=Off ..
1212 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
1217 # /var/menagerie contains captures harvested from wireshark.org's mailing list, wiki, issues, etc.
1218 # We have more captures than we can fuzz in $MAX_SECONDS, so we shuffle them each run.
1219 - ./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 || FUZZ_PASSED=false
1220 # Signal after_script, which runs in its own shell.
1221 - echo "export FUZZ_PASSED=$FUZZ_PASSED" > /tmp/fuzz_result.sh
1225 extends: .fuzz-ubuntu
1228 WIRESHARK_LOG_FATAL: "critical"
1230 # XXX Reuse fuzz-asan?
1231 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
1232 - cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=ON -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON -DENABLE_WERROR=Off ..
1233 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
1238 - ./tools/randpkt-test.sh -a -b $INSTALL_PREFIX/bin -d /tmp/fuzz -p $MAX_PASSES 2> fuzz-test.err || FUZZ_PASSED=false
1239 - echo "export FUZZ_PASSED=$FUZZ_PASSED" > /tmp/fuzz_result.sh
1241 needs: [ 'ASan Menagerie Fuzz' ]
1243 Valgrind Menagerie Fuzz:
1244 extends: .fuzz-ubuntu
1245 stage: fuzz-valgrind
1246 resource_group: fuzz-master-valgrind
1248 # Use DWARF-4 debug info. Valgrind does not support Clang 14 with DWARF-5.
1249 # https://gitlab.com/wireshark/wireshark/-/issues/18191
1250 # https://www.mail-archive.com/valgrind-users@lists.sourceforge.net/msg07239.html
1252 WIRESHARK_LOG_FATAL: "critical"
1254 - DEBIAN_FRONTEND=noninteractive apt-get update
1255 - DEBIAN_FRONTEND=noninteractive apt-get --yes install valgrind
1256 - MAX_SECONDS=$(( 3 * 60 * 60 ))
1257 - printf "\e[0Ksection_start:%s:cmake_section[collapsed=true]\r\e[0KRunning CMake" "$( date +%s)"
1258 - cmake -G Ninja -DBUILD_wireshark=OFF -DCMAKE_BUILD_TYPE=Debug -DENABLE_ASAN=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DENABLE_CCACHE=ON -DENABLE_WERROR=Off ..
1259 - printf "\e[0Ksection_end:%s:cmake_section\r\e[0K" "$( date +%s)"
1264 - ./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 || FUZZ_PASSED=false
1265 - echo "export FUZZ_PASSED=$FUZZ_PASSED" > /tmp/fuzz_result.sh
1267 needs: [ 'ASan randpkt Fuzz' ]
1271 - template: Security/SAST.gitlab-ci.yml