Commit Graph

300 Commits

Author SHA1 Message Date
Philip Withnall
f52a973a6e ci: Fix tarballing the docs on dist
The generated docs are discarded by `meson dist` after building the dist
tarball, so we need to compile them again. And they get generated in the
`_build` directory, not the source directory.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-01-04 17:41:30 +00:00
Philip Withnall
eda5bb386b ci: Temporarily disable --fatal-meson-warnings on FreeBSD CI
For the same reasons as in commit 71061fdcb3, but in this
case we can’t downgrade the version of Meson on the CI runner, so just
tell it to shut up instead.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-01-03 12:54:02 +00:00
Philip Withnall
bf133ec683 ci: Drop FreeBSD 12 CI runner as it’s EOL
It’s still going to be used on the `glib-2-78` branch because the
dependencies there are frozen, but since it’s EOL it can’t have
additional dependencies (like the Python `packaging` package) installed
for `main`, so let’s drop it. We have the FreeBSD 13 runner on `main`.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3740#note_1957840

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-01-03 12:43:48 +00:00
Philip Withnall
4bcf53a351 Revert "ci: Temporarily only run the FreeBSD 13 CI on a schedule"
This reverts commit 35ec6b6387.

The FreeBSD 13 CI runner now has the Python `packaging` package
installed, so should work again.

The FreeBSD 12 runner is EOL so can’t have that package installed, so
will be dropped from GLib `main` in the next commit.

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3740#note_1957840
2024-01-03 12:43:44 +00:00
Philip Withnall
020ebe42f9 build: Change default for -Dman-pages from disabled to auto
Previously, `-Dman=false` was the default, because the generated man
pages were shipped in the distribution tarball already, so the option
actually mostly controlled whether to *re*build them.

The generated pages are no longer shipped in the tarball (and probably
haven’t been since the port to Meson, though I haven’t checked), so it
makes sense to change the default to encourage building the man pages if
the right tooling (`rst2man`) is available.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2023-12-21 16:13:03 +00:00
Philip Withnall
031e65808d docs: Port the man pages from DocBook to reStructuredText
So they are consistent with the way we’re building man pages in other
projects, and because some people are allergic to XML.

This changes the build-time dependencies from `xsltproc` to `rst2man`,
and also takes the opportunity to change the `-Dman` Meson option from a
boolean to a feature (so you should use `-Dman-pages={enabled,disabled}`
now, rather than `-Dman={true,false}`).

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

Helps: #3037
2023-12-21 13:34:48 +00:00
Philip Withnall
6826d21743 ci: Ensure man pages are built alongside docs
Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #3037
2023-12-18 14:52:39 +00:00
Philip Withnall
5cf7af694a ci: Update docs build for the release job
Not that this job is particularly maintained at the moment, but at least
try to keep it up to date.

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

Helps: #3037
2023-12-18 14:43:36 +00:00
Philip Withnall
2a1be27431 ci: Run the fedora CI job on merges as well as branches
Since it now has to build the docs (and code coverage) for `main`, that
needs to happen after branches are merged.

Other jobs remain not-run on merges.

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

Helps: #3037
2023-12-18 14:43:36 +00:00
Philip Withnall
5400094ab0 ci: Build docs artifacts for deployment to docs.gtk.org
The actual deployment will be done by
https://gitlab.gnome.org/GNOME/gtk/-/blob/docs-gtk-org/; it pulls the
most recent artifact zip from glib.git.

This ensures that only one project/job/branch has push access to the
website.

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

Helps: #3037
2023-12-18 14:43:36 +00:00
Philip Withnall
35ec6b6387 ci: Temporarily only run the FreeBSD 13 CI on a schedule
Rather than on every commit, because the CI runner is currently broken:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3740#note_1935427.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2023-12-12 16:58:27 +00:00
Philip Withnall
78c94d81ed ci: Build with introspection enabled
In most CI builds. (Not all of them, though, so we can also test the
build works with it disabled.)

This is needed for the upcoming libgirepository tests, as they need some
GIR files to test against.

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

Helps: #3155
2023-12-12 16:58:26 +00:00
Philip Withnall
71061fdcb3 ci: Re-add explicit Meson version to Alpine CI image
Alpine 3.19 ships with Meson 1.3.0, which has broken handling of File
objects and their paths. This causes (as far as I can tell)
un-work-around-able breakage of GLib’s build.

