Commit Graph

38 Commits

Author SHA1 Message Date
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
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
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
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
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
4b9ec32b26 ci: Remove some duplicate packages from an install list
This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-22 22:10:07 +01:00
Philip Withnall
afd8dde13f gdatetime: Fix incorrect alt-digits being used after changing locale
The alt-digits are loaded from `nl_langinfo()` in a `GOnce` section,
which means `nl_langinfo()` is not re-queried after the process changes
locale (if that happens).

So, change the `GOnce` to a mutex and store the locale of the alt-digits
alongside them. This will introduce contention when calling
`format_number()` is called, but how often are multiple threads trying
to format dates at the same time?

If this does get highlighted as a performance problem, the other
approach I considered was a `GPrivate` struct containing all the
locale-specific cached data. That comes at the cost of using a
`GPrivate` slot (although that’s only particularly expensive on Windows,
and the locale code is quite different for Windows, so perhaps that
could be avoided entirely). It does mean that all locale printing could
be lock-free and still safely update cached data on a locale change.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-22 22:10:07 +01:00
Philip Withnall
d96695fef9 fixup! ci: Upgrade CI images to the new oldest-supported OS versions
This was accidentally missed out of the above commit, due to pushing
a new version of the image to test, without also pushing the git branch.
2023-10-11 16:34:20 +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
13c3595363 ci: Upgrade CI images to the new oldest-supported OS versions
That means Debian Bookworm and Fedora 37.

Also rework the mingw Dockerfile to be based on the Fedora one, so that
the underlying layers can be shared. This should reduce the disk
consumption of the registry a little.

`.gitlab-ci.yml` has not been updated to use the new images in this
commit, as the images will be modified further in the following commit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2023-10-11 13:54:13 +01: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
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
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
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
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
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
1bba03672e ci: Update Fedora CI images to new oldstable (33)
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 16:29:31 +01:00
Philip Withnall
ef41cc28b4 ci: Ensure the machine-id is set on the Fedora CI image
Run `systemd-machine-id-setup` when creating the image, so that
`/etc/machine-id` is created with a valid ID. Since systemd isn’t
started when running the CI image with podman/Docker, it’s not created
otherwise. This causes some tests to fail.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-01 13:55:03 +00:00
Philip Withnall
74f1e58219 ci: Add python3-pip to Fedora dependencies
It’s needed to provide the `pip3` executable, which the `Dockerfile`
later uses.

Follow-up to !1464.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-05-22 09:32:44 +01:00
Bastien Nocera
62bffc294a ci: Update Fedora version to latest stable
This newer version of Fedora also includes a newer version of gtk-doc
that should satisfy the update dependency:
Dependency gtk-doc found: NO found '1.29' but need: '>=1.32'

See https://bodhi.fedoraproject.org/updates/FEDORA-2020-f93ef1b300
2020-05-07 11:13:57 +01:00
Bastien Nocera
4fe2c7ffdb ci: Update Fedora image before installing new items
This fixes some scriptlets crashes during package installation.
2020-02-04 17:28:07 +01:00
Bastien Nocera
6ff2a181bd ci: Install build deps for extra modules in Docker image
Rather than bringing build dependencies for gobject-introspection
and xdg-desktop-portal manually, install them in the Docker image.
2020-02-04 17:28:07 +01:00
Bastien Nocera
4aa14d5770 ci: Require some updated packages Fedora Docker image
Rather than installing those updates manually.
2020-02-04 17:28:07 +01:00
Xavier Claessens
47a20304bd ci: Update Meson to 0.52.1 in fedora docker
This is required to be able to build the doc. The debian docker is still
pinned to 0.49.2 which ensure we can build with both versions of meson.

Meson 0.52.0 warns about adding -Wall flag manually, we can remove that
because warning_level=1 (the default) option already implies it.
2020-01-29 15:54:53 +01:00
Xavier Claessens
b077c1403e ci: Cache subprojects in docker images 2020-01-15 21:36:57 -05:00
Xavier Claessens
8661d94c3e ci: Install some missing packages in fedora docker image 2020-01-15 21:36:57 -05:00
Bastien Nocera
c625c37dde ci: Remove python3{,-pip} from list of packages
Package python3-3.7.5-1.fc30.x86_64 is already installed.
Package python3-pip-19.0.3-3.fc30.noarch is already installed.
2019-11-27 13:23:12 +00:00
Bastien Nocera
fd4d68615f ci: Add sudo support for default Fedora docker user 2019-11-27 13:23:12 +00:00
Bastien Nocera
aa8908f469 ci: Update the Fedora docker to a supported version
Fedora 29 is only supported up until 2019-11-29, bump version to 30.
2019-11-27 13:23:12 +00:00
Bastien Nocera
d38d6bf8ea ci: Add gnome-desktop-testing to the Fedora docker image
With plans to run the installed-tests on Fedora soon.
2019-11-27 13:23:12 +00:00
Simon McVittie
3e517c0ab2 ci: Add libdbus development files to CI Docker images
We use these to test interoperability between libdbus and GDBus.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2019-10-21 16:45:14 +01:00
Philip Withnall
8d19b95bd8 ci: Add valgrind to fedora Docker image
It will be used in an upcoming commit.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #487
2019-09-02 14:16:33 +01:00
Emmanuele Bassi
14d2c4872e ci: Update Fedora's Docker image
Match the version of Meson we install with the one we require.
2019-07-24 13:08:06 +01:00
Emmanuele Bassi
ee9afb33af ci: Remove Android and MingW bits from the fedora Dockerfile
These live in their own Dockerfiles, now.
2019-04-30 18:22:44 +01:00
Emmanuele Bassi
d42a551e3e ci: Rename the Fedora Dockerfile
We're going to add more, so let's avoid collisions.
2019-04-30 15:37:31 +01:00