Commit Graph

138 Commits

Author SHA1 Message Date
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