Commit Graph

174 Commits

Author SHA1 Message Date
Emmanuele Bassi
9723c5595c ci: Use meson compile rather than bare ninja
This makes it more consistent with `meson setup` in the rest of the
file.
2023-08-16 13:07:05 +01:00
René de Hesselle
0c73ff3a08 meson: Use 'meson setup' to configure
This removes a deprecation warning when using 'meson' without 'setup'.
2023-08-16 13:06:40 +01:00
Philip Withnall
5370df540c ci: Use Meson 1.0.0 on Windows and macOS CI builds
This is a departure from our policy of using the minimum required Meson
version, but I think it might be worth a try to see if it fixes the
persistent intermittent build failures on these platforms due to what
looks like build dependency graph issues.

For example:
 - https://gitlab.gnome.org/GNOME/glib/-/jobs/2579411
 - https://gitlab.gnome.org/GNOME/glib/-/jobs/2578792
 - https://gitlab.gnome.org/GNOME/glib/-/jobs/2579220
 - https://gitlab.gnome.org/pwithnall/glib/-/jobs/2588507

I was looking at trying to diagnose some of these failures in order to
potentially file bugs against Meson, but the first step is really to
test against the latest version of Meson. So here we are.

Crucially, our other CI jobs continue to use the minimum Meson version
required by GLib, so we continue to test that GLib builds with its
minimum dependencies. I do not plan to change that.

Also crucially, this MR continues to use a specific Meson version,
rather than asking `pip` to install the latest available. Doing that
could lead to unexpected regressions in future, and that’s not what
GLib’s CI is meant to be testing for.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-02-16 13:34:59 +00:00
Marco Trevisan (Treviño)
a8f56c5be1 ci: Use verbose output in meson by default
Now that we're using TAP parsing, this will show subtest failures in
details but without showing any logging error, that we'd still need to parse
from actual logs.
2023-01-20 15:41:17 +01:00
Nirbheek Chauhan
fc6843bec8 ci: Fix podman support in run-docker.sh
In newer Fedora versions, `docker` doesn't exist. You have to use
`podman`.
2022-12-31 05:13:10 +05:30
Nirbheek Chauhan
a587212080 ci: Update docker image generation README 2022-12-31 05:13:10 +05:30
Philip Withnall
42e810e2c1 ci: Don’t fail if testlog-unstable_tests.junit.xml doesn’t exist on MSVC
That file is created if running the `unstable_tests` suite succeeds. It
can fail, though, leaving that log file nonexistent. There’s no point in
failing the whole test run by bailing out if postprocessing the log file
fails.

Occasionally postprocessing can fail with a `FileNotFoundError`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-12-08 15:27:24 +00:00
Philip Withnall
3fad4d45bf Revert "build: Bump Meson dependency to 0.64.0"
This reverts commit 91f14cd058.

The freedesktop SDK, which is used by gnome-build-meta, only has Meson
0.63. Bumping GLib’s Meson dependency to 0.64 means that, at the moment,
GLib is not buildable in gnome-build-meta and hence can’t be tested in
nightly pipelines against other projects, etc.

That’s bad for testing GLib.

It’s arguably bad that we’re restricted to using an older version of
Meson than shipped by Debian Testing, but that’s a separate discussion
to be had.

Revert the Meson 0.64 dependency until the freedesktop SDK ships Meson ≥
0.64. This also means reverting the simplifications to use of
`gnome.mkenum_simple()`.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3077#note_1601064
2022-11-24 12:10:07 +00:00
Philip Withnall
91f14cd058 build: Bump Meson dependency to 0.64.0
It will fix dependency ordering issues found in
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2917#note_1559190.

As per `docs/meson-version.md`, we can depend on Meson ≤0.64.0 now as
it’s in Debian Testing.

The FreeBSD runners have to be changed to explicitly install the right
version of Meson using `pip3`, as the system-installed version is not
quite new enough. See
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3077#note_1596257.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: !2917
2022-11-23 10:39:13 +00:00
Philip Withnall
e960529532 ci: Exclude copylibs and fuzz tests from code coverage
The fuzz tests are run on a separate CI system, and we don’t care what
their code coverage is. The only reason they’re run on our CI systems at
all is as a smokecheck. They are not unit tests that we want to check
are running every line.

Similarly, exclude copylibs/subprojects as GLib is not responsible for
testing them. They have (or should have) their own unit tests and code
coverage metrics in their upstreams.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-10 14:56:34 +00:00
Philip Withnall
b906d470c7 ci: Add a CI check for REUSE-compliant licensing/copyright headers
This doesn’t enforce licensing/copyright headers to be present on all
files, but does check that at least a minimum number of files are
correct.

This should help avoid new files being added without appropriate
licensing information in future.

The baseline is set at what `reuse lint` outputs for me at the moment.

See https://reuse.software/tutorial/#step-2 for information about how to
add REUSE-compliant licensing/copyright to files.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1415
2022-11-08 15:50:59 +00:00
Philip Withnall
cbf17c9422 Merge branch 'wip/3v1n0/support-can-fail-tests' into 'main'
meson, ci: Support tests that can fail under certain conditions