See https://github.com/mesonbuild/meson/issues/5273#issuecomment-1851811417

That should be fixed in Meson 1.4.0, but that might not be released for
a while. Because we’re here to test GLib, not Meson, let’s pin the Meson
version in the Alpine CI image to 1.2.3, which we know works and is
reasonably up to date (and is what the other CI images use).

Fixes this CI failure: https://gitlab.gnome.org/GNOME/glib/-/jobs/3361388

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2023-12-12 11:27:03 +00:00
Pablo Correa Gómez
e07294e569
ci: update alpine CI container to 3.19
And be more specific with version just in case.
2023-12-08 17:27:06 +01:00
Philip Withnall
5a273556df ci: Install correct version of Meson on Alpine CI image
The `latest` Alpine release contains Meson 1.1.0, but GLib depends on
1.2.0.

This should fix https://gitlab.gnome.org/GNOME/glib/-/jobs/3343347

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2023-12-05 15:55:11 +00:00
Philip Withnall
c40fa821b8 Merge branch 'python3.12-remove-distutils' into 'main'
Switch from the Python distutils module to the packaging module

Closes #3134

See merge request GNOME/glib!3740
2023-12-05 15:50:15 +00:00
Jordan Williams
6ef967a0f9 Switch from the deprecated distutils module to the packaging module
The distutils module was removed in Python 3.12.
2023-12-05 14:18:10 +00:00
Philip Withnall
e8edaeeb87 build: Rename -Dgtk_doc option to -Ddocumentation
Because the documentation is no longer built using gtk-doc.

Keep the old option around, but deprecated.

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

Helps: #3037
2023-11-29 10:26:37 +00:00
Philip Withnall
df4aea7620 gdatetime: Add support for %E modifier to g_date_time_format()
The `%E` modifier causes dates to be formatted using an alternative era
representation for years. This doesn’t do anything for most dates, but
in locales such as Thai and Japanese it causes years to be printed using
era names.

