Commit Graph

281 Commits

Author SHA1 Message Date
Gerald Combs 7f47511653 Try to fix RPM packaging.
Asciidoctor is now required for packaging. Try to make sure it's
installed on CentOS 8 and openSUSE 15.2. Note that CentOS 8 doesn't have
an Asciidoctor package, which complicates our SPEC.
2021-10-01 18:26:24 +00:00
Gerald Combs f1ee29fc61 GitLab CI: Don't refresh our openSUSE repository.
The openSUSE 15.2 RPM Test step occasionally fails when trying to
retrieve repository metadata. Add "--no-remote" to the zypper install
command in the openSUSE 15.2 RPM Test to match the offline behavior of
our other RPM tests.
2021-09-27 04:17:01 +00:00
Alexis La Goutte 3e193b376f GitLab CI: Add HTML output for Clang Analyzer Check artifact 2021-09-22 04:44:28 +00:00
Alexis La Goutte 6c0897393b GitLab CI: remove ANSI color when generate Clang Check Analyzer text log 2021-09-22 04:44:28 +00:00
Alexis La Goutte 6cf6794e37 GitLab Ci: Fix duplicate apt cmd for daily run 2021-09-13 18:47:35 +00:00
Alexis La Goutte d940352da7 gitlab-ci: enhance cppcheck
display on CI build, the text output (and not xml)
store all cppcheck output files on cppcheck folder

(you need to launch cppcheck twice for generate txt and xml)
2021-09-06 04:04:46 +00:00
Alexis La Goutte 3403e37d47 gitlab-ci: Add artifact for check hf conflict 2021-09-05 07:49:29 +00:00
Alexis La Goutte 1f4e150ca7 gitlab-ci (Clang): Add Clang Analyzer ouput to artifacts 2021-09-02 16:06:17 +00:00
Gerald Combs 97b6610818 GitLab CI: Fix a command.
BSD stat doesn't support `--format`.
2021-08-27 15:47:40 -07:00
Gerald Combs 916dac3316 GitLab CI: Print package sizes and hashes.
Print the sizes of our source, Windows, and macOS packages. Print the
hash of our macOS package.
2021-08-27 22:01:25 +00:00
Gerald Combs 8c4543373a CMake: Use "'" instead of "’" in our guide filenames.
Use an apostrophe instead of RIGHT SINGLE QUOTATION MARK in our PDF and
EPUB filenames. Some programs (notably Okular) can't open filenames with
extended characters, at least on Windows.
2021-08-27 01:18:13 +00:00
Gerald Combs 5e016c1970 GitLab CI: Fix a path (try 2).
Copy the correct .dmg pattern to s3.
2021-08-25 22:18:00 +00:00
Gerald Combs f8fb504d74 GitLab CI: Publish our Windows PDBs. 2021-08-25 22:01:27 +00:00
Gerald Combs 3fbf6fa022 GitLab CI: Fix a path.
Copy the correct .dmg path to s3.
2021-08-25 21:42:48 +00:00
Gerald Combs 28c4c947c0 GitLab CI: Enable macOS Arm notarization.
Enable code signing & notarization in the macOS Arm Package job. Add
"needs: []". Verify the .dmg after notarizing it.
2021-08-25 20:40:29 +00:00
Alexis La Goutte 72eb858741 gitlab-ci: Fix daily API ref
mkdir / cd build is already on ubuntu step
2021-08-25 17:18:28 +00:00
Alexis La Goutte ebb1d7ffaf gitlab-ci: Fix daily Clang Analysis
mkdir / cd build is already on ubuntu step
2021-08-25 17:18:28 +00:00
Gerald Combs d2979e1976 GitLab CI: Initial macOS Arm build.
Add a "macOS Arm Package" job to .gitlab-ci.yml. Fixup a check in
osx-dmg.sh.
2021-08-24 21:22:41 +00:00
Gerald Combs a6e0482a6f Docs: Give the PDF and EPUB guides descriptive filenames.
Use the document title for our PDF and EPUB filenames under the theory
that "Wireshark User’s Guide.pdf" is more obvious than "user-guide.pdf".
2021-08-03 22:18:06 +00:00
Gerald Combs 282179b643 GitLab CI: Make sure Linux builds run under Docker.
Rename the .build job to .build-linux and require the "docker" tag. Add
a corresponding .test-linux job and have the Linux test stages extend
it. Update various steps accordingly.
2021-08-03 16:26:30 +00:00
Gerald Combs b58edf3cb8 Docs: Add epub targets for the guides.
Add user_guide_epub and developer_guide_epub targets that generate
EPUB versions of the User's Guide and Developer's Guide.
Ping #17494.
2021-07-30 21:05:37 +00:00
Gerald Combs 94d7b7846c GitLab CI: Add a retry to the Windows builds.
The Windows runners (Win32 in particular) sometimes time out during
tests. Add a retry.
2021-07-25 22:13:38 +00:00
Gerald Combs f6872b0c3e GitLab CI: Produce less test output.
Pass `--output-on-failure` instead of `--verbose` to ctest so that we
produce more relevant output.
2021-07-14 18:17:08 +00:00
Gerald Combs 9ae60d8483 GitLab CI: Don't print a performance summary on Windows.
In the Windows merge request build job, don't pass
/consoleloggerparameters:PerformanceSummary;NoSummary to msbuild. It
makes the output more verbose and in turn makes errors more difficult to
find.
2021-07-14 00:48:46 +00:00
Gerald Combs ef180c1be6 GitLab CI: Add a "merged" rule for dedicated runners.
We have to use dedicated runners for Windows builds, so create a
separate "if-merged" rule for them which includes only the
wireshark/wireshark repository.
2021-06-29 19:32:51 +00:00
Gerald Combs 798e45aaeb GitLab CI: Update to match recent PortableApps changes. 2021-06-19 16:51:55 -07:00
Gerald Combs 6495e7da99 Packaging: Add 64-bit PortableApps packages.
Build WiresharkPortable32 or WiresharkPortable64 as appropriate for our
target platform. Add WiresharkPortable64 steps to the Win64 builder.
Update the Developer's Guide. Fixes #17260.
2021-06-19 22:53:45 +00:00
Gerald Combs 2d9280089c GitLab CI: Add initial Windows package builds.
Start migrating the Windows package build steps from Buildbot.
2021-06-16 05:48:38 +00:00
Gerald Combs 35f5c116ca GitLab CI: Don't clobber the Code Lines before_script. 2021-06-07 11:40:19 -07:00
Gerald Combs e80e118f7a GitLab CI: Add more code line counters.
Count lines using cloc, scc, and tokei in addition to SLOCCount.
2021-06-07 18:20:10 +00:00
Gerald Combs a72b60b58b GitLab CI: Add CMake sections in more places.
Add section start and end markers for cmake in more places.
2021-05-28 18:39:28 +00:00
Gerald Combs 02f4dcb0ad GitLab CI: Enable ccache for fuzz builds.
Enable ccache for our fuzz builds. Add sections as described at
https://docs.gitlab.com/ee/ci/jobs/#expand-and-collapse-job-log-sections
for the CMake step as well.
2021-05-24 20:52:29 +00:00
Gerald Combs 9c6aef746a GitLab CI: Adjust the Documentation rules.
GitLab CI annoyingly shows "⚙ blocked" in the pipeline UI if you have
any jobs that can be run manually instead of a green checkmark even if
all of the other jobs in the pipeline have passed. It's not clear that
"blocked" means "you can run this manually if needed," so adjust the
Documentation rule so that this doesn't happen.
2021-05-07 21:51:24 +00:00
Gerald Combs 7c6df3848f GitLab CI: Give our jobs proper names.
GitLab's job YAML parser allows spaces in key names and our jobs are
visible in the web UI, so give them proper names.
2021-05-07 19:26:31 +00:00
Gerald Combs bedf0eb21c GitLab CI: Restore the ability to run pipelines from the web UI. 2021-05-07 11:49:51 -07:00
Gerald Combs ae37347103 GitLab CI: Simply our fuzz run times. 2021-05-07 09:21:30 -07:00
Gerald Combs 0c3db4c9fd GitLab CI: Install valgrind.
Install valgrind in the fuzz-valgrind job.
2021-05-06 14:49:31 -07:00
Gerald Combs 458bc93171 GitLab CI: Fix the fuzzing before and after scripts. 2021-05-06 09:24:35 -07:00
Gerald Combs 4397eed75c GitLab CI: Add Valgrind and randpkt fuzzing.
Move common fuzzing configuration items to .fuzz-ubuntu. Build using
Clang, which is what the Buildbot fuzzers did. Add jobs for fuzzing
using Valgrind and randpkt.
2021-05-05 18:54:34 -07:00
Gerald Combs da66bae61b GitLab CI: Fix a path. 2021-05-05 17:36:55 -07:00
Gerald Combs cc285882bf GitLab CI: Fill in fuzz-test.
Fuzz using our runner and our capture menagerie. Extend the run time.
Check for failures and report them.
2021-05-05 15:46:45 -07:00
Gerald Combs 3401f9697d Revert "GitLab CI: Try switching Windows builds back to Qt 5.15.1."
This reverts commit b258f90ce5, which was
an attempt to fix a CI build issue by changing our Qt version. That
didn't fix the issue. Switching from CMake 3.20 to 3.19.8 *did*, which
suggests that we've run into

