Commit Graph

85 Commits

Author SHA1 Message Date
Kenny Levinsen
c8a9fb4e7f ci: Enable weston-launch explicitly for test
Signed-off-by: Kenny Levinsen <kl@kl.wtf>
2022-01-27 15:38:38 +00:00
Simon Ser
6338dbd581 build: deprecate fbdev backend
Rename the build option to "deprecated-backend-fbdev" so that a
previously configured build dir doesn't retain the old setting.
This is consistent with the existing "deprecated-wl-shell" option.
Make the option default to "false".

Print a warning when fbdev is force-enabled.

Signed-off-by: Simon Ser <contact@emersion.fr>
References: https://gitlab.freedesktop.org/wayland/weston/-/issues/581
2022-01-25 16:28:05 +00:00
Pekka Paalanen
3569de7cd1 CI: emit cobertura artifact from only one job
I do not know what happens if multiple jobs declare
artifacts:reports:cobertura. Maybe the last job to finish wins? Who
cares, Gitlab can only show the results from one cobertura report in the
MR diff view.

Recently, the MR diffs have the coverage annotations, but there was a
time when they seemed to be missing. I don't know why.

Let's make sure the cobertura report Gitlab will use is from the "main"
build only: 64-bit Debian with full features and gcc.

I do not move the after_script, because maybe someone could have a
reason to look at arch-specific coverage reports, so I want to leave the
HTML there in the artifacts.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-12-02 15:51:55 +02:00
Marius Vlad
288214323c .gitlab.ci: Enable debug for libsteat and for the DRM backend
As the drm-smoke test randomly reports having the connector disabled,
and with it libseat reports setMaster errors, this enables DRM backend
debug messages for the kernel, and for libseat in an attempt to
track down the issue, whenever it might happen again.

These are pretty harmless, in terms of data being generated as we only
have a single DRM test using VKMS, and the libseat debug message aren't
that verbose, so we're safe keeping them for the time being.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-11-30 17:36:58 +02:00
Leandro Ribeiro
6e98c0dfd1 CI: bump mesa and wayland-protocol versions for dma-buf feedback
Bump the wayland-protocol dependency version in order to include dma-buf
feedback, whose support in Weston is added in the next commits.

Also, as we need the newer EGL extension EGL_EXT_device_drm_render_node
to add the support for dma-buf feedback, bump the Mesa dependency
version as well.

It also includes some minor changes in order to keep build-deps.sh more
consistent.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2021-11-25 10:43:53 -03:00
Daniel Stone
4564b799b8 ci: Move Debian from Buster to Bullseye
Now Debian 11 (Bullseye) has been released, shift our CI builds to using
that instead of the older Buster.

Due to dependency-chain changes, we have to install a lot more packages
explicitly and retain more at runtime. This is exacerbated by pkg-config
now requiring the entire chain to be installed, not just the immediate
dependencies.

Our documentation toolchain also gets bumped to a higher version to deal
with Doxygen changes.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-11-25 10:55:31 +02:00
Daniel Stone
753b6656fe CI: Upgrade kernel to v5.14
Older kernels cannot be built and booted with GCC 10+, as included in
Debian bullseye, due to unfortunate stack-canary issues:
    https://lore.kernel.org/lkml/20200314164451.346497-1-slyfox@gentoo.org/T/

Upgrade to the last-released kernel, 5.14, to fix this.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-11-25 10:55:31 +02:00
Marius Vlad
43ec334c77 gitlab-ci: Use the same name as for check-commits
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-10-18 15:51:16 +03:00
Marius Vlad
15a552b671 gitlab-ci: Check merge request for allowing edits
Ensures that users tick allow collabration to make rebasing possible
from maintainers, and fast forward merge requests.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-10-18 15:27:28 +03:00
Pekka Paalanen
645df9556d ci: bump test timeouts
This is prompted by the spurious CI failure
https://gitlab.freedesktop.org/wayland/weston/-/jobs/13891809
saying:

31/36 output-damage                          TIMEOUT        122.52s   8 subtests passed
32/36 output-transforms                      TIMEOUT        122.52s   16 subtests passed
33/36 subsurface                             TIMEOUT        122.52s
34/36 xwayland                               TIMEOUT        122.51s
35/36 ivi-shell-app                          TIMEOUT        122.51s
ERROR: Job failed: execution took longer than 5m0s seconds