In Thai, this means the Thai solar calendar
(https://en.wikipedia.org/wiki/Thai_solar_calendar). In Japanese, this
means Japanese era names
(https://en.wikipedia.org/wiki/Japanese_era_name).

The `%E` modifier syntax follows what’s supported in glibc — see
nl_langinfo(3).

Supporting this is quite involved, as it means loading the `ERA`
description from libc and parsing it.

Unit tests are included.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>

Fixes: #3119
2023-11-28 19:32:02 +00:00
Philip Withnall
eb189bcec0 ci: Make the Alpine CI name more consistent
The image uses `alpine:latest`, so let’s drop the ‘stable’ moniker. This
also makes the container registry ID match the Dockerfile name.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2023-11-28 11:51:30 +00:00
Pablo Correa Gómez
8901ffeffe
ci: add muslc CI 2023-11-12 15:39:14 +01:00
CaiJingLong
7b80f73d29 fix: about libproc.h and PROC_PIDLISTFD_SIZE 2023-11-06 14:46:52 +00:00
Philip Withnall
6ab8062dbb Merge branch 'hurd-ci-fix' into 'main'
ci: Remove .build-linux from Hurd CI scheduled job

See merge request GNOME/glib!3665
2023-11-01 15:20:23 +00:00
Philip Withnall
24a3e728ce build: Bump Meson dependency to 1.2.0
And update all the CI builds to use the latest micro release from that
series, 1.2.3.

This version bump means we can:
 - Drop some backwards-compatibility Meson checks
 - Fix a periodic CI failure caused by a now-fixed Meson bug
   (https://github.com/mesonbuild/meson/pull/10633)

It’s in line with our [Meson version policy](./docs/meson-version.md),
as Meson 1.2.1 is available in
[Debian Trixie](https://packages.debian.org/source/trixie/meson) and the
[freedesktop SDK](c95902f2ed/elements/components/meson.bst).

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-10-24 17:00:24 +01:00
Philip Withnall
00f0718bd7 ci: Remove .build-linux from Hurd CI scheduled job
It’s intended to be used with Linux Docker images, and it assumes a
certain filesystem layout of the image being run (in particular, that it
has a `$HOME/subprojects` directory pre-populated with the subprojects
for glib.git). That’s not the case for Hurd, which is running on a
dedicated runner (not using Docker), so drop this include.

This should fix the CI failure here:
https://gitlab.gnome.org/GNOME/glib/-/jobs/3223275

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-10-24 16:35:30 +01:00
Damien Zammit
f25a9ca10c Initial test of Hurd CI - (run_tests.sh status ignored) 2023-10-18 23:33:04 +00:00
Luca Bacci
e56bb89b83 CI: Remove workaround for Python in MSYS2 jobs
It was added in 13fe2e0c, but it's now unnecessary since
the issue has been fixed.

See https://github.com/msys2/MINGW-packages/issues/17415
2023-10-16 15:02:18 +02:00
Philip Withnall
fd7396ee29 ci: Add an additional git config to avoid permissions warnings
And tidy up the existing one for consistency.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-11 17:38:30 +01:00
Matthias Clasen
39e9ef54be docs: Add initial support for using gi-docgen for docs
The files here are copied from the docs-gtk-org
branch of gtk.

This adds gi-docgen to the CI Dockerfiles and ensures the new versions
(including the OS upgrades from the previous commit) are used during CI.

Helps: #3037
2023-10-11 14:01:28 +01:00
Philip Withnall
9dd59ba8ad ci: Ignore a ‘dubious ownership’ warning when updating submodules
It’s irrelavent.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-11 14:01:28 +01:00
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
84f45cd694 ci: Further fix to pages CI job
Follow-up to e234a4496e to remove the old
`only: main`, which was overriding the changes from that commit.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-08-14 11:00:15 +01:00
Philip Withnall
e234a4496e ci: Only run pages CI job on scheduled job runs
Since commit b9b7816e5a, the `pages` job
will still try to be run on `main` after an MR is merged, but will fail
because it depends on `coverage` and `style-check-advisory`, which are
no longer run on `main` after a merge.

See https://gitlab.gnome.org/GNOME/glib/-/pipelines/560680 for an
example failure.

Instead, make the `pages` job only run at the end of a scheduled CI run.
Its dependent jobs will have run then. This means that the ‘canonical’
code coverage report at
https://gnome.pages.gitlab.gnome.org/glib/coverage/ will be updated once
a week, rather than after every merge into `main`.

Signed-off-by: Philip Withnall <philip@tecnocode.co.uk>
2023-08-14 10:20:43 +01:00
Philip Withnall
65e7a10d2a Merge branch 'macos_ci' into 'main'
interim solution for macOS CI

See merge request GNOME/glib!3503
2023-08-12 22:52:57 +00:00
Philip Withnall
1de94bdd6f Merge branch 'disable-post-merge-ci' into 'main'
ci: Don’t run pipeline after merging a MR

See merge request GNOME/glib!3432
2023-08-12 19:23:37 +00:00
René de Hesselle
439204ed7d Re-enable macOS CI on a new self-hosted runner
Allow two more tests to fail on macOS for the time being:
https://gitlab.gnome.org/GNOME/glib/-/issues/3069
https://gitlab.gnome.org/GNOME/glib/-/issues/3070
2023-08-11 19:33:19 +02:00
Philip Withnall
840d8c3457 ci: Manually fetch submodules for style-check CI jobs
This works around GitLab issue
https://gitlab.com/gitlab-org/gitlab/-/issues/391756, which manifests as
the error message:
```
Updating/initializing submodules...
Submodule 'subprojects/gvdb' (https://gitlab-ci-token:[MASKED]@gitlab.gnome.org/GNOME/gvdb.git) registered for path 'subprojects/gvdb'
Synchronizing submodule url for 'subprojects/gvdb'
fatal: not a git repository: subprojects/gvdb/../../.git/modules/subprojects/gvdb
```
on between 1/10 to 1/2 CI runs.

See the GitLab issue for a writeup.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-07-06 16:32:44 +01:00
Philip Withnall
ef6e8939aa ci: Disable the macOS CI
It’s almost a complete waste of time at the moment. For several reasons,
jobs flakily fail on it more often than they succeed. It’s wasting
resources, slowing down development and making people quite frustrated.

 * https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/627
 * https://gitlab.gnome.org/GNOME/glib/-/issues/2949
 * https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3462 and related
   test failures

Nobody has stepped up to deal with the test or CI runner flakiness, or
generally maintain this CI runner. If someone does care about preventing
regressions for GLib on macOS, and can put time into making the CI
reliable, then this commit can be reverted.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-06-01 14:51:21 +01:00
Philip Withnall
b9b7816e5a ci: Don’t run pipeline after merging a MR
MRs are already tested in CI before merge, so it’s redundant and a waste
of resources to test them again after merge.

In the rare case where something breaks post-merge (perhaps because
several MRs have been tested individually and merged, but interact with
each other badly), that’ll be caught in the weekly scheduled CI run.

YAML inspiration from https://stackoverflow.com/questions/63893431/gitlab-run-a-pipeline-job-when-a-merge-request-is-merged

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-05-15 18:05:10 +01:00
Philip Withnall
f9bfc12b6e ci: Disable the Coverity CI job
It’s not produced anything but false positives for several years now,
and it would be better to save the CI/analysis/triage resources and
instead focus on `scan_build` reports, which generally seem to be more
useful.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-04-26 14:30:20 +01:00
Philip Withnall
13fe2e0c79 ci: Enable JIT debugging on msys2-* CI jobs
Suggested by Christoph Reiter, this is a workaround for random Python
crashes in Meson which only appear on this platform.

It’s being tracked upstream at
https://github.com/msys2/MINGW-packages/issues/11864, but unfortunately
it seems hard to fix.

Work around the issue the same way that Meson have in their CI, by
enabling JIT debugging. See
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3280#note_1678973.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-02-21 11:52:24 +00: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
Luca Bacci
c31eeb0b64 Enable Python UTF-8 mode for Windows CI jobs
It will become the default in Python 3.15 and makes things
more consistent across Unix and Windows platforms.

Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/2915
2023-02-15 19:28:46 +01:00
Philip Withnall
e6132f2322 Revert "ci: Temporarily only run the FreeBSD 13 CI on a schedule"
This reverts commit 163ebdc6c2.

The FreeBSD CI runner is back again.

See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/601#note_1658477
2023-02-06 14:58:47 +00:00
Philip Withnall
163ebdc6c2 ci: Temporarily only run the FreeBSD 13 CI on a schedule
Rather than on every commit, because the CI runner is currently broken:
https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/601.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-02-03 00:13:53 +00:00
Nirbheek Chauhan
45c2f8c18e ci: Update images to cache wrap downloads
We aren't allowed to download wraps in the build, and we need them on
Android and MinGW
2022-12-31 05:13:10 +05:30
Philip Withnall
ffbb1a34d4 Revert "ci: Temporarily only run the FreeBSD 13 CI on a schedule"
This reverts commit 4f5bd5439e.

The FreeBSD CI runner is back!

See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/594#note_1620930
2022-12-19 13:59:47 +00:00
Philip Withnall
4f5bd5439e ci: Temporarily only run the FreeBSD 13 CI on a schedule
Rather than on every commit, because the CI runner is currently broken:
https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/594.

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

Helps: !3136
2022-12-16 12:34:03 +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
Xavier Claessens
6dd5c5002a Merge branch 'wip/pwithnall/meson-0.64' into 'main'
build: Bump Meson dependency to 0.64.0

See merge request GNOME/glib!3077
2022-11-23 11:48:51 +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
4ff6ecbeff build: Move -Wnonnull flag to meson.build
It should be enabled in all builds, not just CI builds. Otherwise
developers might miss it locally.

This updates commit f11b96f255.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-18 13:33:20 +00:00
Philip Withnall
482e9cd9e3 Merge branch 'reuse-regressions-ci' into 'main'
ci: Add a CI check for REUSE-compliant licensing/copyright headers

See merge request GNOME/glib!3051
2022-11-08 16:30:12 +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
e2b9e28ece Merge branch 'wip/3v1n0/meson-fix-tests-binary-dependencies' into 'main'
test/meson: Add tests dependencies on built programs, libraries and modules

See merge request GNOME/glib!3015
2022-11-08 12:30:53 +00:00
Ray Strode
f11b96f255 ci: Build with -Wnonnull
-Wnonnull is sort of fickle and it's an option a lot of consumers
of glib use.

This commit makes sure it gets used on linux during CI as well, so
we can catch compat problems before they hit our users.
2022-11-04 14:06:48 -04:00
Philip Withnall
ea0e9bf1f1 ci: Rename style-check-diff to style-check-advisory
To better reflect its purpose.

This will also help distinguish it from a job being added in a following
commit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-02 16:49:51 +00:00
Marco Trevisan (Treviño)
c6eddf897b ci: Do not use installed tests in debian-stable build
Setting installed_tests option enforces various test files to be
installed, this causes meson to build tools that might have not built
otherwise but that are still required for testing.

Also, disabling installed tests lead to slightly different code paths
when it comes to using test test files.

So, disable it for debian so that we can ensure that at test time we
have set all the dependencies between test programs and the used
resources (that can be libraries, external programs or modules).
2022-11-01 01:56:27 +01: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)
9e649debbe meson: Use default test multiplier to define timeouts
So that we don't have to care about the default, being always set to 1m
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)
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
Marco Trevisan (Treviño)
f8fa9d3a2b ci: Open issues when scheduled pipelines fails
It's hard to track failures on scheduled pipelines, so make gitlab open
an issue for us if that happens.
2022-10-31 02:51:40 +01:00
Philip Withnall
424cf3a966 ci: Move shellcheck/black/flake8 checks to a new CI job which can fail
We were regressing on Python style too often. Since Python code style is
a lot easier to enforce than C code style, split it (and the shellcheck
checks) out from `style-check-diff` into a new CI job which is allowed
to fail the pipeline.

Only trigger it when .sh or .py files have changed, which should reduce
resource consumption.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-10-27 10:09:58 +01:00
Marco Trevisan (Treviño)
782625bd26 ci: Do not store docs artifacts
This was discussed in a previous MR [1], but it apparently went in
during rebase

[1] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2820#note_1502207
2022-10-19 15:52:22 +02:00
Philip Withnall
b321ba1d1f Merge branch 'ignore-dirs-leaks+valgrind-ci' into 'main'
glib.supp: Ignore gutils leaks for user and system dirs

Closes #333

See merge request GNOME/glib!2897
2022-10-10 12:01:49 +00: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)
22f5016303 ci: Expose the coverage report as link in the MR's
It's making handier to check how changes are tested.
2022-09-15 01:44:29 +02:00
Marco Trevisan (Treviño)
4432f78407 CI: Do not allow failures in the valgrind job
We're no more leaks, so we can just be more restrictive at it, in order
to find new problems easier.
2022-09-14 22:03:00 +02:00
Marco Trevisan (Treviño)
74f01defd4 ci: Increase the valgrind job meson test timeout
There are some test failing because there's not enough time to complete,
so let's give them some more time.
2022-09-02 21:21:34 +02:00
Marco Trevisan (Treviño)
99c2b4e499 ci: Setup submodules and subprojects before building on dist
Also handle a permission issue.
2022-07-12 20:25:04 +02:00
Philip Withnall
e6af2d3662 ci: Specify -Wno-overlength-strings on macOS
This disables the following warning, which was causing CI failures on
macOS when building the libpcre2 subproject:
```
../subprojects/pcre2-10.40/src/pcre2_error.c:66:3: error: string literal of length 4380 exceeds maximum length 4095 that ISO C99 compilers are required to support [-Werror,-Woverlength-strings]
```

We don’t want to explicitly rely on using overlength strings in GLib,
which is why this change is a `CFLAGS` in the CI configuration, rather
than setting a project-level argument in `meson.build`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-07-12 14:16:23 +01:00
Aleksei Rybalkin
8d5a44dc8f replace pcre1 with pcre2 2022-07-12 11:46:34 +00:00
Philip Withnall
dc2c769d5c ci: Ensure git submodules are updated before running macOS CI
Since the macOS CI jobs are run on a machine which isn’t using a
pre-made container image, we can’t ship a cached version of the
subproject, so it has to be pulled as a git submodule.

GitLab doesn’t do that by default unless you set
`GIT_SUBMODULE_STRATEGY` to something other than `none`.

See https://docs.gitlab.com/ee/ci/git_submodules.html

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-30 01:31:02 +01: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
46a6f49066 Merge branch 'meson-add-test-setup' into 'main'
build: Use add_test_setup() to allow tests to be run under valgrind

See merge request GNOME/glib!2752
2022-06-20 11:09:55 +00:00
Philip Withnall
f5baecdb36 build: Use add_test_setup() to allow tests to be run under valgrind
This means we can specify the standard options for testing GLib under
valgrind consistently, so that developers can use `meson test
--setup=valgrind` to run them.

Port the existing valgrind CI to use them (this will not change its
functional behaviour).

Suggested by Marco Trevisan at
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2717#note_1478891.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-20 11:54:10 +01:00
Eli Schwartz
24ec80cfb4
meson: simplify iconv lookups using Meson's builtin dependency lookup
iconv is complicated to look up. That complexity now resides in
Meson, since 0.60.0, via a `dependency('iconv')` lookup, so use that
instead.

No effort is made to support the old option for which type of iconv to
use. It was a false choice, because if only one was available, then
that's the only one you can use, and if both are available, the external
iconv shadows the builtin one and renders the builtin one unusable,
so there is still only one you can use.

This meant that when configuring glib with -Diconv=libc on systems that
had an external iconv, the configure check would detect a valid libc
iconv, try to use it, and then fail during the build because iconv.h
belongs to the external iconv and generates machine code using the
external iconv ABI, but fails to link to the iconv `find_library()`.
Meson handles this transparently.
2022-06-16 12:04:59 -04:00
Philip Withnall
594a70bf5f Merge branch 'gvdb-as-wrap' into 'main'
build: Move gvdb to a subproject

See merge request GNOME/glib!2733
2022-06-16 09:29:43 +00: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
Philip Withnall
385ad59f41 Revert "ci: Temporarily disable macOS CI runner until it’s fixed"
This reverts commit e3673202e2.

As per
https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/558#note_1465542,
the macOS CI runner is now back online.
2022-06-07 18:26:55 +01:00
Philip Withnall
d4b882fac2 ci: Try reducing FD soft limit to fix valgrind tests
They are [currently
failing](https://gitlab.gnome.org/GNOME/glib/-/jobs/2032874) with the
error:
```
  1/273 glib:glib / array-test                                  FAIL             0.19s   killed by signal 11 SIGSEGV
05:04:16 G_DEBUG=gc-friendly G_TEST_BUILDDIR=/builds/GNOME/glib/_build/glib/tests MALLOC_CHECK_=2 MALLOC_PERTURB_=133 G_TEST_SRCDIR=/builds/GNOME/glib/glib/tests valgrind --tool=memcheck --error-exitcode=1 --track-origins=yes --leak-check=full --leak-resolution=high --num-callers=50 --show-leak-kinds=definite,possible --show-error-list=yes --suppressions=/builds/GNOME/glib/tools/glib.supp /builds/GNOME/glib/_build/glib/tests/array-test
----------------------------------- output -----------------------------------
stderr:

valgrind: m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed.
------------------------------------------------------------------------------
```

I’m not really sure what that means, but `show-execution-environment.sh`
says the FD soft limit is set to 524288 on the CI machine. That seems
high; on my machine it’s only 1024 (and the valgrind tests pass). So
let’s try 1024.

The valgrind CI has been failing since we most recently upgraded the CI
image to a new version of Fedora.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-01 14:57:22 +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
5efbd51ea8 Merge branch 'cleanup-root' into 'main'
Various updates to documentation and misc files in the root directory

See merge request GNOME/glib!2649
2022-05-17 12:58:25 +00:00
Philip Withnall
e3673202e2 ci: Temporarily disable macOS CI runner until it’s fixed
The runner machine is offline and there is no ETA on when it will be
back, so disable the CI job which uses it for now so that pipelines
can proceed.

See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/558

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-16 13:01:36 +01:00
Philip Withnall
5129750884 tools: Move glib.supp to tools directory
This tidies up the root directory a bit more.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:11:01 +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
cc79d5bc7f ci: Explicitly specify Python installation path on Windows
Meson used to try and guess at the Python path. While this worked fine
for GLib before, it probably didn’t work 100% for other projects, so
Meson have made it an explicit option.

Set that option with the Python path used on the Windows CI machines.

This fixes a Meson warning with Meson >0.60.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +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
25ab87d8e5 build: Drop checks and workarounds for older Meson versions
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:01:44 +01:00
Sebastian Dröge
56531a7ae6 Merge branch 'combine-ci-jobs' into 'main'
ci: Combine style-check-diff and check-todos jobs into one

See merge request GNOME/glib!2598
2022-04-29 08:03:49 +00: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
403edad934 ci: Combine style-check-diff and check-todos jobs into one
They are functionally quite similar, and combining them saves around 1
minute of CI runner time per pipeline, which is a nice saving for very
little downside.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-08 12:37:08 +01:00
Philip Withnall
f68943dcf2 ci: Expire CI artifacts after 1 week
The default is 30 days, but we don’t need them around that long. This
should free up some disk space on the GitLab/CI runner systems.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-06 12:54:54 +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