Commit Graph

312 Commits

Author SHA1 Message Date
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
Philip Withnall
46a6f49066 Merge branch 'meson-add-test-setup' into 'main'
build: Use add_test_setup() to allow tests to be run under valgrind

See merge request GNOME/glib!2752
2022-06-20 11:09:55 +00:00
Philip Withnall
f5baecdb36 build: Use add_test_setup() to allow tests to be run under valgrind
This means we can specify the standard options for testing GLib under
valgrind consistently, so that developers can use `meson test
--setup=valgrind` to run them.

Port the existing valgrind CI to use them (this will not change its
functional behaviour).

Suggested by Marco Trevisan at
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2717#note_1478891.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-20 11:54:10 +01:00
Eli Schwartz
24ec80cfb4
meson: simplify iconv lookups using Meson's builtin dependency lookup
iconv is complicated to look up. That complexity now resides in
Meson, since 0.60.0, via a `dependency('iconv')` lookup, so use that
instead.

No effort is made to support the old option for which type of iconv to
use. It was a false choice, because if only one was available, then
that's the only one you can use, and if both are available, the external
iconv shadows the builtin one and renders the builtin one unusable,
so there is still only one you can use.

This meant that when configuring glib with -Diconv=libc on systems that
had an external iconv, the configure check would detect a valid libc
iconv, try to use it, and then fail during the build because iconv.h
belongs to the external iconv and generates machine code using the
external iconv ABI, but fails to link to the iconv `find_library()`.
Meson handles this transparently.
2022-06-16 12:04:59 -04:00
Philip Withnall
594a70bf5f Merge branch 'gvdb-as-wrap' into 'main'
build: Move gvdb to a subproject

See merge request GNOME/glib!2733
2022-06-16 09:29:43 +00:00
Philip Withnall
b3f49d08a6 build: Move gvdb to a subproject
Rather than carrying the copylib around inside GLib, which is a pain to
synchronise and affects our code coverage statistics.

This requires updating the CI images to cache the new subproject,
including updating the `cache-subprojects.sh` script to pull in git
submodules.

It also requires adding `gioenumtypes_dep` to be added to the
dependencies list of `libgio`, since it needs to be build before GVDB as
it’s pulled in by the GIO headers which GVDB includes.

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

Helps: #2603
2022-06-16 10:12:07 +01:00
Philip Withnall
385ad59f41 Revert "ci: Temporarily disable macOS CI runner until it’s fixed"
This reverts commit e3673202e2.

