Commit Graph

223 Commits

Author SHA1 Message Date
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
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
Philip Withnall
4ff6ecbeff build: Move -Wnonnull flag to meson.build
It should be enabled in all builds, not just CI builds. Otherwise
developers might miss it locally.

This updates commit f11b96f255.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-18 13:33:20 +00:00
Philip Withnall
482e9cd9e3 Merge branch 'reuse-regressions-ci' into 'main'
ci: Add a CI check for REUSE-compliant licensing/copyright headers

See merge request GNOME/glib!3051
2022-11-08 16:30:12 +00:00
Philip Withnall
b906d470c7 ci: Add a CI check for REUSE-compliant licensing/copyright headers
This doesn’t enforce licensing/copyright headers to be present on all
files, but does check that at least a minimum number of files are
correct.

This should help avoid new files being added without appropriate
licensing information in future.

The baseline is set at what `reuse lint` outputs for me at the moment.

See https://reuse.software/tutorial/#step-2 for information about how to
add REUSE-compliant licensing/copyright to files.

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

Helps: #1415
2022-11-08 15:50:59 +00:00
Philip Withnall
e2b9e28ece Merge branch 'wip/3v1n0/meson-fix-tests-binary-dependencies' into 'main'
test/meson: Add tests dependencies on built programs, libraries and modules

See merge request GNOME/glib!3015
2022-11-08 12:30:53 +00:00
Ray Strode
f11b96f255 ci: Build with -Wnonnull
-Wnonnull is sort of fickle and it's an option a lot of consumers
of glib use.

This commit makes sure it gets used on linux during CI as well, so
we can catch compat problems before they hit our users.
2022-11-04 14:06:48 -04:00
Philip Withnall
ea0e9bf1f1 ci: Rename style-check-diff to style-check-advisory
To better reflect its purpose.

This will also help distinguish it from a job being added in a following
commit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-11-02 16:49:51 +00:00
Marco Trevisan (Treviño)
c6eddf897b ci: Do not use installed tests in debian-stable build
Setting installed_tests option enforces various test files to be
installed, this causes meson to build tools that might have not built
otherwise but that are still required for testing.

Also, disabling installed tests lead to slightly different code paths
when it comes to using test test files.

So, disable it for debian so that we can ensure that at test time we
have set all the dependencies between test programs and the used
resources (that can be libraries, external programs or modules).
2022-11-01 01:56:27 +01:00
Philip Withnall
cbf17c9422 Merge branch 'wip/3v1n0/support-can-fail-tests' into 'main'
meson, ci: Support tests that can fail under certain conditions

See merge request GNOME/glib!2987
2022-10-31 14:28:02 +00:00
Marco Trevisan (Treviño)
9e649debbe meson: Use default test multiplier to define timeouts
So that we don't have to care about the default, being always set to 1m
2022-10-31 14:08:31 +01:00
Marco Trevisan (Treviño)
62dca6c1cf meson, ci: Support tests that can fail under certain conditions
We have tests that are failing in some environments, but it's
difficult to handle them because:
 - for some environments we just allow all the tests to fail: DANGEROUS
 - when we don't allow failures we have flacky tests: A CI pain

So, to avoid this and ensure that:
 - New failing tests are tracked in all platforms
 - gitlab integration on tests reports is working
 - coverage is reported also for failing tests

Add support for `can_fail` keyword on tests that would mark the test as
part of the `failing` test suite.
Not adding the suite directly when defining the tests as this is
definitely simpler and allows to define conditions more clearly (see next
commits).

Now, add a default test setup that does not run the failing and flaky tests
by default (not to bother distributors with testing well-known issues) and
eventually run all the tests in CI:
 - Non-flaky tests cannot fail in all platforms
 - Failing and Flaky tests can fail

