Commit Graph

320 Commits

Author SHA1 Message Date
Philip Withnall
f582a0dd9c
ci: Fix output paths for docs tarballs in dist-job
Otherwise they’re not picked up as artifacts, and hence are basically
lost.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-12-11 15:39:40 +00:00
Philip Withnall
fe1ff50e5c
ci: Run dist-job on a schedule as well as on tags
This will allow us to test that it actually still works, which is
important for being able to make releases, because once we push a tag,
there’s no going back. The release can’t happen if `dist-job` then fails
on that tag.

Sigh.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-12-11 15:38:46 +00:00
Philip Withnall
cc627ea0df
ci: Clear dependencies for dist-job
Otherwise it never executes, because it’s waiting patiently for zero
dependencies to complete. 🤦

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-12-11 15:37:52 +00:00
Philip Withnall
67fb5a94b6
ci: Enable -Dintrospection for dist builds
This means that the documentation can actually be generated, which was
broken before. Building the documentation requires `enable_gir`.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-12-11 15:36:00 +00:00
Philip Withnall
7b5ee8cb75
ci: Slightly improve quoting of variables
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-12-11 14:26:50 +00:00
Jordan Petridis
b7abe843e4
ci: Add release component to automate tarball publishing
Publishing the dist tarball to download.gnome.org is now automated.

See [1]

[1] https://gitlab.gnome.org/Teams/Websites/handbook.gnome.org/-/merge_requests/83/
2024-12-11 15:42:44 +02:00
Philip Withnall
628d623b57
ci: Ensure all variables are quoted in .gitlab-ci.yml
Don’t want any argument escaping problems, given that some of these
variables can be controlled by unprivileged users who are running CI
jobs.