That is hitting both kinds of timeouts at the same time: the per-test
timeouts, and the CI job total timeout.

That run seems to have had a particularly ill fortune, as a simple retry
finished the same job in 2 minutes, and the longest running test took
only 24 seconds.

Nevertheless, by Daniel Stone's suggestion let's bump both timeouts:

- the per-test timeout to 120 seconds, which with the multiplier in CI
  goes up to 8 minutes

- the job timeout for all build related jobs to 15 minutes

The timeout for tests_standalone is not bumped as we are not adding
significant amounts of new tests there.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-09-22 16:29:05 +03:00
Simon Ser
eb347687e7 ci: upgrade seatd to 0.6
This upgrades seatd to the latest version.

Examples are disabled by default. Man pages are already disabled
by auto_features=disabled. Other build options have been renamed.

Signed-off-by: Simon Ser <contact@emersion.fr>
2021-09-14 16:19:44 +02:00
Leandro Ribeiro
d259bbeccd ci: replace kvmconfig with kvm_guest.config
Remove the following warning:

WARNING: 'make kvmconfig' will be removed after Linux 5.10
Please use 'make kvm_guest.config' instead.

Signed-off-by: Leandro Ribeiro <leandro.ribeiro@collabora.com>
2021-08-13 10:53:26 -03:00
Daniel Stone
ec1ce9fc26 ci: Add clang build jobs
Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 18:42:25 +01:00
Daniel Stone
c91a34fb03 ci: Remove erroneous extension from .build-no-test
This shouldn't extend the base .build-env, since we have per-environment
extensions.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 18:42:25 +01:00
Daniel Stone
348e3a9abd CI: Separate build types out into stages
Give ourselves a bit more separation between the different job types, so
it's easier to see what's running and/or failing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
c26fa7e462 CI: Add ARMv7 support
ARMv7 is still an important architecture for us to run on, and running
on ARMv7 also gives us 32-bit build coverage. As distros are deprecating
their non-64-bit-x86 support, this may be our only realistic chance of
ensuring that our build is also 32-bit-clean.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
3530c522f8 CI: Add full AArch64 KVM support
Build a kernel for AArch64 and run it under virtme just like we do for
x86-64.

This requires adding support for the AArch64 defconfig variant, and
accommodating for the fact that it builds DRM as a module by default
rather than built in. The virtme branch we are using has also been
rebased on top of newer virtme upstream which unbreaks AArch64.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
daaa518b0e CI: Add initial AArch64 support
This only runs a single build job, to build without GL and not run any
tests, as KVM support is not yet included.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
20bb260f7d CI: Parameterise kernel build a bit more
AArch64 needs different names and paths to x86-64, so let's allow for
that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
2de949f723 CI: Use 'needs' to make dependencies more clear
GitLab CI has two execution scheduling models. The original model is to
split jobs into stages; jobs within a single stage may execute in
parallel, but execution is serialised between stages.

As we move to supporting multiple OSes and architectures, there is no
need to serialise, e.g. the AArch64 Linux build against the x86-64
FreeBSD container preparation.

Declare our dependencies explicitly using `needs`.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
ca08c495ad ci: Bump Meson to 0.57.1
0.57.0 has a bug where the whole test harness crashes when using TAP and
failing tests, cf. https://github.com/mesonbuild/meson/pull/8385

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
770746e089 CI: Start parameterising for OS/architecture
No functional change to the test runs, apart from changing the job
names. This will allow us to test along more axes without more
duplication.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
c2642eb21a CI: no-test jobs don't need KVM
We only need KVM for testing.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
36ad69e65e CI: Deduplicate $PATH
No need to set it twice.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
3e6b6a4095 CI: Rename job names to keep parameters first
GitLab already groups our various stages (container, build, etc) into
separate UI elements. Within those stages, the important information is
the parameterisation (architecture, OS, toolchain). We don't want that
to get ellipsised, so put that first in the job names.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
ebca36da66 CI: Document the build and container process
Explain what we do within our CI and why, with links as required.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
dd6e88dc5c CI: Build wayland-protocols in container
Keep this as part of our container image; there's no reason to pull it
for every single build.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Daniel Stone
d98e3dadd4 CI: Use appropriate parallelism for container builds
The shared runners export ${FDO_CI_CONCURRENT} for the appropriate
number of CPUs we should use during our builds.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-08-03 11:13:23 +00:00
Jonas Ådahl
10c072b3f5 ci: Use ci-fairy to check for Signed-off-by
[daniels: Only run on MRs.]

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-07-31 16:28:22 +00:00
Daniel Stone
0bef636b04 ci: Switch to using new rules syntax
The rules syntax is more clear and explicit than the previous
only/except. Switch to using that.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-07-31 16:28:22 +00:00
Jonas Ådahl
4fc87f8316 ci: Update ci-templates to newer version
[daniels: Extracted from previous patch, updated to even-newer version.]

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
2021-07-31 16:28:22 +00:00
James Hilliard
d6dcd9bcd9 Update gitlab-ci pipewire to version 0.3.31
Updating PipeWire to the latest version lets us check that everything
still works well, and shows users that they are able to use it.

