Commit Graph

264 Commits

Author SHA1 Message Date
Philip Withnall
c428d6e673 ci: Build and tar the platform specific documentation
Enable the msys2-mingw32 CI job for merges, just like the fedora-x86_64
job is. The pair of them can then build the platform specific GIR and
documentation files.

The `download-reference.sh` script in the `docs-gtk-org` branch of GTK
can then download the docs as an artifact from the latest GLib build of
`main`, and publish them on docs.gtk.org, as is currently done for the
platform agnostic documentation.

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

Helps: #3037
2024-02-12 17:54:35 +00:00
Philip Withnall
d426f33cf3 ci: Build and tar libgirepository documentation
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-02-12 17:01:15 +00:00
Simon McVittie
e87db7dbf2 CI: Run all style/lint checks before failing
Even if we get warnings from the first lint check, we probably want to
see the warnings from later lint checks too, to reduce the number of
round-trips.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-08 00:18:23 +00:00
Simon McVittie
a7702505e0 CI: Extend submodule workaround to most jobs that run the test suite
Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-08 00:18:23 +00:00
Simon McVittie
d7601f7eed Incorporate some lint checks into meson test
This will make it easier and more obvious for developers to run them
locally: I'm sure I'm not the only developer who had assumed that
`.gitlab-ci/` is private to the CI environment and inappropriate (or
perhaps even destructive) to run on a developer/user system.

The lint checks are automatically skipped (with TAP SKIP syntax) if we
are not in a git checkout, or if git or the lint tool is missing. They
can also be disabled explicitly with `meson test --no-suite=lint`,
which downstream distributions will probably want to do.

By default, most lint checks are reported as an "expected failure"
(with TAP TODO syntax) rather than a hard failure, because they do not
indicate a functional problem with GLib and there is a tendency for
lint tools to introduce additional checks or become more strict over
time. Developers can override this by configuring with `-Dwerror=true`
(which also makes compiler warnings into fatal errors), or by running
the test suite like `LINT_WARNINGS_ARE_ERRORS=1 meson test --suite=lint`.

One exception to this is tests/check-missing-install-tag.py, which is
checking a functionally significant feature of our build system, and
seems like it is unlikely to have false positives: if that one fails,
it is reported as a hard failure.

run-style-check-diff.sh and run-check-todos.sh are not currently given
this treatment, because they require search-common-ancestor.sh, which
uses Gitlab-CI-specific information to find out which commits are in-scope
for checking.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-02-08 00:18:23 +00:00
Philip Withnall
3f4e6ddcd8 Merge branch 'thorough-tests-in-ci' into 'main'
build: Add thorough test setup

See merge request GNOME/glib!3838
2024-02-02 14:33:22 +00:00
Philip Withnall
ecc5275be9 ci: Temporarily disable --fatal-meson-warnings on Hurd 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>

Fixes: #3238
2024-01-30 14:30:42 +00:00
Philip Withnall
c89b282623 ci: Fix post-merge CI pipelines
Don’t allow the `pages` job to be run (even manually) on post-merge
pipelines. It’s not particularly useful, and GitLab doesn’t like having
a manual job with unsatisfied dependencies in a pipeline:
```
'pages' job needs 'coverage' job, but 'coverage' is not in any previous stage
'pages' job needs 'style-check-advisory' job, but 'style-check-advisory' is not in any previous stage
```

See https://gitlab.gnome.org/GNOME/glib/-/merge_requests/3847#note_1986044

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-01-25 20:31:34 +00:00
Philip Withnall
e04886aeb2 Merge branch 'optional-ci-runs' into 'main'
ci: Add ability to run manually some specific jobs

See merge request GNOME/glib!3847
2024-01-25 20:24:53 +00:00
Marco Trevisan (Treviño)
99c8f7fafc ci: Run docs and coverity builds only on schedules in default branch
Also allow running them manually if required, but this still needs to be
done from a GNOME/glib:main pipeline.
2024-01-25 17:56:36 +01:00
Marco Trevisan (Treviño)
11616b0145 ci: Allow to run jobs that only run in origin repos manually 2024-01-25 17:56:36 +01:00
Marco Trevisan (Treviño)
2a532e19cd ci: Add ability to run manually some specific jobs
In some merge requests there are bits (such as memory leaks) that we may want
to test before merging and that the schedules will run them.

As per this add a rule to make them manual, and apply it to some jobs.
2024-01-25 17:46:59 +01:00
Emmanuele Bassi
74a584e25a Merge branch 'fix-dist-docs' into 'main'
ci: Fix tarballing the docs on dist

See merge request GNOME/glib!3803
2024-01-22 10:45:15 +00:00
Philip Withnall
16b93f92fa ci: Run the thorough test setup on a weekly schedule
Merge it with the `G_DISABLE_ASSERT` test run, to avoid tying up another
test runner for no particular benefit.

By running the thorough tests regularly, we’ll hopefully avoid them
atrophying again (see the previous few commits full of fixes to them).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-01-18 17:45:00 +00:00
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