The except:variables and rules:if lines don’t need to be quoted because
they are [GitLab CI/CD Variable
Expressions](https://docs.gitlab.com/ee/ci/jobs/job_rules.html#cicd-variable-expressions)
rather than bash script.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-12-08 23:57:34 +00:00
Simon McVittie
55a1d3af0d Revert "CI: Rebuild a slightly newer version of ninja for debian-stable-i386"
The Debian 12.8 point release included a version of ninja that is
equivalent to the one we were building from source here.

This reverts commit dbd7280c5e.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-11-19 09:47:58 +00:00
Simon McVittie
dbd7280c5e CI: Rebuild a slightly newer version of ninja for debian-stable-i386
The version of ninja-build in Debian 12 isn't built with large file
support, and therefore is not compatible with filesystems with large
inode numbers. Unfortunately, that includes the overlay mounts used by
Docker.

I've suggested a stable update for this as part of the next Debian 12
point release. Until/unless that happens, we can build our own.

Signed-off-by: Simon McVittie <smcv@debian.org>
2024-10-19 17:45:51 +01:00
Simon McVittie
20d54ba5f1 CI: Add a job that runs on 32-bit Debian stable
This is enough to detect most ILP32-specific issues. We previously
relied on 32-bit Windows to catch those, but the toolchains we're using
have increasingly minimal support for 32-bit Windows.

The combination of fedora-x86_64 and debian-stable-i386 between them
should cover nearly everything that debian-stable-x86_64 does, so demote
debian-stable-x86_64 to be run on a schedule or manually.

Helps: https://gitlab.gnome.org/GNOME/glib/-/issues/3477
Signed-off-by: Simon McVittie <smcv@debian.org>
2024-10-19 15:42:40 +01:00
Chun-wei Fan
85d8a618ad CI: Add CI job for VS2019 ARM64 builds
We need to write a Meson cross-compilation file on the fly here, hence the
additions in test-msvc.bat to set up the paths.

Like the 32-bit VS2019 CI job this is only run manually or weekly.
2024-10-18 14:58:53 +08:00
Chun-wei Fan
cba1d820d9 CI: Only run the VS2019-x86 CI job weekly or on request
As per suggested by Philip, as the Visual Studio CI jobs are the slowest to
be picked up and to be completed.
2024-10-07 14:56:56 +08:00
Chun-wei Fan
c4799982d6 CI: Add a 32-bit Visual Studio 2019 config
This way, we can continue to test whether 32-bit builds continue to work
with Visual Studio builds. Note that this uses the x64-to-x86 cross compiler.
2024-10-07 14:56:56 +08:00
Chun-wei Fan
0f0d5df4e5 CI: Use Visual Studio 2019 for the MSVC CI
...and add ability to select target platform for calling vcvarsall.bat,
so that we can accomodate 32-bit builds and possibly ARM64 builds in the
CI if we need to.
2024-10-07 14:56:55 +08:00
Philip Withnall
7f8f0842d0 Merge branch 'wip/pwithnall/reenable-freebsd-fatal-warnings' into 'main'
ci: Re-enable fatal warnings for FreeBSD CI

See merge request GNOME/glib!4307
2024-10-03 12:56:21 +00:00
Philip Withnall
fe8e4eb6db
ci: Clarify msys2 allow-failure policy
See the previous commit and discussion on #3420.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-29 13:36:03 +01:00
Philip Withnall
53f20d79b8
Revert "CI: Mark msys2-mingw32 as allowing failures"
This reverts commit 16819a4024.

The failure this was added for is intermittent and has been going on a
long time; it’s not a new failure caused by msys2 dependency/packaging
changes, so the policy in .gitlab-ci.yml doesn’t apply.

It would be great if someone fixed #3042, but un-gating GLib from msys2
testing is not the right tradeoff for it.

See: #3042
2024-09-29 13:35:57 +01:00
Philip Withnall
96652e7def
ci: Only build gobject-introspection if the system version is too old
We want to build GLib against a matched version of
gobject-introspection, and this version will probably be bumped quite
often as the two are developed in tandem.

However, if the CI system provides a newer version, we should probably
use that, otherwise we’re essentially downgrading part of the OS on the
CI system, and that probably will result in issues. In particular,
gobject-introspection <1.82 has a bug on MSYS2 which means it doesn’t
build (see issue #3464).

So, build gobject-introspection manually if the CI system version is too
old, otherwise use the system version. Do this programmatically so we
don’t have to repeatedly add and remove the gobject-introspection build
commands from the CI configuration as versions are bumped.

Fixes: #3464
2024-09-29 12:25:35 +01:00
Philip Withnall
1f59e89391
ci: Re-enable fatal warnings for FreeBSD CI
Now that the CI runner has Meson 1.4, we can revert commit
eda5bb386b and re-enable fatal warnings.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-26 13:29:52 +01:00
Philip Withnall
efab4c1c71
build: Bump the gi-docgen dependency to 2024.1
This gives us an updated enumeration template and link validation,
amongst other things.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-25 17:27:46 +01:00
Philip Withnall
8b8b8a5a5e
ci: Bump CI image versions to cache new version of PCRE
As per the previous commit.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-25 17:06:10 +01:00
Benjamin Gilbert
23009aadc6 build: switch back to c_std=gnu99 pending ObjC fix
It's better to warn by default on MSVC (which we were already doing before
we bumped to 1.4.0) than to fail by default on macOS.

Fixes: 51e3e7d9ae ("build: Bump Meson dependency to 1.4.0")
2024-09-25 07:45:06 -07:00
Philip Withnall
cf0a969101 Merge branch 'wip/pwithnall/3458-scan-build' into 'main'
ci: Fix subproject initialisation for scan-build and coverity

Closes #3458

See merge request GNOME/glib!4273
2024-09-13 15:24:32 +00:00
Philip Withnall
6d408ea76e Merge branch 'macos_arm' into 'main'
Move macOS CI to Apple Silicon runner

Closes #3289

See merge request GNOME/glib!3965
2024-09-12 22:28:10 +00:00
Philip Withnall
a0f124e67c
ci: Ignore files in meson-private in scan-build runs
These are typically files generated by the gobject-introspection dumper,
which we don’t want to scan as they are not part of GLib’s runtime code.

For example:
```
/builds/GNOME/glib/_scan_build/meson-private/tmpr3jwvyib/tmp-introspect5dmnb_je/GObject-2.0.c:799:27: warning: Access to field 'message' results in a dereference of a null pointer (loaded from variable 'error') [core.NullDereference]
  799 |       g_printerr ("%s\n", error->message);
      |                           ^~~~~~~~~~~~~~
1 warning generated.
```

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 23:24:59 +01:00
Philip Withnall
d6be962af9
ci: Fix subproject initialisation for scan-build and coverity
Fixes commit 93271385f9.

Previously the `before_script` from `.build-linux` was used in whole for
these two jobs, but since the `.build-gobject-introspection` template
was also added, the `before_script`s from the two templates need to be
explicitly combined.

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

Fixes: #3458
2024-09-12 23:24:53 +01:00
Philip Withnall
8ef85992e0 ci: Re-add contextual links for a FIXME message
To avoid people having to do git archaeology in future to work out why `--wrap-mode=nodownload` is such a good idea.
2024-09-12 22:05:41 +00:00
René de Hesselle
f9b7898fb7 Move to Apple Silicon based runner
Remove cmake as we no longer need to build ninja. We can use the
official wheel now since the runner's Python is 3.9 (before: 3.8).

Use the same comment regarding '--wrap-mode' as in the other jobs.

Download and use official ccache binary.

Add myself to the 'only' section in .gitlab-ci.yml so I can have
CI in my fork.

Disable a few deprecation warnings due to the much newer SDK of
the Apple Silicon machine.
2024-09-12 23:17:23 +02:00
Philip Withnall
6c80db2c24
ci: Force submodules to be fetched first in VS2017 CI jobs
No idea why this is now suddenly not working.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 21:40:41 +01:00
Philip Withnall
0134888d50
build: Bump gvdb subproject dependency and disable tests
This brings in https://gitlab.gnome.org/GNOME/gvdb/-/merge_requests/23,
which is needed for the following few commits.

Unfortunately, one of the other commits it brings in introduces a
sort-of-dependency-loop between GIO and GVDB. To avoid that, we have
to disable the GVDB tests. See
https://gitlab.gnome.org/GNOME/gvdb/-/merge_requests/25 for details.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-09-12 21:15:42 +01:00
Benjamin Gilbert
51e3e7d9ae build: Bump Meson dependency to 1.4.0
Meson 1.5.1 is available in the fd.o SDK and in Debian testing, so the
glib Meson policy says we can update.  Update the minimum only as far as
1.4.0 because we don't yet have a need for 1.5.0.

This allows us to:

- Use file.full_path() to avoid deprecation warnings on str.format(file).
- Set c_std=gnu99,c99 to avoid deprecation warnings with gnu99 on MSVC.

Update all the CI builds to use the latest 1.4.x patch release, 1.4.2.

The FreeBSD runner cannot be updated via `gitlab-ci.yml`, so will be
broken for now.

Similarly, the macOS build will not work unless `-Dc_std=gnu99` is
specified at configure time, due to
https://github.com/mesonbuild/meson/issues/13639.
2024-09-12 19:15:05 +01:00
Evan Welsh
93271385f9 ci: Set gobject-introspection version and build gobject-introspection in tests
The minimum version is now 1.80.0
2024-08-26 12:07:25 +01:00
Luca Bacci
1265b456d1 CI/msys2-mingw32: Set G_DEBUGGER environment variable
This enables us to catch access violation errors in CI and
get meaningful stacktraces with gdb.

Helps #3042

See https://docs.gtk.org/glib/running.html#environment-variables
2024-08-23 15:41:34 +02:00
Marco Trevisan (Treviño)
2f938054e9 ci: Also compile C++ files with coverage collection 2024-08-02 13:57:29 +02:00
Marco Trevisan (Treviño)
64f7445232 ci: Actually use a fedora 39 image
Also start using a more reliable versioning scheme for the fedora images
so that the tag is always vFEDORA_VERSION.IMAGE_VERSION to make it
easier to understand on future updates

Fixes: #3381
2024-08-02 03:39:48 +02:00
Marco Trevisan (Treviño)
2665a34b3f ci: Update coverage files atomically
Since we run tests in parallel we may end up rewriting the coverage info
while running files acting on the same source files.

The compiler can be smart though, so let's use the proper flag.

Despite this, sometimes we may still end up into negative reports, so
let's ignore them in CI since it's not worth breaking the build because
of these coverage-parsing failures.
2024-08-02 03:39:48 +02:00
Marco Trevisan (Treviño)
2c94349e79 ci: Ignore lcov errors on source missing
When using dtrace some temporary files may be leaked as source files and
this may lead to build issues such as

  geninfo: ERROR: unable to open
    /builds/GNOME/glib/_build/.dtrace-temp.ed1c5ba9.c:
    No such file or directory

AFAIK there's no way to keep these temporary files around, so the only
thing we can do is making lcov less strict about missing files.

We can drop the special option from genhtml since it's using the same
lcovrc file
2024-08-02 03:39:47 +02:00
Simon McVittie
16819a4024 CI: Mark msys2-mingw32 as allowing failures
Workaround for GNOME/glib#3420

Signed-off-by: Simon McVittie <smcv@collabora.com>
2024-07-26 16:31:36 +01:00
Ernesto de Gracia Herranz
38faeca62e replace package.version.Version by internal code
This drops the dependency on the Python `packaging` module.

Signed-off-by: Ernesto de Gracia Herranz <ernestodgh@jfrog.com>
2024-07-04 11:04:38 +00:00
Philip Withnall
c2744488a1
ci: Disable dtrace/systemtap on FreeBSD CI
It seems to have been accidentally enabled by the switch to making
dtrace a Meson feature. This has only just been caught because the
FreeBSD CI runner has been offline for several weeks (see
https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1503).

With dtrace enabled, the FreeBSD CI build fails with:
```
[8/1601] Generating 'gobject/libgobject-2.0.so.0.8100.0.p/gobject_probes.o'
FAILED: gobject/libgobject-2.0.so.0.8100.0.p/gobject_probes.o
/usr/sbin/dtrace -G -s ../gobject/gobject_probes.d -o gobject/libgobject-2.0.so.0.8100.0.p/gobject_probes.o
dtrace: failed to link script ../gobject/gobject_probes.d: No probe sites found for declared provider
[9/1601] Generating 'glib/libglib-2.0.so.0.8100.0.p/glib_probes.h' (wrapped by meson because command contains newlines)
[10/1601] Generating 'glib/libglib-2.0.so.0.8100.0.p/glib_probes.o'
FAILED: glib/libglib-2.0.so.0.8100.0.p/glib_probes.o
/usr/sbin/dtrace -G -s ../glib/glib_probes.d -o glib/libglib-2.0.so.0.8100.0.p/glib_probes.o
dtrace: failed to link script ../glib/glib_probes.d: No probe sites found for declared provider
```
(see https://gitlab.gnome.org/GNOME/glib/-/jobs/3961782)

I have no idea how to fix that, and it’s presumably not been working for
a long time.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-06-13 20:43:28 +01:00
Philip Withnall
ea58dcb538
Revert "ci: Disable dtrace/systemtap on FreeBSD CI"
This reverts commit b7a93a7ddb.

Accidentally pushed to `origin/main` without review because I typoed the
switch branch command and didn’t notice.
2024-06-10 11:03:34 +01:00
Philip Withnall
b7a93a7ddb
ci: Disable dtrace/systemtap on FreeBSD CI
It seems to have been accidentally enabled by the switch to making
dtrace a Meson feature. This has only just been caught because the
FreeBSD CI runner has been offline for several weeks (see
https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1503).

With dtrace enabled, the FreeBSD CI build fails with:
```
[8/1601] Generating 'gobject/libgobject-2.0.so.0.8100.0.p/gobject_probes.o'
FAILED: gobject/libgobject-2.0.so.0.8100.0.p/gobject_probes.o
/usr/sbin/dtrace -G -s ../gobject/gobject_probes.d -o gobject/libgobject-2.0.so.0.8100.0.p/gobject_probes.o
dtrace: failed to link script ../gobject/gobject_probes.d: No probe sites found for declared provider
[9/1601] Generating 'glib/libglib-2.0.so.0.8100.0.p/glib_probes.h' (wrapped by meson because command contains newlines)
[10/1601] Generating 'glib/libglib-2.0.so.0.8100.0.p/glib_probes.o'
FAILED: glib/libglib-2.0.so.0.8100.0.p/glib_probes.o
/usr/sbin/dtrace -G -s ../glib/glib_probes.d -o glib/libglib-2.0.so.0.8100.0.p/glib_probes.o
dtrace: failed to link script ../glib/glib_probes.d: No probe sites found for declared provider
```
(see https://gitlab.gnome.org/GNOME/glib/-/jobs/3961782)

I have no idea how to fix that, and it’s presumably not been working for
a long time.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-06-10 11:00:31 +01:00
Philip Withnall
9e8b0f6730
ci: Disable systemtap on musl CI build
It’s not needed, and is now failing with:
```
meson.build:2578:36: ERROR: Feature systemtap cannot be enabled: Cannot enable systemtap because dtrace feature is disabled
A full log can be found at /builds/GNOME/glib/_build/meson-logs/meson-log.txt
```

See https://gitlab.gnome.org/GNOME/glib/-/jobs/3901860

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-21 10:44:50 +01:00
Michael Catanzaro
153cda6669 Convert systemtap from bool to feature option type
Now systemtap can be enabled by default in distros that use
-Dauto_features=enabled or for developers who already have systemtap
installed, while it's still disabled for developers who do not have
systemtap installed. See #3354
2024-05-17 15:22:41 -05:00
Michael Catanzaro
ed020a688a Convert dtrace from bool to feature option type
Now dtrace can be enabled by default in distros that use
-Dauto_features=enabled or for developers who already have dtrace
installed, while it's still disabled for developers who do not have
dtrace installed. See #3354
2024-05-17 15:22:41 -05:00
Philip Withnall
e87b659905
ci: Temporarily run the FreeBSD on a schedule rather than every commit
The runner is currently offline and we can’t have that blocking
development.

See: https://gitlab.gnome.org/Infrastructure/Infrastructure/-/issues/1503

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-16 12:51:04 +01:00
Philip Withnall
21fa4ea91b
ci: Update Fedora CI image to Fedora 39
Fedora 37 is out of support so, as per our policy, update the CI image
to the oldest still-supported release, which is 39.

Update the mingw CI image too, as it’s built on top of the Fedora one.

Update the supported platforms documentation (and fix the Debian version
listed there to match what’s currently in CI, which is up to date).

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-15 13:27:47 +01:00
Philip Withnall
021d58b251
ci: Add a policy for how to deal with CI failures due to changes in msys2
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2024-05-15 11:31:20 +01:00
Philip Withnall
b1b8166a8a
ci: Make scan-build errors fatal in CI
\o/

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

Fixes: #1767
2024-04-25 23:58:34 +01:00
Philip Withnall
c844abc759
ci: Force-enable -Dglib_debug for scan-build jobs
Several of the assertions in GLib (particularly on hot paths in
`gobject.c`) are protected behind `#if G_ENABLE_DEBUG`. In order for
scan-build to see them, the scan-build CI job needs to make sure that
a debug build is definitely enabled — not just rely on it being
implicitly enabled via the combination of other build options.

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

Helps: #1767
2024-04-12 19:35:05 +01:00