https://gitlab.kitware.com/cmake/cmake/-/issues/21145
2021-05-05 17:16:16 +00:00
Gerald Combs d7bdd77a4c GitLab CI: Add a minimal fuzzing job.
Add a -t option to tools/fuzz-test.sh which lets you specify a maximum
fuzz time.

Add an initial "fuzz-test" job which fuzzes test/captures/* for 5
minutes. To do: Fuzz longer using our capture menagerie and report
failures.
2021-05-05 16:58:12 +00:00
Gerald Combs 4100cd748a GitLab CI: Fix our API reference uploads. 2021-05-04 14:10:46 -07:00
Gerald Combs 773c35d70a GitLab CI: Fix an upload command. 2021-05-04 13:11:23 -07:00
Gerald Combs 3b18c3f1fd GitLab CI: Distribute our documentation.
Rename the "docbook" job to "documentation". Make sure we can do syntax
highlighting and produce PDFs. Distribute the docs that we build. Allow
the job to be manually run if we don't update any documentation sources.
2021-05-04 18:52:10 +00:00
Gerald Combs 71f66bee3b GitLab CI: Consolidate repeated RPM declarations.
Move repeated build declarations to .build-rpm. Add .test-rpm and move
repeated test declarations there.
2021-05-03 20:32:10 +00:00
Gerald Combs d6500f5870 GitLab CI: Publish the API reference.
Build the wsar_html_zip instead of wsar_html and (re-)publish it at
https://www.wireshark.org/download/docs/. Move the doxygen_all job to
the daily schedule section.
2021-05-03 10:34:31 -07:00
Gerald Combs 74145a8bc6 GitLab CI: Fix our Coverity submission URLs. 2021-05-03 09:46:18 -07:00
Gerald Combs 6467a5ecad GitLab CI: Try to fix Coverity submissions.
Fixup some variable names.
2021-05-03 09:04:14 -07:00
Gerald Combs 37e833e2c6 GitLab CI: Fix an artifact declaration. 2021-05-02 20:28:50 -07:00
Gerald Combs a479922052 GitLab CI: Try to fix Coverity submissions.
The files we need to submit to Coverity might be too large to upload
over HTTP, so use their URL submission method. We won't have a usable
artifact URL until after each cov-build job runs, so we need to submit
our URLs in separate jobs.
2021-05-03 01:55:40 +00:00
Gerald Combs 3de0a93759 GitLab CI: Fix our common rules.
There are three ways to reuse configuration blobs in .gitlab-ci.yml: The
"extends" keyword, YAML anchors, and "!reference" tags. As noted in
https://gitlab.com/gitlab-org/gitlab/-/issues/322992, only the last
method works for job rules. Clean up our common rules and apply them
using "!reference".
2021-05-02 22:01:48 +00:00
Gerald Combs 49fd57440f GitLab CI: Switch back to explicit scheduling.
It looks like "extends" and YAML anchors don't work for scheduling
rules, at least for the way we're using them. Use explicit rules for
scheduled jobs.
2021-04-30 18:48:20 -07:00
Gerald Combs 69c2e89fe2 GitLab CI: Update the schedule variable name. 2021-04-30 17:37:00 -07:00
Gerald Combs e119c035b3 GitLab CI: Switch back to using "only" for scheduled jobs.
Rules don't seem to support schedule variables.
2021-04-30 16:00:35 -07:00
Gerald Combs d816ebea17 GitLab CI: Fixup a scheduling rule. 2021-04-30 16:00:35 -07:00
Gerald Combs c603a5f2c1 GitLab CI+tools: Make our clang version configurable.
Track our preferred version of clang using $CLANG_VERSION in
.gitlab-ci.yml. Update validate-clang-check.sh to accept a clang
version.
2021-04-30 21:32:00 +00:00
Gerald Combs ce95951993 GitLab CI: Add a sloccount job. 2021-04-30 13:49:07 -07:00
Gerald Combs bfddd25f3e GitLab CI: Add more restrictions for merged commits.
Move commonly-used rules to their own hidden jobs. Use ".if-merged" to
ensure that our production build and test jobs are run automatically in
wireshark/wireshark and can be run manually in forks.

Note the new manual behavior in the Developer's Guide.
2021-04-30 20:09:33 +00:00
Gerald Combs 018714708f GitLab CI: Submit a URL to Coverity instead of a file.
Trying to upload cov-build output on Windows is currently failing
because the file is too large. Expose the build file as an artifact and
submit its URL instead.
2021-04-30 12:29:17 -07:00
Gerald Combs 6a46e33313 GitLab CI: Restrict when build:ubuntu-dist runs.
Only run build:ubuntu-dist from pushes, and allow it to be manually
built outside the main repository.
2021-04-30 17:28:00 +00:00
Gerald Combs feefb045ee GitLab CI: Miscellaneous updates.
Switch the recent analysis builds from only/when to rules.

Switch the API reference and VS Code Analysis builds to daily.

Remove a no-longer-useful URL.
2021-04-30 09:25:19 -07:00
Gerald Combs f7fa73802a GitLab CI: Fix a variable reference. 2021-04-29 21:31:08 -07:00
Gerald Combs 9aee4cdc68 GitLab CI: Try to fix coverity-visual-c++. 2021-04-30 03:18:13 +00:00
Gerald Combs 2d2637c034 GitLab CI: Add a Clang scan-build job. 2021-04-30 02:58:59 +00:00
Gerald Combs 2b44c77a8d GitLab CI: Add a missing URL. 2021-04-29 19:41:48 -07:00
Gerald Combs 6445af1075 GitLab CI: Fix our curl path on Windows. 2021-04-30 01:53:01 +00:00
Gerald Combs 992b9146e9 GitLab CI: Try to fix our scheduled job logic. 2021-04-29 18:34:37 -07:00
Gerald Combs 3bcdd863b1 GitLab CI: Switch to single line commands. 2021-04-29 17:37:32 -07:00
Gerald Combs 2cad09e89b GitLab CI: Add a Visual C++ Coverity Scan Build job.
Add a "coverity-visual-c++" job which runs Coverity Scan Build on
Windows using Visual C++ and submits the build output to Coverity. Based
on

https://www.synopsys.com/blogs/software-security/integrating-coverity-scan-with-gitlab-ci
2021-04-29 16:57:06 -07:00
Gerald Combs 0630332565 GitLab CI: Add a GCC Coverity Scan Build job.
Add a "coverity-gcc" job which runs Coverity Scan Build on Ubuntu using
GCC and submits the build output to Coverity. Based on

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-04-29 23:27:24 +00:00
Gerald Combs 0caf4b74c0 GitLab CI: Disable Fedora tests for now.
The test:rpm-fedora job is currently failing with:

$ dnf install -y build/packaging/rpm/RPMS/x86_64/*.rpm
Fedora 34 openh264 (From Cisco) - x86_64        6.4 kB/s | 2.5 kB     00:00
Fedora Modular 34 - x86_64                      8.4 MB/s | 3.8 MB     00:00
Fedora Modular 34 - x86_64 - Updates            500 kB/s | 754 kB     00:01
Fedora 34 - x86_64 - Updates                     11 MB/s | 5.8 MB     00:00
Fedora 34 - x86_64                               21 MB/s |  57 MB     00:02
Error:
 Problem: conflicting requests
  - nothing provides libminizip.so.2.5()(64bit) needed by wireshark-qt-3.5.0rc0_1661_ge2e4b79d0dd3-1.x86_64

It looks like this is due to Fedora 34 and later shipping with
minizip-3.0: https://src.fedoraproject.org/rpms/minizip.

Disable the test:rpm-fedora job for now until we can find a way to make
it more reliable.
2021-04-28 09:05:04 -07:00
Gerald Combs 23a82b040e GitLab CI: Switch to Clang 12. 2021-04-16 18:09:15 +00:00
Gerald Combs 1dc50f7433 CMake+CI: Colorize our compiler output.
As described at

https://medium.com/@alasher/colored-c-compiler-output-with-ninja-clang-gcc-10bfe7f2b949

both Clang and gcc generate colorized output when they detect a
terminal, but not for piped output, which is the case when using Ninja.
Add an ENABLE_COMPILER_COLOR_DIAGNOSTICS CMake option, and set it to
"ON" when we're using Ninja.

In the merge-req:ubuntu-gcc-ctest and merge-req:ubuntu-clang-other-tests
GitLab CI jobs, generate colorized HTML report artifacts using
ansi2html.
2021-04-14 12:42:00 -07:00
Gerald Combs bd123cadaf GitLab CI: Conditionally create C:\Development on Windows. 2021-04-10 07:14:18 +00:00
Gerald Combs b258f90ce5 GitLab CI: Try switching Windows builds back to Qt 5.15.1.
The Windows MR builder was recently migrated to a new machine and
updated to Qt 5.15.2. Since the migration merge request builds have
sometimes failed with

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(240,5): error MSB8066: Custom build for 'C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_de.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_en.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_es.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_fr.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_it.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_ja_JP.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_pl.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_ru.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_sv.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_uk.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\7345cb0fc1b52560d4d2bd48e83ff433\wireshark_zh_CN.qm.rule;C:\builds\wireshark\wireshark\build\CMakeFiles\9829b32238fa3bcc807b02099e4c1642\qtui_autogen.rule' exited with code -1073740940. [C:\builds\wireshark\wireshark\build\ui\qt\qtui_autogen.vcxproj]

Try switching back to Qt 5.15.1. If that doesn't work we might have to
un-migrate the runner.
2021-04-08 16:31:43 +00:00
Gerald Combs fe7bf413fc GitLab CI: Clear our Windows build dependencies. 2021-04-06 16:52:43 -07:00
Gerald Combs 156737db0f GitLab CI: Add a Visual Studio code analysis step.
Add a Windows template.
2021-04-06 19:27:11 +00:00
Gerald Combs 4637111f6d GitLab CI: Make our MSBuild output more quiet. 2021-04-04 22:34:11 +00:00
Gerald Combs 85b36ef4b6 GitLab CI: Switch to our new Windows runner. 2021-04-04 21:13:59 +00:00
Gerald Combs d23b0b82c4 GitLab CI: Fix our debian-stable version.
Run tools/make-version.pl in the build:debian-stable job.

Make sure make-version.pl updates debian/control correctly.
2021-03-13 16:36:35 +00:00
Gerald Combs e5adb4b506 GitLab CI: Speed up our fetching/cloning.
Fetching the complete Wireshark repository in GitLab's CI currently
takes about 3.5 minutes. GitLab CI lets you do shallow cloning, but only
up to 1000 commits. This isn't sufficient for any of our jobs that might
need a reachable tag since it's currently about 1200 commits away in
master.

Set GIT_DEPTH to 1 (which appears to trigger the required shallow clone
logic in GitLab's CI), then deepen it by setting GIT_FETCH_EXTRA_FLAGS
to "--depth=5000". This is *should* be much faster than a full checkout
and still give us a reachable tag:

$ git rev-list --count v3.3.0rc0..v3.5.0rc0
2330
$ git rev-list --count v3.1.0rc0..v3.3.0rc0
2198
$ git rev-list --count v2.9.0rc0..v3.1.0rc0
3449
2021-03-12 18:01:47 +00:00
Guy Harris 9ffb0f27c8 GitHub CI, CMake: override the definition of cmake_build.
Overriding the definition of the rpmbuild macro cmake_build on the
command line, so that it doesn't include the string "--verbose", should
prevent cmake --build from being run with --verbose, and thus prevent it
from running Ninja with the -v flag, and thus prevent a bunch of extra
noisy output from being produced for every build command, and thus
prevent the build log from hitting GitLab's 4MB limit.

Unlike piping the output of "ninja rpm-package" to sed, this means that
the exit status of "ninja rpm-package", rather than the exit status of
sed, is tested.
2021-02-16 09:00:12 +00:00
Guy Harris 2a1de77c72 GitLab CI: *both* commands to sed need a -e flag. 2021-02-15 15:29:53 -08:00
Guy Harris 2e9303b7b2 GitLab CI: use sed to strip out -W and -f options from output.
Filter out the -W and -f options from the output of "ninja rpm-package",
to try to cut down the verbosity.

Do that instead of passing --quiet to rpmbuild, so we get command
progress messages, just without the extra junk.
2021-02-15 14:31:14 -08:00
Guy Harris 4b22f71f76 CMake, .gitlab-ci.yml: try to cut down the output for Fedora RPM builds.
If the FORCE_CMAKE_NINJA_QUIET environment variable is set, have the
top-level CMakeLists.txt add the -q flag to the arguments to rpmbuild.
That appears to reduce the amount of output.

Set that environment varible in the rpm-fedora build.
2021-02-15 02:21:12 -08:00
Guy Harris de4cd04e60 gitlab-ci: try to make the RPM build less noisy.
See whether unsetting VERBOSE causes the build process not to print the
compile command, complete with a big list of compiler options, for every
single file being built, in the hopes of producing less than the limit
of 4MB of log text.
2021-02-14 21:07:53 -08:00
Guy Harris 2e4ea72f51 gitlab-ci: try to make the Debian build less noisy.
See whether setting DH_QUIET to 1 and MAKEFLAGS to --silent causes the
build process not to print the compile command, complete with a big list
of compiler options, for every single file being built, in the hopes of
producing less than the limit of 4MB of log text.
2021-02-14 18:48:00 -08:00
John Thacker 46389187ca GitLab CI: Don't build openSUSE 15.1 anymore (EOL)
openSUSE 15.1 (and the closely related SLES 15 SP1) just went EOL,
so don't worry about building packages for it, 15.2 is sufficient.
2021-01-31 08:34:51 +00:00
Gerald Combs 0d820ddc8d Packaging+GitLab CI: Dist tarball updates.
Ninja keeps track of its built files in .ninja_log, so if you copy a
pre-built target into a fresh build directory, Ninja will ignore and
overwrite it. This includes the tarball generated by the 'dist' target.

In get-export-release.sh, check for a preexisting tarball and preserve
it by default. This lets us pass the dist tarball from one GitLab CI
stage to other stages without recreating it. It's also arguably the
right thing to do in general, since we record and publish the tarball
hashes for each release and different contents for the same filename can
cause confusion.

Move the dist tarball to the build directory in .gitlab-ci.yml, and add
a note about using the tarball exclusively.
2021-01-09 19:16:16 +00:00
Dario Lombardo 07c2439714 gitlab-ci: reuse tarball from ubuntu-dist in rpm. 2021-01-07 19:03:36 +00:00
Gerald Combs a7c6de4c66 GitLab CI: Build merge-req:ubuntu-dpkg using Ninja.
ubuntu-dpkg is currently the slowest of the merge-req pipelines. Newer
versions of dh have a "cmake+ninja" buildsystem, so try using it
instead.
2020-12-29 10:09:36 +00:00
Gerald Combs d45eab1f2d GitLab CI: Don't run locale-gen.
We do so at container build time as of wireshark/wireshark-containers!25.
2020-12-22 18:16:39 +00:00
Dario Lombardo 55bcf95d52 gitlab-ci: replace old notation with extends. 2020-12-22 17:42:15 +00:00
Dario Lombardo 33ab986589 gitlab-ci: fix build:ubuntu-dist. 2020-12-22 17:24:27 +00:00
Gerald Combs 7b27b444cb GitLab CI: Set CCACHE_DIR globally. 2020-12-22 02:55:43 +00:00
Gerald Combs fc124f45bb GitLab CI: Use shallow clones for merge requests.
We currently disable shallow clones in our general pipeline settings
because jobs that create packages need a usable `git describe`. None of
our merge request jobs create packages, so clone shallowly in order to
speed things up.
2020-12-21 17:19:04 -08:00
Gerald Combs b468b1fb01 GitLab CI: Don't set our ccache size in ubuntu-dist.
We no longer build anything, so there's nothing to cache.
2020-12-21 23:17:13 +00:00
Gerald Combs c971d7f10c GitLab CI: Copy the dist (tarball) build.
Copy it to an S3 bucket if the appropriate environment variables are set
and add it as an artifact.
2020-12-21 14:25:11 -08:00
Martin Mathieson e2593e2022 Call add item and tfs checking scripts in ubuntu pipeline
N.B. Neither of these scripts return an error code if issues are found.
2020-12-21 11:46:29 +00:00
Gerald Combs 9772fc5be0 GitLab CI: Add a dist (tarball) build.
Add most of the tarball build steps from the master Buildbot config.
2020-12-17 17:01:59 +00:00
Gerald Combs 3e3194092c GitLab CI: Switch from clang 10 to clang 11.
The wireshark/wireshark-ubuntu-dev currently ships with both clang 10
and 11. Upgrade to clang 11.
2020-12-15 15:16:40 -08:00
Gerald Combs 9c1893b565 GitLab CI: Try to optimize our ccache maximium size. 2020-12-15 19:29:53 +00:00
Gerald Combs ac8ac25da1 GitLab CI: Increase our merge-req:ubuntu-gcc-ctest parallelization. 2020-12-14 09:58:30 +00:00
Gerald Combs b63692e327 GitLab CI: Disable LTO on Windows
`cmake -DENABLE_LTO=off ..` builds more quickly here, so add it to
merge-req:windows.

Fix a typo.
2020-12-13 01:31:09 +00:00
Gerald Combs 081f78e8dd GitLab CI: Update merge-req:windows.
Use a regex to match the project URL and add 'when: always'.
2020-12-10 20:14:34 +00:00
Gerald Combs 1bab2f7ee0 GitLab CI: Stop installing external dependencies.
Remove the last package installation instances from .gitlab-ci.yml. Add
a comment at the top noting that dependencies should be added to our
Dockerfiles instead.
2020-12-09 13:16:04 -08:00
Gerald Combs ef10cc74d1 CI: Fix Ubuntu tests.
The wireshark/wireshark-ubuntu-dev image was recently upgraded to Ubuntu
20.04. Since then the following tests have been failing:

---- FAILED
test/suite_capture.py::case_wireshark_capture::test_wireshark_capture_from_fifo
FAILED
test/suite_capture.py::case_wireshark_capture::test_wireshark_capture_from_stdin
FAILED
test/suite_capture.py::case_tshark_capture::test_tshark_capture_from_fifo
FAILED
test/suite_capture.py::case_tshark_capture::test_tshark_capture_from_stdin
FAILED
test/suite_capture.py::case_dumpcap_capture::test_dumpcap_capture_from_fifo
FAILED
test/suite_capture.py::case_dumpcap_capture::test_dumpcap_capture_from_stdin
FAILED
test/suite_capture.py::case_dumpcap_autostop::test_dumpcap_autostop_filesize
FAILED
test/suite_capture.py::case_dumpcap_autostop::test_dumpcap_autostop_packets
FAILED
test/suite_capture.py::case_dumpcap_ringbuffer::test_dumpcap_ringbuffer_filesize
FAILED
test/suite_capture.py::case_dumpcap_ringbuffer::test_dumpcap_ringbuffer_packets
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_multi_in_multi_out
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_multi_in_single_out
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_single_in_multi_out
FAILED
test/suite_capture.py::case_dumpcap_pcapng_sections::test_dumpcap_pcapng_single_in_single_out
FAILED
test/suite_clopts.py::case_dumpcap_options::test_dumpcap_interface_chars
FAILED
test/suite_clopts.py::case_dumpcap_options::test_dumpcap_invalid_chars
FAILED
test/suite_clopts.py::case_dumpcap_options::test_dumpcap_valid_chars
----

This is because dumpcap can't load our local libraries after setting cap_net_raw+cap_net_admin:

----
-- Begin stderr for command ('/builds/wireshark/wireshark/build/run/dumpcap', '-D') --
/builds/wireshark/wireshark/build/run/dumpcap: error while loading shared libraries: libwsutil.so.0: cannot open shared object file: No such file or directory
-- End stderr for command ('/builds/wireshark/wireshark/build/run/dumpcap', '-D') --
----

Add $(pwd)/run to our rpath.
2020-12-09 12:10:52 -08:00
Gerald Combs 7a8a3a8702 GitLab CI: Update lintian excludes.
Add "copyright-excludes-files-in-native-package" to the lintian exclude
list. The wireshark/wireshark-ubuntu-dev image was updated to 20.04
recently, and its lintian added
https://lintian.org/tags/copyright-excludes-files-in-native-package.html.
2020-12-08 11:44:42 -08:00
Gerald Combs f37951a035 CI: Clean up the CentOS 8 build. 2020-11-16 18:36:21 -08:00
Gerald Combs 536ed6335f CI: Switch to our CentOS, Debian, and openSUSE containers. 2020-11-17 01:44:54 +00:00
Gerald Combs 99bad1d667 CI: Switch the Fedora image to wireshark-fedora-dev. 2020-11-17 00:19:28 +00:00
Gerald Combs 46af0bc744 CI: Ubuntu container updates.
Fixup the Ubuntu container URL, and don't install packages added to the
container in
https://gitlab.com/wireshark/wireshark-containers/-/tree/91819f0/dev/ubuntu.
2020-11-16 14:53:02 -08:00
John Thacker ac34f3e8b6 RPM+CI: Update and fix for Fedora 33, CentOS 8, OpenSUSE Leap 15.2
Re-enable Fedora build and add CentOS 8 and OpenSUSE 15.2 builds.
Fedora 33 does out of build tree cmake builds and needs spec file changes.
CentOS 8 has some changes with cmake and other packages that are similar to
older Fedora, and needs extra repositories enabled to get -devel packages
(still missing -devel for some optional libraries). OpenSUSE Leap 15.2 also
has some changes needed to build. Note that OpenSUSE Leap 15.1 is EOL
at the end of November 2020. Fixes #16971
2020-11-05 17:58:16 -05:00
Gerald Combs 05bd5cd91e CI+RPM: Disable the Fedora build for now.
Fedora 33's RPM environent added changes that break CMake. Disable it
for now.
2020-10-28 20:48:49 +00:00
Moshe Kaplan f1d9b3c966 Gitlab-ci: Build doxygen
Add a Gitlab-CI job for building doxygen docs
2020-10-24 12:04:20 +00:00
Moshe Kaplan 3dde70de2c .gitlab-ci: Generate cppcheck reports
Modify the cppcheck job to also generate cppcheck's reports
and provide them as artifacts to the user.
2020-10-15 19:39:11 +00:00
Moshe Kaplan a9f6bfff62 gitlab-ci: Add docbook job for WSUG and WSDG
Adds job of building the HTML versions of the
Wireshark User Guide and Wireshark Developer Guide.
PDF versions are not built because it would take significantly longer
(~10 mins instead of ~5 minutes)
2020-10-13 18:58:48 +00:00
Gerald Combs d3c1f31439 Windows: Switch to Qt 5.15.1.
Switch the Windows GitLab runner and Buildbot builders to Qt 5.15.1. Qt
5.15 includes HiDPI and dark mode improvements that we might find
useful.
2020-09-22 16:35:55 -07:00
Gerald Combs ece76abdd3 GitLab CI: Move commit validation to its own job.
Move the pre-commit and validate-commit checks to their own job. This
lets us quickly re-run validate-commit in case the submitter forgets to
check "Allow commits from members who can merge to the target branch"

Shorten the "merge-request" prefix to "merge-req" in order to make it
easier to distinguish between each job in the GitLab UI.
2020-09-16 01:04:34 +00:00
Gerald Combs 9e2cbb995e GitLab CI: Set MAKEFLAGS=--silent
Set MAKEFLAGS=--silent in order to reduce the size of our log output.
2020-09-09 13:20:46 -07:00
Gerald Combs 322f6f3988 GitLab CI: Restrict the Windows build to wireshark/wireshark.
The Windows runners are constrained by the following:

* We require quite a bit of software not present in the stanadard
runner[1] which takes a long time to install, including Python, Perl,
and Qt.

* You can't specify an arbitrary Docker image like you can with Linux
runners.

As a result we have a project-specific runner for wireshark/wireshark
that runs a custom Windows Docker image. Update the CI rules so that
merge-request:windows only runs for gitlab.com/wireshark/wireshark. The
GitLab documentation recommends rules over only/except, so switch to
them.

Fixup .editorconfig while we're here.

[1]https://gitlab.com/gitlab-org/ci-cd/shared-runners/images/gcp/windows-containers/blob/master/cookbooks/preinstalled-software/README.md
2020-09-07 19:35:45 +00:00
Gerald Combs 0e6027313d gitlab-ci: Enable the Windows MR build.
Git is currently broken in gitlab-runner 13.3.0 + Windows + Docker...

https://gitlab.com/gitlab-org/gitlab/-/issues/239013

...but it appears to work fine in gitlab-runner 13.2.0. I reverted the build machine to that version, so we can enable the merge-request:windows build.
2020-09-02 13:23:24 -07:00
Gerald Combs 5aec54c9c3 GitLab CI: Set up ccache.
Set up a per-job cache directory and enable ccache as described at

https://gould.cx/ted/blog/2017/06/10/ccache-for-Gitlab-CI/

and

https://docs.gitlab.com/ee/ci/yaml/README.html#cache

Enable ccache in the merge-request steps.

Export DEB_BUILD_OPTIONS=nocheck while we're here.
2020-09-02 17:37:44 +00:00
Gerald Combs 3e0ebabdec CI+tools: Install lintian.
Install lintian instead of devscripts (which pulls in lintian + many
other packages) in .gitlab-ci.yml. Add lintian to DEBDEPS_LIST in
debian-setup.sh.
2020-09-01 08:46:08 +00:00
Dario Lombardo feba9bbff4 ci: add clang-tools to merge-request:ubuntu-clang-other-tests job.
It's required by validate-clang-check.
2020-08-24 13:15:30 +00:00
Dario Lombardo b586f25789
tools: rename validate-clang-check.py to validate-clang-check.sh.
This reflects the actual language used in the code (sh).
2020-08-24 14:26:23 +02:00
Gerald Combs 50550708cc Add merge request jobs to GitLab CI and migrate commit validation.
Copy the Buildbot petri dish builder steps to corresponding GitLab CI
jobs. Update validate-commit.py to look for old "Bug:" and "Ping-Bug:"
references and have it call `git stripspace` directly. tools/commit-msg
was specific to Gerrit, so remove it.

Change-Id: Icbc54709052f44c941db9ad6a5dcf596292782a2
2020-08-23 17:46:18 -07:00
Dario Lombardo f363aa57f9 gitlab-ci: add test:debian-stable.
This is going to install the deb artifact created before.

Change-Id: I59a52c8d7fe5dd46bb3ed8684ab3dd477f3baea4
Reviewed-on: https://code.wireshark.org/review/37366
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2020-06-04 07:23:27 +00:00
Dario Lombardo 77b0dc6931 gitlab/travis: remove nopcap tests.
Lack of capture support is such a rare case, it is not worth spending
too much CI cycles testing it for every build.

Change-Id: Ia9be2b6ba21d0b198e65d746483282ef66cadb84
Reviewed-on: https://code.wireshark.org/review/36626
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-29 20:36:32 +00:00
Peter Wu 7579d98448 gitlab-ci: upgrade to Clang 10, drop special -Wframe-larger-than case
Requires an updated wireshark/wireshark-ubuntu-dev image:
https://github.com/wireshark/wireshark-ubuntu-dev-docker/pull/2

Remove -Wframe-larger-than while at it. The default size in our CMake
config is 32k. Clang should not significantly go over it. If so, then it
has to be solved there, and not in the Gitlab config.

Change-Id: I3891fcbd9dec8e5a4597404aa8131f28a1755a02
Reviewed-on: https://code.wireshark.org/review/36369
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-25 14:41:13 +00:00
Peter Wu 7e89bd873a gitlab-ci: test nopcap build with gcc-7 instead of gcc-8
gcc-7 is included with build-essential on Ubuntu 18.04, not installing
an additional gcc-8 saves 110M on disk. The coverage should more or less
be the same, even very old compilers will catch typical build failures.

Change-Id: I03c95dcd1c83b02390489a47de7e2a8d2d757232
Reviewed-on: https://code.wireshark.org/review/36415
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-14 16:56:30 +00:00
Peter Wu 9dcba0c68a gitlab-ci: print tshark --version for OpenSUSE and Debian
Add missing output directory for Debian (obj-x86_64-linux-gnu). Restore
a working LD_LIBRARY_PATH setting for OpenSUSE, this has never worked
since v3.1.0rc0-590-gc77ee0008d.

Change-Id: I4f2c2e4636e7dd0233e7f08a88ba3789b021f274
Reviewed-on: https://code.wireshark.org/review/36378
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-13 22:05:13 +00:00
Peter Wu 0ec5ca3ecf gitlab-ci: remove GCC-5
As previously in commit 6bb691189c ("gitlab-ci: remove unnecessary jobs,
upgrade versions"), GCC 5 support would only catch two issues. From the
respective commits:

    epan/dissectors/packet-synphasor.c:782:7: error: ‘ai’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
    ui/qt/wireless_frame.h:63:25: error: in-class initialization of non-static data member is a C++11 extension [-Werror,-Wc++11-extensions]

These are normally just false positive warnings in old compilers, fixed
in newer GCC. It fails only because it was built from git master as
opposed to a release branch where -Werror is disabled by default.

Save some resources, and remove GCC 5. The CentOS-7 job still tests the
old GCC 4.8.5 compiler. Newer GCC versions are handled by other jobs.

Change-Id: I9f49d59e6476ea8bcd9e135dba1c94b37a2f047f
Reviewed-on: https://code.wireshark.org/review/36366
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2020-03-11 22:16:49 +00:00
Anders Broman 6e9e51e49c Revert "gitlab-ci: upgrade to Clang 10"
This reverts commit fbe9d7f4b4.

Change-Id: If7a3ae53c434bf5fe90a41ea56a1e8be958b1f55
Reviewed-on: https://code.wireshark.org/review/36286
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-05 08:18:08 +00:00
Peter Wu fbe9d7f4b4 gitlab-ci: upgrade to Clang 10
Requires an updated wireshark/wireshark-ubuntu-dev image:
https://github.com/wireshark/wireshark-ubuntu-dev-docker/pull/2

Change-Id: Iee869a44cede6152a2f7927735a74b0bb89bef60
Reviewed-on: https://code.wireshark.org/review/36283
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-03-05 04:46:15 +00:00
Peter Wu 6bb691189c 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 04:45:52 +00:00
Dario Lombardo dd9af8018d gitlab-ci: fix wrong job name.
Change-Id: Ia14af8922e5e717d931480225fd0202b697f9155
Reviewed-on: https://code.wireshark.org/review/35003
Reviewed-by: Anders Broman <a.broman58@gmail.com>
2019-11-06 13:58:28 +00:00
Dario Lombardo 8cfe3f5aeb gitlab-ci: bump opensuse image version to 15.1.
According to https://en.wikipedia.org/wiki/OpenSUSE_version_history#Leap_15_series_[22][23]
15.0 is EOL in November 2019.

Change-Id: I201fc2683078f7ae16b9317e3b34c312f442aeb1
Reviewed-on: https://code.wireshark.org/review/34944
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-11-04 13:41:29 +00:00
Juergen Kosel b1e74c527b gitlab-ci: Add job to create debian install-packages
Inspired by the description in https://about.gitlab.com/2016/10/12/automated-debian-package-build-with-gitlab-ci/
the gitlab-ci job build-debian-deb generates *.deb files
These files are available as build artifacts for 3 days.

Change-Id: Ic0b01c161e659c3ed9dbbd6387fa8960e34d50d3
Signed-off-by: Juergen Kosel <juergen.kosel@gmx.de>
Reviewed-on: https://code.wireshark.org/review/34042
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-08-03 20:23:12 +00:00
Dario Lombardo 8ba4af7c1f gitlab-ci: use opensuse/leap:42.3 image.
The former official image has been deprecated in favor of
opensuse/leap one.

Change-Id: I92de89060f2d8f3a679f0c332eebb65e5c13ba41
Reviewed-on: https://code.wireshark.org/review/33852
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Reviewed-by: Dario Lombardo <lomato@gmail.com>
2019-07-06 18:20:31 +00:00
Dario Lombardo bb00f37f51 gitlab-ci: run setcap on dumpcap.
This enables capture privileges for 'user' that is used in the tests.
travis.yml has been changed as well to reflect the setcap command in
the docs.

Change-Id: I0584e0df417112b1774b86ef8b28121799efe137
Reviewed-on: https://code.wireshark.org/review/33182
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-16 20:29:59 +00:00
Dario Lombardo 731b263853 gitlab-ci: move ubuntu commands in parent job.
Change-Id: Ieb7a05c74b728d3d293790d28812c9161bfa6ce3
Reviewed-on: https://code.wireshark.org/review/33181
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-16 20:29:33 +00:00
Dario Lombardo c95e83d9a9 gitlab-ci: fix pytest execution.
pytest-3 is the executable name on the docker image (ubuntu derivated).

Remove pip and pytest installation while here, since they're
provided by the docker image.

Change-Id: Iad2e9cafc42cd1e83b2868126abb91d5ee7bbd92
Reviewed-on: https://code.wireshark.org/review/33145
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-11 13:05:54 +00:00
Dario Lombardo ab7ee924a1 gitlab-ci: use new base image, drop gcc-4 job
Docker image: https://hub.docker.com/r/wireshark/wireshark-ubuntu-dev
Github repo: https://github.com/wireshark/wireshark-ubuntu-dev-docker

Drop GCC 4.9 since it is missing on the new Ubuntu 18.04 image. Rely on
CentOS 7 for testing GCC 4.8.5 in case that is important.

Change-Id: I02a2b22a5920e6a65aee2b2eb60c81df03742417
Reviewed-on: https://code.wireshark.org/review/31872
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-05-09 22:16:44 +00:00
Dániel Bakai c77ee0008d rpm: update rpm package dependencies and spec to work on current os versions
Change-Id: Iaa0bd9513869e65b96b6014d66ca3cfd917dbe64
Reviewed-on: https://code.wireshark.org/review/32938
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-22 13:21:37 +00:00
Dario Lombardo f5cc7904b8 gitlab-ci: add regression test suite.
Change-Id: I4142da87437a456c2e550c6a03c41bea92215438
Reviewed-on: https://code.wireshark.org/review/32836
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-04-19 22:12:50 +00:00
Dario Lombardo 776b31249f gitlab-ci: fix asciidoctor version in opensuse.
openSUSE now ships with 2.0.0 which is incompatible. Use 1.5.8 instead.
Disable ri and rdoc while here.

Change-Id: I40766ae4377f5998dcd58d02ecbdac665f78222a
Reviewed-on: https://code.wireshark.org/review/32547
Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
2019-03-24 07:19:34 +00:00
Dario Lombardo 4d2a0878c4 gitlab-ci: keep artifacts in rpm builds.
Change-Id: I7117c05a59b82bd925f82dfdfdda770fa507b7d4
Reviewed-on: https://code.wireshark.org/review/31575
Reviewed-by: Dario Lombardo <lomato@gmail.com>
Tested-by: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2019-01-18 10:04:52 +00:00