Commit Graph

249 Commits

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