See merge request GNOME/glib!2987
2022-10-31 14:28:02 +00:00
Marco Trevisan (Treviño)
94273b0ebf ci: Remove not-printable chars from generated junit file
Under windows we get some invalid chars that are causing gitlab not to
be able to parse the xml files

See: https://github.com/mesonbuild/meson/issues/9894
2022-10-31 14:08:31 +01:00
Marco Trevisan (Treviño)
3d497b8f5b ci: Show commands run from the test scripts
It allows better debugging in case of failures.
2022-10-31 14:08:31 +01:00
Marco Trevisan (Treviño)
8d5ae3ae83 ci: Mark failing mingw tests as can-fail and do not ignore test failures 2022-10-31 14:08:31 +01:00
Marco Trevisan (Treviño)
54a9e797fe ci: Mark failing windows tests as can-fail and do not ignore test failures 2022-10-31 14:08:31 +01:00
Marco Trevisan (Treviño)
62dca6c1cf meson, ci: Support tests that can fail under certain conditions
We have tests that are failing in some environments, but it's
difficult to handle them because:
 - for some environments we just allow all the tests to fail: DANGEROUS
 - when we don't allow failures we have flacky tests: A CI pain

So, to avoid this and ensure that:
 - New failing tests are tracked in all platforms
 - gitlab integration on tests reports is working
 - coverage is reported also for failing tests

Add support for `can_fail` keyword on tests that would mark the test as
part of the `failing` test suite.
Not adding the suite directly when defining the tests as this is
definitely simpler and allows to define conditions more clearly (see next
commits).

Now, add a default test setup that does not run the failing and flaky tests
by default (not to bother distributors with testing well-known issues) and
eventually run all the tests in CI:
 - Non-flaky tests cannot fail in all platforms
 - Failing and Flaky tests can fail

In both cases we save the test reports so that gitlab integration is
preserved.
2022-10-31 14:08:29 +01:00
Marco Trevisan (Treviño)
e320149c39 ci: Add an msys2-clang64 job to run only on schedules
It has enough particularities to require a job to monitor failures
2022-10-31 12:00:53 +01:00
Marco Trevisan (Treviño)
345fbe0666 ci/test-msys2: use $MINGW_PACKAGE_PREFIX 2022-10-31 12:00:53 +01:00
Marco Trevisan (Treviño)
fdaa8a334a ci: Set CFLAGS on msys2-mingw32 in yaml file as it happens for other jobs
Be consistent, and based on this also perform the lcov job or not
2022-10-31 12:00:53 +01:00
Emmanuel Fleury
da178b1938 Fix coding style issue in .gitlab-ci/check-missing-install-tag.py 2022-10-27 09:51:28 +02:00
Xavier Claessens
a4eb39dde8 ci: Fix failing tests not failing CI job 2022-10-26 11:55:56 -04:00
Xavier Claessens
9ba01dc7fc ci: Fix check for missing install tag
Better check the installation plan json file instead of parsing logs.
2022-10-26 11:55:56 -04:00
Emmanuele Bassi
8f975d07f3 ci: Conform to Python's coding style
The check-missing-install-tag.py script breaks PEP8, and the style check
CI job complains about it.
2022-09-25 18:51:22 +01:00
Xavier Claessens
497f151810 ci: Check that all installed files have a tag 2022-09-20 11:30:19 -04:00
Marco Trevisan (Treviño)
d6a378afa7 run-docker: Do not require sudo if the user is part of docker group 2022-09-15 03:16:52 +02:00
Marco Trevisan (Treviño)
3ddfb10b0b ci: Generate Cobertura XML and use it to feed gitlab for MR integration
gitlab has coverage integration in MRs, but we need a cobertura
formatted XML files (each must be less than 10 MB [1]) to show it, so
generate it using a python script and inform gitlab about it.

See https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html

[1] https://gitlab.com/gitlab-org/gitlab/-/issues/328772#note_840831654
2022-09-15 03:16:52 +02:00
Marco Trevisan (Treviño)
29cf6b2b65 ci: Install lcov-cobertura and cobertura-split script in coverage images
These are needed to be able to get cobertura reports in gitlab.
2022-09-15 03:12:08 +02:00
Matthias Clasen
7526f77e9a ci: Improve style check script
Sync with changes from GTK:

- Set a git config to work around security
  improvements in recent git.
- Only fetch the two branches we want to compare
  for the style check.
- Use the existing git merge-base command to find
  their common ancestor.
2022-09-09 20:23:44 -04:00
Aleksei Rybalkin
8d5a44dc8f replace pcre1 with pcre2 2022-07-12 11:46:34 +00:00
Philip Withnall
03ea524188 ci: Add libpcre2 dependencies and subproject
This is in preparation for porting `GRegex` to libpcre2, which is
happening in !2529. It’s a big port, though, and specially rebuilding
the CI images to add libpcre2 for it is a pain.