[daniels: Updated to 0.3.31, use symbolic ref tags rather than SHAs.
          0.3.32 is released, but doesn't build in our Debian
          environment; this is fixed upstream but there is no release
	  for it yet.]

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
2021-07-31 15:49:09 +00:00
Marius Vlad
25296db20a gitlab-ci.yml: Use same container source as the docs
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
2021-07-28 21:42:52 +03:00
Derek Foreman
f09710bd25 ci: Fix pull rate limit errors
Pull the container from a source without a rate limit

Suggested by Daniel Stone <daniels@collabora.com>

Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2021-07-28 10:55:48 -05:00
Daniel Stone
58dba727c9 CI: Use FDO_CI_CONCURRENT
$FDO_CI_CONCURRENT is provided by in the CI environment by the fd.o
GitLab runners to tell us how many parallel processes would be 'good' to
use.

Use this to override the default Ninja invocation which uses as many
CPUs as available, and instead tell it to use as many parallel processes
as the runner thinks we should during the build process.

Tests are invoked using `meson test` inside a virtme/QEmu VM; whilst
Meson's test backend will use as many processors as availble, virtme
will by default create a single-CPU VM. So if we create a VM with as
many CPUs as we should have parallel processes, we can let it use all of
them. This also requires quadrupling the requested RAM so ASan doesn't
force us straight into OOM.

Suggested by @daenzer.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-05-18 14:11:49 +01:00
Daniel Stone
8ee025d119 CI: Quieten virtme kernel output
We don't need the entire verbose boot log in CI every time.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-05-17 13:14:28 +00:00
Pekka Paalanen
7baece632f CI: shorten job names
The old job names were really long, so long that Gitlab web UI had to
almost always ellipsize them, showing only the beginning which is the
same fof the two and hiding the part that actually matters.

Rename the templates and the jobs to be shorter and more descriptive.
Meson is the only tool we build with. All builds are native. Default
options is a long way to say full-featured and besides libseat was not
even default yet we build it.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-05-15 16:12:59 +00:00
Pekka Paalanen
4a644e34d9 CI: put coverage-html output into file
I'm tired of scrolling through that flood when looking at CI logs. It's
just listing every gcno, gcda and c file name as it parses them.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-05-15 16:12:59 +00:00
Pekka Paalanen
b27f539714 CI: turn BUILDDIR and PREFIX into CI variables
Change BUILDDIR and PREFIX from exported shell variables into CI
variables. This way they can be used in CI configuration, e.g.
artifacts.

The main reason for this change is that it makes it possible to use
these variables in after_script, which is not possible with shell
variables as the values do not carry over there.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-05-15 16:12:59 +00:00
Pekka Paalanen
5de3b047b7 CI: use address sanitizer without leak checks
Use address sanitizer to catch use-after-free and other errors when
running the test suite.

Leak detection is disabled, because currently there are too many leaks,
making almost all tests fail otherwise.

The atexit=1 is for verifying that ASan was actually used.

The default 128 MB of RAM in the qemu machine leads to oom-killer
killing most tests, so bump the memory size to 1 GB.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-05-12 14:23:21 +03:00
Daniel Stone
61f2e0273f CI: Run Pages build on main
Predictably, there was one thing I forgot with !600, which was to fix up
the CI rules for the transition. Oops.

Signed-off-by: Daniel Stone <daniels@collabora.com>
2021-04-27 18:58:09 +01:00
Kenny Levinsen
700ede50ef ci: Set timeouts on various stages
Most of our stages take just a single minute to complete, while the standard
timeout on gitlab CI is 60 minutes.

