Commit Graph

150 Commits

Author SHA1 Message Date
Philip Withnall
a9b68f1f9b ci: Update Coverity image to Fedora 34 and latest Coverity Scan tool
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-18 10:32:08 +00: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
Sebastian Dröge
8091727b27 Merge branch 'wip/pwithnall/macos-tests' into 'main'
tests: Stop ignoring test failures on macOS

See merge request GNOME/glib!2505
2022-03-03 14:53:38 +00:00
Philip Withnall
36112f9b83 tests: Stop ignoring test failures on macOS
Test failures were previously ignored on macOS because there are 12
tests which consistently fail (and have not yet been fixed, because
there are no regularly active macOS maintainers for GLib; you could help
here!).

However, this means that new test failures can’t be spotted.

So, explicitly mark those 12 tests as `should_fail` on macOS, and then
make other test failures cause failure of the CI run.

We can track the process of fixing those 12 tests on #1392 and #1251.

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

Helps: #1392
2022-02-20 15:01:59 +00:00
Philip Withnall
5d40604fa7 ci: Drop Android API 21 build jobs
API version 21 was used for Android 5.0
(https://developer.android.com/studio/releases/platforms#5.0), which is
no longer supported
(https://en.wikipedia.org/wiki/Android_version_history).

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 14:16:11 +00:00
Philip Withnall
916e7f3cf9 ci: Run the Android API 21 and FreeBSD 12 jobs on a schedule
Rather than running them on each commit on `main`. This saves resources.

Given that Android API 28 and FreeBSD 13 jobs continue to be run on each
commit on `main`, this seems like an acceptable tradeoff. It’s very
unlikely that a regression will happen which affects the older systems
and *not* the newer systems. If it does, it will be caught within a week
by the scheduled job.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 12:50:34 +00:00
Philip Withnall
a9fef02be4 ci: Factor out a template for jobs which run only on the origin repo
This clarifies the intent of the `branches@GNOME/glib` selector. It
introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 12:50:34 +00:00
Philip Withnall
0a14b091e0 ci: Split .only-default out of .build-linux
As with a previous commit, `.only-default` does things which are
orthogonal to what `.build-linux` does, so it’s clearer and more
extensible for CI jobs to specify both in their top-level `extends`
statements, rather than relying on `.build-linux` to pull
`.only-default` in.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 12:50:34 +00:00
Philip Withnall
02da6e8171 ci: Rename .cross-template to .cross-build-linux
This makes the name a bit more descriptive, and makes it match the rest
of the naming scheme.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 12:50:34 +00:00
Philip Withnall
0366f100ca ci: Rename .build template to .build-linux
This name is more specific to what the template actually does.

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 12:50:34 +00:00
Philip Withnall
c44abdc7a2 ci: Replace .build-only-schedules template with multiple extension
`.build` and `.only-schedules` are orthogonal, and I want to use
`.only-schedules` together with `.cross-template` in future, which would
require creating more cross-product templates.

Avoid that by splitting `extends: .build-only-schedules` into
```
extends:
  - .build
  - .only-schedules
```

Multiple extends are supported by GitLab: https://docs.gitlab.com/ee/ci/yaml/#extends

This introduces no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 12:50:34 +00:00
Philip Withnall
32aa9b7349 ci: Port from YAML anchors to GitLab extends
See https://docs.gitlab.com/ee/ci/yaml/yaml_optimization.html#use-extends-to-reuse-configuration-sections

Since we’re already using `extends` in other places in the configuration
file, it seems simpler to use it everywhere.

This should introduce no functional changes.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-20 12:50:34 +00:00
Philip Withnall
e30787d604 ci: Drop custom dependency builds from installed-tests
They were needed for `GMemoryMonitor` support. That was first included
in the gobject-introspection 1.63.2 release and the xdg-desktop-portal
1.5.4 release. The Fedora 33 image we’re using for CI has versions
1.66.1 and 1.8.1.

This should speed up the `installed-tests` CI jobs a bit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-18 10:18:27 +00:00
Loïc Le Page
097cd3a16b Add Windows native static build using msvc to CI 2022-01-26 12:07:46 +01:00
Philip Withnall
b891266d69 ci: Enable --werror on macOS
There are no compiler warnings when building on macOS CI at the moment,
so let’s keep it that way by turning any future ones into errors.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-11-18 14:32:09 +00:00
Philip Withnall
d1fc42eb88 ci: Bump Meson version to 0.60.1 on macOS
This is an attempt to fix a persistent error on the macOS CI:
```
Objective-C compiler for the host machine: cc (clang 10.0.0)
Objective-C linker for the host machine: APPLE ld 409.12
WARNING: No include directory found parsing "cc -xobjc -E -v -" output
meson.build:761:2: ERROR: Fatal warnings enabled, aborting
```

For example, seen on https://gitlab.gnome.org/GNOME/glib/-/jobs/1618966.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-11-16 14:09:07 +00:00
Philip Withnall
59832abb69 ci: Use the new CI images
Built using the changes from the last few commits.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 17:15:13 +01:00
Philip Withnall
4f3e7ca721 ci: Drop some workarounds for old Meson versions
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 17:15:13 +01:00
Philip Withnall
46588698e2 build: Bump Meson dependency to 0.52.0
This is what’s available in the new Debian Stable, so we can expect it
to be available pretty much everywhere.

Subsequent commits will clean up old workarounds.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 17:15:13 +01:00
Luca Bacci
2a17bac77c
Provide built DLLs as Gitlab-CI artifacts 2021-09-21 16:35:36 +02:00
Ting-Wei Lan
e99597414c ci: Replace FreeBSD 11 with FreeBSD 13
FreeBSD 11 will go EOL in a month, and FreeBSD 13 was released several
months ago. Remove the FreeBSD 11 job and add a FreeBSD 13 job.
2021-09-13 12:25:38 +08:00
Ting-Wei Lan
8b3506bc81 ci: Use C.UTF-8 locale on FreeBSD 12 2021-09-03 01:29:57 +08:00
Philip Withnall
4fe630db83 ci: Use default wrap mode for libpcre on cross-build platforms
Work around a bug in Meson versions < 0.50.0 where
`--wrap-mode=nodownload` would disable the use of fallback subprojects,
even if they’d already been downloaded, with the message:
```
Cross dependency libpcre found: NO (tried pkgconfig and cmake)
Cross dependency libpcre found: NO (tried pkgconfig)
Not looking for a fallback subproject for the dependency libpcre because:
Use of fallbackdependencies is disabled.
meson.build:1998:2: ERROR:  Dependency "libpcre" not found, tried pkgconfig
```

This workaround can be dropped in the near future when we bump our Meson
dependency to something less ancient. We have a self-imposed requirement
to be buildable using what’s packaged in Debian Stable, which is
currently Meson 0.49.2 — but the new Debian Stable release is coming
soon, with an updated Meson.

Using `--force-fallback-for=libpcre` would have been a more constrained
workaround, but unfortunately that argument didn’t exist in Meson 0.49.

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

Helps: #962
2021-06-21 13:29:56 +01:00
Philip Withnall
9fbd7f3dc1 build: Drop the internal_pcre option in favour of the subproject
This should maintain equivalent functionality, apart from that now you
have to pass `--force-fallback-for libpcre` to `meson configure` in
order to use the subproject; rather than specifying
`-Dinternal_pcre=true` to use the internal copy.

This also fixes #642, as the wrapdb copy of libpcre is version 8.37.

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

Helps: #962
Fixes: #642
2021-06-16 16:45:10 +01:00
Philip Withnall
1d952150e6 ci: Update to the latest CI images
These have been rebuilt to also cache the libpcre subproject.

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

Helps: #962
2021-06-16 16:45:10 +01:00
Philip Withnall
24e459e3d8 Rename the master branch to main
It’s a more inclusive name, has the same tab-completion prefix, and is
the default choice for new repositories created locally by git, and on
GitHub and GitLab.

https://sfconservancy.org/news/2020/jun/23/gitbranchname/

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

Fixes: #2348
2021-06-07 14:03:48 +01:00
Philip Withnall
f551a60380 ci: Allow origin to choose default branch for gobject-introspection
Rather than specifying the default branch explicitly, allow the origin
to choose it. Specify the `--single-branch` option explicitly to make it
clear the CI only needs one branch; this is however already implied by
the `--depth` option so is not strictly necessary.

This will help avoid breakage if gobject-introspection changes its
default branch name in future.

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

Helps: #2348
2021-06-07 13:14:26 +01:00
Philip Withnall
8f57a5b9ad ci: Set localstatedir to the system directory on FreeBSD CI machines
These changes were missing from commit 62cc3158e9 and broke CI on
FreeBSD.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-10 17:55:51 +00: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
62cc3158e9 ci: Set localstatedir to the system directory on CI machines
So the tests can access `/var/lib/dbus/machine-id`. This is not a
behaviour change relative to older behaviour on CI.

In future, it might make more sense to revert this commit and change the
CI scripts so they symlink
`/home/user/glib-installed/var/lib/dbus/machine-id` to the system
machine ID; or ensure that `/etc/machine-id` exists on all the CI
machines. That’s too complicated to do right now though.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-01 13:44:20 +00:00
Bartłomiej Piotrowski
52f09fb4ff Revert "Merge branch 'wip/pwithnall/macos-ci-disable' into 'master'"
This reverts merge request !1939
2021-02-12 19:41:11 +00:00
Philip Withnall
1d0d2ee5bb ci: Temporarily disable macOS CI job as runner is offline
See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/495

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-02-10 14:19:36 +00:00
Philip Withnall
72e4781ffc ci: Temporarily fold SH and Py checks into style-check job
It doesn’t seem to be possible to use `only:changes` from a branch
pipeline extending `.only-default` and have it correctly trigger when
`*.sh` or `*.py` files are modified.

We possibly need to convert all our pipelines to be merge-request-only,
but that’s an avenue I’ve been down before and I couldn’t get it to
work. Using
[`workflow:rules`](https://docs.gitlab.com/ee/ci/yaml/README.html#workflowrules)
might fix that, but I don’t have time to rework the entire CI to use
that now.

So in the meantime, move the SH and Py checks into the existing
style-check job so we’re not always spinning up two additional container
instances on every merge request.

See !1743.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-20 14:48:14 +00:00
Frederic Martinsons
8f45fbdadd add 2 new stages: sh-check (which run shellcheck) and py-check (which run black and flake8)
The debian docker have been modified to install these tools.

Closes #2046

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2020-11-15 17:34:21 +01:00
Philip Withnall
5f25d2569d ci: Add scheduled Coverity Scan builds
This should run Coverity Scan on GLib on the current schedule (once a
week).

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 15:47:27 +01:00
Philip Withnall
c77c5e5b56 ci: Support building a CI image for Coverity Scan builds
This will be used in an upcoming scheduled CI job.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 15:41:09 +01:00
Sebastian Dröge
6a87f7ed6f Merge branch 'bandwidth' into 'master'
Reduce CI bandwidth requirements

See merge request GNOME/glib!1570
2020-07-27 11:31:38 +00:00
Philip Withnall
410ee530b5 ci: Add DAG attributes
Add some basic DAG attributes so that some jobs in the pipeline can
run out of stage order to speed things up a little.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 12:10:54 +01:00
Philip Withnall
feab973662 ci: Move some CI jobs from branches to schedules
These jobs (`scan-build` and `valgrind`) take ages to run and rarely
indicate failures, so move them to a weekly schedule, rather than
running them on each branch/MR.

The current schedule is once weekly:
https://gitlab.gnome.org/GNOME/glib/-/pipeline_schedules.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-27 12:10:41 +01:00
Philip Withnall
d0eab92971 ci: Use --branch and --depth arguments to git clone to save bandwidth
This reduces the bandwidth for downloading xdg-desktop-portal from 2.7MB
to 300KB, on each CI run.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-09 12:51:21 +01:00
Dan Winship
d83d68d64c guri: new URI parsing and generating functions
Add a set of new URI parsing and generating functions, including a new
parsed-URI type GUri. Move all the code from gurifuncs.c into guri.c,
reimplementing some of those functions (and
g_string_append_uri_encoded()) in terms of the new code.

Fixes:
https://gitlab.gnome.org/GNOME/glib/issues/110

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2020-06-25 13:57:35 +04:00
Philip Withnall
e89f41d3bf ci: Rebuild Fedora Docker image for latest Dockerfile changes
See !1464.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-05-22 09:32:44 +01:00
Sebastian Dröge
12fbb286ae Merge branch 'fix-cpu-docker' into 'master'
ci: Update Android Docker image for aarch64 CPU naming change

See merge request GNOME/glib!1402
2020-05-14 15:12:48 +00:00
Bastien Nocera
555fc57a1c ci: Fix documentation tarball compression
Best compress using xz when using .tar.xz suffixes.
2020-05-07 11:14:35 +01:00
Bastien Nocera
48f756616d ci: Fix paths for dist'ed documentation 2020-05-07 11:14:35 +01:00
Christoph Reiter
c3645a84b6 CI: Switch to new Windows runners
gitlab will drop cmd.exe support with GitLab 13 so I took the opportunity to
add new runners with Windows 2016 and powershell as default.

These runners are tagged with win32-ps instead of win32. The old runners
will be switched off in the coming weeks.

The main difference is that all commands and env expansions use powershell
and Windows 2016 instead of 2012r2.
2020-04-29 08:56:56 +02:00
Xavier Claessens
be3728b9fa Meson: Add glib_checks and glib_asserts options
In cases where performance are critical it can be useful to disable
checks and asserts. GStreamer has those options too, using the same name
and setting them yielding means we can set those options on the main
project (e.g. gst-build) and glib will inherit the same value when built
as subproject.
2020-04-09 09:17:35 -04:00
Simon McVittie
dff2e3b4c7 CI: Show execution environment before we start
This will help to debug CI issues that are related to us running in
a container that might have unusual capabilities, mount points,
filesystems etc., such as (probably) #2027, #2028, #2029.

Signed-off-by: Simon McVittie <smcv@collabora.com>
2020-03-04 15:25:47 +00:00
Philip Withnall
b9e071f119 ci: Update Android Docker image for aarch64 CPU naming change
See !1376. Update the Docker image for Android after merging that
change.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-03-02 14:17:25 +00:00
Philip Withnall
2d7b2a014b ci: Enable parallelisation when running installed tests
This should speed up CI runs significantly, as the installed tests are
currently running in series.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-02-24 11:06:00 +00:00