Add libpcre2, and then !2529 can drop the old libpcre dependencies when
the port lands.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1085
2022-06-27 15:53:55 +01:00
Philip Withnall
5e00b30a29 ci: Add gdb to some CI images
This will be useful in general, for manually debugging failures if we
need (without having to rebuild the CI images to do so).

It will also be useful for the `assert-msg-test` test, which is being
reworked in !2767.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #1434
2022-06-27 15:53:55 +01:00
Philip Withnall
b3f49d08a6 build: Move gvdb to a subproject
Rather than carrying the copylib around inside GLib, which is a pain to
synchronise and affects our code coverage statistics.

This requires updating the CI images to cache the new subproject,
including updating the `cache-subprojects.sh` script to pull in git
submodules.

It also requires adding `gioenumtypes_dep` to be added to the
dependencies list of `libgio`, since it needs to be build before GVDB as
it’s pulled in by the GIO headers which GVDB includes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2603
2022-06-16 10:12:07 +01:00
Marc-André Lureau
a8058cb12c gitlab-ci: left-over from junit cleanup
This should have been part of GNOME/glib!2686 (sorry!)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-25 15:27:37 +02:00
Marc-André Lureau
c8ce3786d7 gitlab-ci: remove meson-junit-report.py conversion
meson supports JUnit XML format since 0.55.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-25 14:10:35 +02:00
Philip Withnall
9817ae71d9 ci: Move clang-format-diff.py into CI directory
There’s no point in having it in the root directory when it’s only
really used for CI. It just clutters up the root.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:43:27 +01:00
Xavier Claessens
3a8622c9e1 ci: Update to latest Android NDK
Move the NDK in the common Fedora image, better have 1 bigger image that
gets cached into runners. It is also less images to maintain.

Fixes: #2605
2022-05-11 10:52:19 +01:00
Philip Withnall
f2d24f0b13 ci: Bump CI image versions for new Meson and libpcre versions
As per the previous few commits.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +01:00
Philip Withnall
1bdce46399 build: Bump Meson dependency to 0.60.0
As per the new policy in `docs/meson-version.md`, we can now bump the
dependency.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:01:44 +01:00
Philip Withnall
8e295e23a5 build: Move lcovrc file to root so it’s picked up by Meson
Move the lcovrc file to the root of the project, so that it’s picked up
by Meson when running `ninja coverage` locally.

See https://github.com/mesonbuild/meson/issues/4628

This won’t affect the code coverage run on the CI, since that explicitly
used the lcovrc file already.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-28 11:57:45 +01:00
Philip Withnall
6aa210e6af gio: Remove fam file monitor support
libgamin was last released in 2007 and is dead
[upstream](https://gitlab.gnome.org/Archive/gamin). Distributions may
still ship it (although Fedora no longer does), but we want people to
use inotify on Linux since it’s actively supported.

BSDs use kqueue. Windows uses win32filemonitor.

FAM might still be used on some commercial Unix distributions, but there
are no contributors from those distributions, and certainly no CI for
them to prevent regressions.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #2614
2022-03-23 15:41:54 +00:00
Philip Withnall
46c6ed231e ci: Update Android NDK image to Fedora 34
Don’t take the opportunity to add support for Android API 31 or update
the version of the Android NDK we’re using to r23b, though, as I
couldn’t quickly get that to work and ran out of time.

Bumping the Fedora version will at least reduce our CI repository disk
usage through sharing the base image.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Helps: #2605
2022-03-18 11:27:02 +00:00
Philip Withnall
4e7b76344c ci: Update mingw image to Fedora 34
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-18 10:38:41 +00:00
Philip Withnall
a9b68f1f9b ci: Update Coverity image to Fedora 34 and latest Coverity Scan tool
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-18 10:32:08 +00:00
Philip Withnall
20b6bda9a2 ci: Update the Fedora CI image to Fedora 34
This is the oldest still-supported version of Fedora.

It no longer ships gamin.

This should fix the installed-tests, which rely on version 0.19 of
python-dbusmock. Fedora 33 only had 0.18.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-08 13:07:57 +00:00
Philip Withnall
5d40604fa7 ci: Drop Android API 21 build jobs
API version 21 was used for Android 5.0
(https://developer.android.com/studio/releases/platforms#5.0), which is
no longer supported
(https://en.wikipedia.org/wiki/Android_version_history).

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 14:16:11 +00:00
Philip Withnall
c540c6a80e ci: Add link to Coverage output at end of coverage job
This should make it a bit easier to find the coverage report, rather
than digging through the job artifacts.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-01 11:08:22 +00:00
Loïc Le Page
097cd3a16b Add Windows native static build using msvc to CI 2022-01-26 12:07:46 +01:00
Philip Withnall
93bde24c34 ci: Upgrade to clang-format-11 from clang-format-7
`clang-format-11` is now what’s available in our Debian Stable CI image.

This should fix failures in the `style-check-diff` job.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-11-23 13:13:56 +00:00
Philip Withnall
f432ebf7d5 ci: Add -fstack-protector to mingw64 cross file
See the comment in the code. As suggested by Nirbheek:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2287#note_1285058.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-13 10:44:23 +01:00