As per
https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/558#note_1465542,
the macOS CI runner is now back online.
2022-06-07 18:26:55 +01:00
Philip Withnall
d4b882fac2 ci: Try reducing FD soft limit to fix valgrind tests
They are [currently
failing](https://gitlab.gnome.org/GNOME/glib/-/jobs/2032874) with the
error:
```
  1/273 glib:glib / array-test                                  FAIL             0.19s   killed by signal 11 SIGSEGV
05:04:16 G_DEBUG=gc-friendly G_TEST_BUILDDIR=/builds/GNOME/glib/_build/glib/tests MALLOC_CHECK_=2 MALLOC_PERTURB_=133 G_TEST_SRCDIR=/builds/GNOME/glib/glib/tests valgrind --tool=memcheck --error-exitcode=1 --track-origins=yes --leak-check=full --leak-resolution=high --num-callers=50 --show-leak-kinds=definite,possible --show-error-list=yes --suppressions=/builds/GNOME/glib/tools/glib.supp /builds/GNOME/glib/_build/glib/tests/array-test
----------------------------------- output -----------------------------------
stderr:

valgrind: m_libcfile.c:66 (vgPlain_safe_fd): Assertion 'newfd >= VG_(fd_hard_limit)' failed.
------------------------------------------------------------------------------
```

I’m not really sure what that means, but `show-execution-environment.sh`
says the FD soft limit is set to 524288 on the CI machine. That seems
high; on my machine it’s only 1024 (and the valgrind tests pass). So
let’s try 1024.

The valgrind CI has been failing since we most recently upgraded the CI
image to a new version of Fedora.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-06-01 14:57:22 +01:00
Marc-André Lureau
a8058cb12c gitlab-ci: left-over from junit cleanup
This should have been part of GNOME/glib!2686 (sorry!)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-25 15:27:37 +02:00
Marc-André Lureau
c8ce3786d7 gitlab-ci: remove meson-junit-report.py conversion
meson supports JUnit XML format since 0.55.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-05-25 14:10:35 +02:00
Philip Withnall
5efbd51ea8 Merge branch 'cleanup-root' into 'main'
Various updates to documentation and misc files in the root directory

See merge request GNOME/glib!2649
2022-05-17 12:58:25 +00:00
Philip Withnall
e3673202e2 ci: Temporarily disable macOS CI runner until it’s fixed
The runner machine is offline and there is no ETA on when it will be
back, so disable the CI job which uses it for now so that pipelines
can proceed.

See https://gitlab.gnome.org/Infrastructure/GitLab/-/issues/558

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-16 13:01:36 +01:00
Philip Withnall
5129750884 tools: Move glib.supp to tools directory
This tidies up the root directory a bit more.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 13:11:01 +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
cc79d5bc7f ci: Explicitly specify Python installation path on Windows
Meson used to try and guess at the Python path. While this worked fine
for GLib before, it probably didn’t work 100% for other projects, so
Meson have made it an explicit option.

Set that option with the Python path used on the Windows CI machines.

This fixes a Meson warning with Meson >0.60.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +01:00
Philip Withnall
f2d24f0b13 ci: Bump CI image versions for new Meson and libpcre versions
As per the previous few commits.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:55:28 +01:00
Philip Withnall
25ab87d8e5 build: Drop checks and workarounds for older Meson versions
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:01:44 +01:00
Sebastian Dröge
56531a7ae6 Merge branch 'combine-ci-jobs' into 'main'
ci: Combine style-check-diff and check-todos jobs into one

See merge request GNOME/glib!2598
2022-04-29 08:03:49 +00:00
Philip Withnall
8e295e23a5 build: Move lcovrc file to root so it’s picked up by Meson
Move the lcovrc file to the root of the project, so that it’s picked up
by Meson when running `ninja coverage` locally.

See https://github.com/mesonbuild/meson/issues/4628

This won’t affect the code coverage run on the CI, since that explicitly
used the lcovrc file already.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-28 11:57:45 +01:00
Philip Withnall
403edad934 ci: Combine style-check-diff and check-todos jobs into one
They are functionally quite similar, and combining them saves around 1
minute of CI runner time per pipeline, which is a nice saving for very
little downside.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-08 12:37:08 +01:00
Philip Withnall
f68943dcf2 ci: Expire CI artifacts after 1 week
The default is 30 days, but we don’t need them around that long. This
should free up some disk space on the GitLab/CI runner systems.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-04-06 12:54:54 +01:00
Philip Withnall
6aa210e6af gio: Remove fam file monitor support
libgamin was last released in 2007 and is dead
[upstream](https://gitlab.gnome.org/Archive/gamin). Distributions may
still ship it (although Fedora no longer does), but we want people to
use inotify on Linux since it’s actively supported.

BSDs use kqueue. Windows uses win32filemonitor.

FAM might still be used on some commercial Unix distributions, but there
are no contributors from those distributions, and certainly no CI for
them to prevent regressions.

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

Fixes: #2614
2022-03-23 15:41:54 +00:00
Philip Withnall
46c6ed231e ci: Update Android NDK image to Fedora 34
Don’t take the opportunity to add support for Android API 31 or update
the version of the Android NDK we’re using to r23b, though, as I
couldn’t quickly get that to work and ran out of time.

Bumping the Fedora version will at least reduce our CI repository disk
usage through sharing the base image.

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

Helps: #2605
2022-03-18 11:27:02 +00:00
Philip Withnall
4e7b76344c ci: Update mingw image to Fedora 34
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-03-18 10:38:41 +00:00
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
Bastien Nocera
f333a8058d ci: Fix xdg-desktop-portal build
Newer versions of xdg-desktop-portal need a newer PipeWire, so use the
latest release that doesn't contain this change to avoid having
something else to build.
2020-02-21 19:50:12 +01:00
Bastien Nocera
7263fc5591 ci: Don't ignore xdg-desktop-portal build failure
CI scripts are done using a shell with 'set -e' enabled, but using
'&&' means that the line won't "fail". Run the different commands
sequentially instead.

Spotted by Simon McVittie <smcv@collabora.com>

Closes: #2043
2020-02-21 18:49:56 +01:00
Bastien Nocera
1cc2f51382 ci: Bump Fedora Docker image version
To incorporate changes from the previous 4 commits.
2020-02-04 17:52:16 +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
Emmanuele Bassi
5e20086edc Merge branch '1551-todo-ci' into 'master'
ci: Add checks for ‘TODO’ in merge requests

Closes #1551

See merge request GNOME/glib!794
2020-01-31 15:35:29 +00: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
09d995286b doc: Run gtkdoc-check with unit tests
This has the side effect of always rebuilding the doc at each build when
gtk_doc option is enabled (not by default). Most importantly, this will
enable doc check on our CI.
2020-01-29 15:54:53 +01:00
Philip Withnall
3f51963b2d ci: Add checks for banned keywords in merge requests
Using the same approach as we have for code style checks (the
`style-check-diff` CI job), check the diff for any banned keywords like
‘TODO’, and also check the commit messages.

The keyword ‘TODO’ is often used by developers to indicate a part of a
commit which needs further work, and hence which shouldn’t yet be merged.

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

Fixes: #1551
2020-01-21 12:26:47 +00:00
Philip Withnall
df0610aa55 ci: Use --wrap-mode=default on macOS CI runner (only)
This is a partial revert of commit 595e12b5fb for macOS only, since we
can’t run a VM image on that CI runner, and hence can’t easily
pre-populate it with cached dependencies.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-01-20 15:30:44 +00:00
Xavier Claessens
595e12b5fb ci: Pass --wrap-mode=nodownload to every task
The CI should not waste resources in downloading subprojects for each
task. It should also not rely on external hosts to be available.

Windows case will be handled in MR #402 by migrating to docker.
2020-01-15 21:36:57 -05:00
Xavier Claessens
5f99781d70 ci: Update all docker images 2020-01-15 21:36:57 -05: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
Xavier Claessens
5daad373a3 ci: Use variables for docker images 2020-01-15 21:36:57 -05:00
Philip Withnall
076fd5a922 WIP: ci: Add macOS CI runner
We had one before, but the runner machine was too flaky to be useful.
Re-add it now that the Foundation have sorted out a more reliable
machine. (Thanks!)

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

Fixes: #1416
2020-01-07 10:32:46 -05:00
Philip Withnall
de7d7dbd6c 2.63.3
Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-12-16 13:57:28 +00:00
Bastien Nocera
5a174d105d ci: Fix permission error in valgrind analysis stage
The valgrind analysis stage inherits from existing artefacts, so make
sure to reset the permissions on the glib build directory to avoid a new
build failing.

$ meson ${MESON_COMMON_OPTIONS} --werror -Dsystemtap=true -Ddtrace=true -Dfam=true -Dinstalled_tests=true _build
<snip>
PermissionError: [Errno 13] Permission denied: '/builds/GNOME/glib/_build/meson-logs/meson-log.txt'
2019-12-12 10:59:47 +01:00
Bastien Nocera
c782042087 ci: Disable xdg-desktop-portal tests
They're not needed to actually run xdg-desktop-portal itself, and
we won't need libportal then.
2019-12-11 15:23:31 +01:00
Bastien Nocera
4b6ad93c86 ci: GMemoryMonitor support is now merged in gobject-introspection 2019-12-11 15:12:01 +01:00
Bastien Nocera
5a58da36d2 ci: Fix installed-tests until a newer GLib is released
Force-enable portal memory monitor until 2.63.3 is released
2019-12-11 14:15:54 +01:00
Bastien Nocera
bf91e3adf7 ci: GMemoryMonitor support is now merged in xdg-desktop-portal 2019-12-11 14:15:54 +01:00
Bastien Nocera
ae26695843 ci: Add dependencies for newer installed tests 2019-12-11 11:44:42 +00:00
Bastien Nocera
8520163bdf ci: Work-around successful installed tests having no logs
This works around a bug in gnome-desktop-testing.

See: https://gitlab.gnome.org/GNOME/gnome-desktop-testing/merge_requests/2
2019-12-11 10:32:13 +01:00
Bastien Nocera
7ec118f93a ci: Log successes for installed-tests as well
Use newer version of gnome-desktop-testing to log test results even if
successful.
2019-12-04 14:06:23 +01:00
Bastien Nocera
3a3382c275 tests: Don't skip static-link test
Set GLIB_TEST_COMPILATION=1 envvar so that the static-link test is run.
2019-12-04 14:06:23 +01:00
Bastien Nocera
ead670b1c4 ci: Run installed-tests on Fedora
Run installed-tests on a Fedora system.
2019-12-04 14:06:23 +01:00
Philip Withnall
805dc2ae93 ci: Move style-check-diff commands out to a separate sh file
This doesn’t change how they run, but does split the code out a bit and
mean we can interleave it with comments. Should make it a little less
vile.

Suggested by Emmanuele Bassi; see !1252.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-28 11:47:48 +00:00
Philip Withnall
95b8c1c697 ci: Use extends rather than YAML anchors for only-default
This makes things slightly more extensible in future, but introduces no
functional differences right now.

See https://docs.gitlab.com/ce/ci/yaml/README.html#extends.

Suggested by Jordan Petridis.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-28 11:38:25 +00:00
Philip Withnall
cd11067a03 ci: Use new Fedora v5 Docker image for all CI jobs
v5 was built using the fedora.Dockerfile updates from the previous few
commits.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-27 13:23:45 +00:00
Philip Withnall
2daebc7674 ci: Fix running all jobs on merge requests
Since we added `only: [merge_requests]` for the `style-check-diff` job,
that started running detached pipelines only for merge requests and only
containing that job, and not running the other jobs for merge requests
(only for branches).

That wasn’t the intention.

Follow the guide on
https://docs.gitlab.com/ee/ci/merge_request_pipelines/index.html#excluding-certain-jobs
to ensure that all jobs (including `style-check-diff`) are run for merge
requests.

This means we can no longer unconditionally use
`${CI_MERGE_REQUEST_TARGET_BRANCH_{NAME,SHA}}`, since they are only
defined for jobs which are running against a merge request rather than a
branch. Instead, use some `git rev-list` magic from
https://stackoverflow.com/a/4991675/2931197 to find the newest common
ancestor commit between the detached head that CI is running on, and the
known or likely target branch. Do the style check against the diff
between the newest common ancestor commit and the detached head.

(Note that `${CI_MERGE_REQUEST_TARGET_BRANCH_SHA}` was never actually
defined for any of our pipelines, since it’s only available for CI
pipelines running on merged branches, which is a GitLab Premium
feature. Oops, my bad.)

In order to find the newest common ancestor commit, we need to pull the
upstream remote, since the CI pipeline might be running on a fork of the
main repository where various branches (particularly `master`) are out
of date.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-27 12:00:54 +00:00
Philip Withnall
3156ea5be7 ci: Factor out only/except properties from jobs
We can use a template to factor these out and make things a bit more
maintainable. This should introduce no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-27 12:00:53 +00:00
Philip Withnall
efa7fa0375 ci: Run the style-check pipeline stage first
Don’t waste CI resources on compiling things which don’t comply with the
style rules.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-27 12:00:20 +00:00
Philip Withnall
b7fe4b84ee ci: Update all Debian CI runners to use v5 of the Dockerfile
This shouldn’t affect them (since it just adds the `clang-format-7`
package), but it’s good to keep everything on the same version.

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

See: #1552
2019-11-25 10:51:14 +00:00
Pavlo Solntsev
e95f47c395
CI: Code check formating in CI 2019-11-21 14:03:01 -06:00
Philip Withnall
1a53b73816 ci: Update .gitlab-ci.yml to use the latest Docker images
This is a follow-up to !1177, now that we’ve generated the new images.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-11-04 15:25:38 +00:00
Philip Withnall
197eff3fc8 ci: Add valgrind memcheck support on Fedora
Add a separate CI job which runs memcheck on the unit tests. This is
done as a separate job from the main build, since we don’t want it to
interact with code coverage at all.

Currently, failure of this job is ignored. Issue #333 will eventually
fix that.

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

Fixes: #487
2019-09-02 14:16:33 +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