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>
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>
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>
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>
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>
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>
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.
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>
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>
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>
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>
This should be generated based on the available SDK versions and the
iPhone version you want to target, but that's something we can do
when adding macOS and iOS CI.
The gtk-doc tests are hardcoded by Meson to output as `glib /
gio-doc-check`, `glib / gobject-doc-check`, etc., without an explicit
project name and suite. This causes the following exception in the
report parser:
```
Traceback (most recent call last):
File ".gitlab-ci/meson-junit-report.py", line 50, in <module>
(project_name, suite_name) = full_suite.split(':')
ValueError: not enough values to unpack (expected 2, got 1)
```
Signed-off-by: Philip Withnall <withnall@endlessm.com>
It’s needed to provide the `pip3` executable, which the `Dockerfile`
later uses.
Follow-up to !1464.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
pip in MSYS2 seems to install scripts into $USERPROFILE instead of $HOME
which means the MSYS2 meson, which is newer, wins. Make sure $USERPROFILE
is in PATH as well.
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.
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>
I haven’t tested any of them. This is entirely mechanical. I used
shellcheck 0.7.0 with default options.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
Spotted by Daniel Stone: the addition of the `echo` commands in commit
65541f1ad meant that the exit status from `clang-format-diff.py` was
being lost.
The incorrect use of `set +e` rather than `set -e` meant that
intermediate commands could fail without the failure being noticed.
Signed-off-by: Philip Withnall <withnall@endlessm.com>
If podman is used, as is usually the case on a Fedora Workstation
installation, make sure not to use "sudo" as that's not needed.
Also ask podman's backend (buildah) to create Docker compatible images
through an environment variable rather than a command-line argument.
See https://gitlab.gnome.org/GNOME/glib/merge_requests/1255
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.
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
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>
The dockerd instance on some (but not all) GitLab CI runners doesn’t
like the OCI output from the version of podman on Fedora 31, which is
causing a lot of spurious CI failures.
If whoever’s running `run-docker.sh` is using podman to emulate docker,
it needs to be told to output in Docker format, not OCI format.
Signed-off-by: Philip Withnall <withnall@endlessm.com>