Commit Graph

144 Commits

Author SHA1 Message Date
Philip Withnall
03ea524188 ci: Add libpcre2 dependencies and subproject
This is in preparation for porting `GRegex` to libpcre2, which is
happening in !2529. It’s a big port, though, and specially rebuilding
the CI images to add libpcre2 for it is a pain.

Add libpcre2, and then !2529 can drop the old libpcre dependencies when
the port lands.

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

Helps: #1085
2022-06-27 15:53:55 +01:00
Philip Withnall
5e00b30a29 ci: Add gdb to some CI images
This will be useful in general, for manually debugging failures if we
need (without having to rebuild the CI images to do so).

It will also be useful for the `assert-msg-test` test, which is being
reworked in !2767.

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

Helps: #1434
2022-06-27 15:53:55 +01:00
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
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
9817ae71d9 ci: Move clang-format-diff.py into CI directory
There’s no point in having it in the root directory when it’s only
really used for CI. It just clutters up the root.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-11 12:43:27 +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
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
1bdce46399 build: Bump Meson dependency to 0.60.0
As per the new policy in `docs/meson-version.md`, we can now bump the
dependency.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-05-06 13:01:44 +01:00
Philip Withnall
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
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
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
c540c6a80e ci: Add link to Coverage output at end of coverage job
This should make it a bit easier to find the coverage report, rather
than digging through the job artifacts.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2022-02-01 11:08:22 +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
93bde24c34 ci: Upgrade to clang-format-11 from clang-format-7
`clang-format-11` is now what’s available in our Debian Stable CI image.

This should fix failures in the `style-check-diff` job.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-11-23 13:13:56 +00:00
Philip Withnall
f432ebf7d5 ci: Add -fstack-protector to mingw64 cross file
See the comment in the code. As suggested by Nirbheek:
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/2287#note_1285058.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-13 10:44:23 +01: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
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
Philip Withnall
e728278f83 ci: Install the correct libpcre library in the Debian CI
The package naming is confusing. It turns out we’ve been installing the
wrong libpcre version for ages, but haven’t noticed because the correct
version has previously been installed on the system by default.

It seems that Debian Bullseye doesn’t have the old libpcre installed by
default, so now we have to fix this package name and make sure it’s
installed in the CI images. Building it as a subproject is a pain.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 17:08:35 +01:00
Philip Withnall
e988220f2d ci: Update Coverity download URI
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 17:08:35 +01:00
Philip Withnall
1bba03672e ci: Update Fedora CI images to new oldstable (33)
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 16:29:31 +01:00
Philip Withnall
0aff931ed3 ci: Update Debian CI image to new Stable (Bullseye)
Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-10-07 16:28:46 +01:00
Philip Withnall
1602ca1d3e ci: Update Android and mingw CI images
Fedora 29 is no longer available, and I need to rebuild these images so
libpcre is pre-downloaded as a subproject.

Update them to Fedora 31, which is what we use in `fedora.Dockerfile`.
This should allow some blobs to be shared in the container repository.

This isn’t the latest Fedora release, but I don’t want to go through the
hassle of updating all the CI images to F33 right now in addition to
updating the subproject caches.

`python-unversioned-command` is needed because the Android NDK calls
`python` without a version number. F29 must have installed this already.
The Android NDK setup appears to be OK with Python 3.

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
1a43d950b4 docs: Update various external links to use HEAD instead of master
Update several links to allow the remote to use its configured default
branch name, rather than specifying `master` as the default branch name.
This will help avoid breakage if any of these projects rename their
default branch in the future.

Fix a few of the links where they were hitting redirects or had moved.

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

Helps: #2348
2021-06-07 14:03:48 +01:00
Philip Withnall
ef41cc28b4 ci: Ensure the machine-id is set on the Fedora CI image
Run `systemd-machine-id-setup` when creating the image, so that
`/etc/machine-id` is created with a valid ID. Since systemd isn’t
started when running the CI image with podman/Docker, it’s not created
otherwise. This causes some tests to fail.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-01 13:55:03 +00:00
Philip Withnall
da50de9b30 ci: Include details of machine ID in CI output
Include the size of the `machine-id` file, but not the value itself as
that is sensitive for non-throwaway machines. What’s most useful for
debugging CI problems is knowing whether, and where, the `machine-id` is
set.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-03-01 13:54:09 +00:00
Frederic Martinsons
81e2fff49c Check if the remote already exists before adding it.
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-27 09:13:11 +01:00
Philip Withnall
602528d256 ci: Fix msys-mingw32 CI builds due to package rename
Fix by Christoph Reiter, see
https://gitlab.gnome.org/GNOME/glib/-/merge_requests/1879#note_1009843.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2021-01-19 09:00:54 +00:00
Frederic Martinsons
bbe47331a5 It seems the gitlab CI performs only a shallow clone of 1-depth
and so checkout only the HEAD of the branch.
This leads to not being able to find an ancestor since there is only one
new commit. I presume that when it worked, it was because of specific
settings of some users.