In both cases we save the test reports so that gitlab integration is
preserved.
2022-10-31 14:08:29 +01:00
Marco Trevisan (Treviño)
e320149c39 ci: Add an msys2-clang64 job to run only on schedules
It has enough particularities to require a job to monitor failures
2022-10-31 12:00:53 +01:00
Marco Trevisan (Treviño)
fdaa8a334a ci: Set CFLAGS on msys2-mingw32 in yaml file as it happens for other jobs
Be consistent, and based on this also perform the lcov job or not
2022-10-31 12:00:53 +01:00
Marco Trevisan (Treviño)
f8fa9d3a2b ci: Open issues when scheduled pipelines fails
It's hard to track failures on scheduled pipelines, so make gitlab open
an issue for us if that happens.
2022-10-31 02:51:40 +01:00
Philip Withnall
424cf3a966 ci: Move shellcheck/black/flake8 checks to a new CI job which can fail
We were regressing on Python style too often. Since Python code style is
a lot easier to enforce than C code style, split it (and the shellcheck
checks) out from `style-check-diff` into a new CI job which is allowed
to fail the pipeline.

Only trigger it when .sh or .py files have changed, which should reduce
resource consumption.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-10-27 10:09:58 +01:00
Marco Trevisan (Treviño)
782625bd26 ci: Do not store docs artifacts
This was discussed in a previous MR [1], but it apparently went in
during rebase

[1] https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2820#note_1502207
2022-10-19 15:52:22 +02:00
Philip Withnall
b321ba1d1f Merge branch 'ignore-dirs-leaks+valgrind-ci' into 'main'
glib.supp: Ignore gutils leaks for user and system dirs

Closes #333

See merge request GNOME/glib!2897
2022-10-10 12:01:49 +00:00
Marco Trevisan (Treviño)
3ddfb10b0b ci: Generate Cobertura XML and use it to feed gitlab for MR integration
gitlab has coverage integration in MRs, but we need a cobertura
formatted XML files (each must be less than 10 MB [1]) to show it, so
generate it using a python script and inform gitlab about it.

See https://docs.gitlab.com/ee/ci/testing/test_coverage_visualization.html

[1] https://gitlab.com/gitlab-org/gitlab/-/issues/328772#note_840831654
2022-09-15 03:16:52 +02:00
Marco Trevisan (Treviño)
22f5016303 ci: Expose the coverage report as link in the MR's
It's making handier to check how changes are tested.
2022-09-15 01:44:29 +02:00
Marco Trevisan (Treviño)
4432f78407 CI: Do not allow failures in the valgrind job
We're no more leaks, so we can just be more restrictive at it, in order
to find new problems easier.
2022-09-14 22:03:00 +02:00
Marco Trevisan (Treviño)
74f01defd4 ci: Increase the valgrind job meson test timeout
There are some test failing because there's not enough time to complete,
so let's give them some more time.
2022-09-02 21:21:34 +02:00
Marco Trevisan (Treviño)
99c2b4e499 ci: Setup submodules and subprojects before building on dist
Also handle a permission issue.
2022-07-12 20:25:04 +02:00
Philip Withnall
e6af2d3662 ci: Specify -Wno-overlength-strings on macOS
This disables the following warning, which was causing CI failures on
macOS when building the libpcre2 subproject:
```
../subprojects/pcre2-10.40/src/pcre2_error.c:66:3: error: string literal of length 4380 exceeds maximum length 4095 that ISO C99 compilers are required to support [-Werror,-Woverlength-strings]
```

We don’t want to explicitly rely on using overlength strings in GLib,
which is why this change is a `CFLAGS` in the CI configuration, rather
than setting a project-level argument in `meson.build`.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-07-12 14:16:23 +01:00
Aleksei Rybalkin
8d5a44dc8f replace pcre1 with pcre2 2022-07-12 11:46:34 +00:00
Philip Withnall
dc2c769d5c ci: Ensure git submodules are updated before running macOS CI
Since the macOS CI jobs are run on a machine which isn’t using a
pre-made container image, we can’t ship a cached version of the
subproject, so it has to be pulled as a git submodule.

GitLab doesn’t do that by default unless you set
`GIT_SUBMODULE_STRATEGY` to something other than `none`.

See https://docs.gitlab.com/ee/ci/git_submodules.html

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-30 01:31:02 +01: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