Set a 5 minute timeout on quick stages, and a 30 minute timeout on the image
build step to ensure we fail fast and don't tie up CI resources.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
2021-04-20 11:38:58 +00:00
Pekka Paalanen
640682115e CI: a new style for LCOV reports
The standard style of LCOV HTML reports is a bit harsh to look at. This
commit replaces it with a new one.

The new CSS was written from scratch by looking at the HTML source code
of a generated LCOV report. The original gcov.css file was not used.

The color scheme is neutral, trying to avoid a Christmas tree effect.
The colors are intended to be calm while also distinguishable, and not
hamper text readability.

The font lists were taken from Gitlab with the hope that it will blend
in a little better when viewing from MR artifacts.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-04-17 11:53:16 +00:00
Kenny Levinsen
0db9176cbd ci: Build with libseat enabled
This installs libseat in the debian image build from source in order to enable,
build and test weston with libseat support.

Signed-off-by: Kenny Levinsen <kl@kl.wtf>
2021-04-15 22:35:48 +02:00
Pekka Paalanen
1c73ff8d57 CI: test skips are failures
In CI we should never get a skip, so turn them into failures to make
sure we notice.

This is enabled only for the configuration where we build everything. If
anything is disabled, skips are expected.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-03-12 16:14:28 +02:00
Pekka Paalanen
f6ff85b1b7 CI: work around Gitlab Cobertura parsing quirk
This should not be necessary, but my testing with fd.o Gitlab 13.9.1
shows this is needed. Otherwise the coverage markings will not appear in
a MR diff view.

Apparently Gitlab has some problem with 'filename' attribute containing
"../" in Cobertura XML files, even when that does result in a correct
path. Or maybe the problem is is with the <source> path referring to the
build dir which from Gitlab perspective does not exist in the project,
even though builddir/../ is a good path.

This sed hack removes the "../" part and the last element in the
<source> path correspondingly.

See https://gitlab.freedesktop.org/wayland/weston/-/merge_requests/567
for my testing.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-03-08 15:57:34 +02:00
Pekka Paalanen
e72119f1ee CI: add test coverage results
This runs the coverage tools to produce HTML pages listing the code lines /
functions / branches hit/totalled by the test suite.

Nowadays Gitlab has some Cobertura support itself:
https://docs.gitlab.com/ee/user/project/merge_requests/test_coverage_visualization.html

lcov is needed for the HTML report, gcovr is needed for the Cobertura
report. 'ninja clean' must be removed, otherwise it deletes the coverage
files before they are analysed.

Seeing the test suite code coverage is really interesting. It can guide
designing tests. If Gitlab MRs show the coverage in diff view, it shows
if new code actually gets executed in CI.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-03-08 15:55:14 +02:00
Pekka Paalanen
30104bd89a gl-renderer: support XYUV8888 wl_shm format
This support is added so that the XYUV shader variant can be tested with
wl_shm from the test suite.

Libwayland version requirement is bumped to get WL_SHM_FORMAT_XYUV8888.
Libwayland is bumped to 1.18 too in the CI image. libwayland-dev package
is dropped, because we build wayland anyway.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-25 14:36:24 +02:00
Pekka Paalanen
a3b68c29f9 CI: bump Mesa to 20.3.1
The version we used does not advertise GL_EXT_color_buffer_half_float
with llvmpipe even though the functionality seems to work.

If the extension is not advertised, the future commit
"tests: extend output-damage to GL shadow framebuffer"
will result in a test failure.

Upgrade Mesa, this gets the extension advertised and the test is happy.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-25 13:20:15 +02:00
Pekka Paalanen
bcf37c937a CI: expose test results as junit
This allows Gitlab to show a detailed test report in a human friendly
manner on a merge request page.

The junit output depends on Meson 0.55, but Meson in CI is bumped to the
latest release on Feb 15th. It is beneficial to use the newest
possible Meson in CI even if we do not require it, so that we benefit
from fixes, e.g. new warnings about accidentally using more recent
Meson features than our minimum Meson version supports.

Meson 0.57 is required for proper test names in the Gitlab report after
switching the tests to TAP. See:
https://github.com/mesonbuild/meson/issues/8316

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
2021-02-15 11:16:15 +02:00