Now we fetch (with the same depth as the target branch) the source branch
and use it to compare sha1 and find the common ancestor.

Closes #2292

Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-11 17:04:52 +01:00
Frederic Martinsons
c2e21a8164 Move common code for searching common ancestor in a dedicated script
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2021-01-11 17:04:01 +01:00
Philip Withnall
39f33412db python: Reformat some files to keep style-check-diff happy
The version of `black` on the CI server wanted these changes. Make them
to keep the `style-check-diff` CI job from constantly failing.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-12-12 18:40:57 +00:00
Sebastian Dröge
fa8a39c6c6 Merge branch 'py-fixes' into 'master'
Python formatting improvements

See merge request GNOME/glib!1757
2020-11-20 18:10:40 +00:00
Philip Withnall
51651ac67e ci: Fix backslash escaping in run-docker.sh
Spotted by shellcheck (warning SC1117): `\e` is not an actual escape
sequence, so it’s interpreted as `\\e`. Best make that explicit.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-20 14:48:14 +00:00
Philip Withnall
d270b6c3db py: Various flake8 cleanups
None of these are particularly significant, but they do get the CI
output clean.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-17 15:50:07 +00:00
Philip Withnall
e187d836ad ci: Disable formatting warnings in flake8
We use `black` to handle formatting of Python code.

From https://stackoverflow.com/questions/59241007/flake8-disable-all-formatting-rules

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-17 15:50:07 +00:00
Philip Withnall
905b22a17e py: Reformat all Python files consistently
This commit is the unmodified results of running
```
black $(git ls-files '*.py')
```
with black version 19.10b0. See #2046.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
2020-11-17 15:50:07 +00:00
Frederic Martinsons
e817a049f0 Correct shellcheck errors (and ignore world splitting when we want it)
Signed-off-by: Frederic Martinsons <frederic.martinsons@sigfox.com>
2020-11-15 17:34:27 +01: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
Christoph Reiter
7d1e782c65 CI: Re-enable code coverage reporting for MSYS2 builds
It was disabled in !875 because lcov didn't support the new coverage
format produced by gcc9+. The latest lcov release in MSYS2 supports
it again, so re-enable everything.

lcov now writes native Windows paths to its output so adjust the path
fixup script to handle those.
2020-10-01 14:07:14 +02:00
Philip Withnall
cbf72f0dc9 ci: Add model file for Coverity
This isn’t used in the build at all, it’s just a copy of the model file
which is uploaded in our Coverity configuration. This should be kept up
to date with changes in the file on the Coverity servers.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-09-08 10:34:54 +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
Philip Withnall
1378a40734 ci: Limit depth of fetch for initial code checks
Rather than fetching the entire repository history, limit the fetch
depth to commits in the last 4 weeks. If a branch was branched longer
than 4 weeks ago, it seems reasonable to require it to be rebased before
it can be reviewed.

At the current rate of development, this reduces the bandwidth needed
for git pulls in the initial code checks from 73MB to 9MB.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-25 01:15:02 +01:00
Philip Withnall
5c09c9e977 ci: Limit depth of subprojects when cloning
Use the depth= argument from Meson 0.52 to limit the clone depth of
subprojects to 1. This should make the CI images a little smaller, and
reduce the bandwidth required to build them (although that’s not so
important because it only happens once every few months).

Similarly, only clone to a depth of 1 in `cache-subprojects.sh`, which
is run once every few months.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-07-09 12:51:21 +01:00
Philip Withnall
00bfb3ab44 tree: Fix various typos and outdated terminology
This was mostly machine generated with the following command:
```
codespell \
    --builtin clear,rare,usage \
    --skip './po/*' --skip './.git/*' --skip './NEWS*' \
    --write-changes .
```
using the latest git version of `codespell` as per [these
instructions](https://github.com/codespell-project/codespell#user-content-updating).

Then I manually checked each change using `git add -p`, made a few
manual fixups and dropped a load of incorrect changes.

There are still some outdated or loaded terms used in GLib, mostly to do
with git branch terminology. They will need to be changed later as part
of a wider migration of git terminology.

If I’ve missed anything, please file an issue!

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2020-06-12 15:01:08 +01:00
Nirbheek Chauhan
ab6b764e24 ci: growing_stack should be true for android and ios
We can't run this test when cross-compiling, but we know what this
should be on Android and iOS.
2020-05-29 02:44:44 +05:30