1
0
Fork 0
Commit graph

59 commits

Author SHA1 Message Date
Deborah Brouwer
2eada4fbe3 CI: Update ci-templates
Update the ci-templates commit sha so that additional fdo_log format
functions can be used when building CI containers.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-10-03 15:49:50 -07:00
Deborah Brouwer
a4777dbf87 drm_hwcomposer: CI: Add vts job for multi-displays
Currently VtsHalGraphicsComposer3_TargetTest is run only with a single
display. Use the configurable vkms driver to run vts with multiple
displays.

This job should help to catch errors that arise only when there are
multiple displays. It also allows the test
ConnectedDisplaysTest.IndependentConfigChange to run whereas it is
otherwise skipped for single display configurations.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-09-17 16:41:25 -07:00
Deborah Brouwer
8f82d3d682 drm_hwcomposer: CI: Add job to run with writeback
Currently VtsHalGraphicsComposer3_TargetTest is run without a writeback
connector enabled. Use the configurable vkms driver to create a writeback
connector and run VtsHalGraphicsComposer3_TargetTest.

This job should help to catch errors that arise only for writeback
connectors.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-09-17 16:41:25 -07:00
Deborah Brouwer
acb3e3d8f7 drm_hwcomposer: CI: Add job to run headless
Currently VtsHalGraphicsComposer3_TargetTest is run with a crosvm
display with a connected display. Use the configurable vkms driver to
run VtsHalGraphicsComposer3_TargetTest with a disconnected display.

This job should help to catch errors that arise only in headless mode.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-09-17 16:41:25 -07:00
Deborah Brouwer
5cf71b3a00 drm_hwcomposer: CI: Add reusable function for vts
Currently VtsHalGraphicsComposer3_TargetTest is run only once in a
single script. In anticipation of running vts with different display
configurations, add a reusable function to run vts, and use a different
script to actually run vts.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-09-17 16:41:25 -07:00
Deborah Brouwer
ba799096db drm_hwcomposer: CI: Add hotplugs test with vkms
Add a new test job to use the configurable vKMS driver to test hotplugs
from `aosp/platform_testing/tests/display/hcct/tests/hotplugs.cpp`

Skip the test `DetectSingleDisconnectHotplugs` which currently fails
because it expects drm-hwcomposer to send a disconnect event for the
primary display. When this test is updated on a public branch of
platform_testing, it will be added back to the CI job.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-09-12 08:55:59 -07:00
Deborah Brouwer
2e853865c2 drm_hwcomposer: CI: Refactor containers
The `ubuntu/x86_64_android` container is the base for running cts/vts
tests, but it is getting very large (~4GB) and takes a long time to build.
To make the base container smaller (~2.6GB), and to make it quicker to
rebuild specific components, carve out two new containers from the base
container:
  1) `ubuntu/x86_64_android_tools` for any tools that can be downloaded;
  2) `ubuntu/x86_64_android_binaries` for any binaries (excluding
      cuttlefish) that need to be built within the aosp repo.

Also, remove the jobs that start with the prefix `use-*`. These jobs pull
containers (e.g. debian/x86_64_cuttlefish) to make files inside the
container (e.g. cuttlefish.tar.xz) available to other jobs in the pipeline
as artifacts. But these `use-*` jobs can take a long time to run
(anywhere from 3 to 20 minutes to use the cuttlefish container). Instead,
use skopeo with umoci to fetch the containers and access their files,
which is much quicker.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-09-12 08:55:59 -07:00
Deborah Brouwer
ea5689b295 drm_hwcomposer: CI: Update to Android 16
In preparation for rebuilding all CI containers to use Android 16,
update CI/build variables to use Android 16 and Android SDK 36.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-08-19 14:52:08 -07:00
Deborah Brouwer
3312d98b61 drm_hwcomposer: CI: Save CTS failure logs
When $FDO_CI_BASH_HELPERS was added, it included an ERR trap that is
triggered when a cts failure is found in the invocation summary. This
prevents the full cts logs from being saved in the job results.

Revise the cts failure check to avoid triggering the trap on error and
allow the full cts logs to be saved.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-08-19 14:52:08 -07:00
Deborah Brouwer
5a1a5f7730 drm_hwcomposer: CI: Update ci-templates
Update the ci-templates commit sha so that the new fdo_log format
functions can be used when building CI containers.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-06-25 14:08:08 -07:00
Deborah Brouwer
4c6de08534 drm_hwcomposer: CI: Make ANDROID_SDK_VERSION global
The ANDROID_SDK_VERSION variable is defined separately in the jobs that
build the android and aospless containers. Instead, defined it globally
and make it available to all CI jobs. This will avoid errors and make it
easier to update in the future.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-06-23 09:10:55 -07:00
Deborah Brouwer
b6f7bd4fec drm_hwcomposer: CI: Stop duplicate pipelines
When a developer pushes changes to a merge request, the current workflow
rules will create two pipelines: one on the developer's fork and another
in the project namespace for the merge request.

To avoid this duplication, only run the pipeline in the project namespace
if a merge-request is open.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-06-10 14:25:29 -07:00
Deborah Brouwer
6066d0a628 drm_hwcomposer: CI: run VtsHalGraphicsComposer3_TargetTest
Add a new job to run VtsHalGraphicsComposer3_TargetTest on newly
built drm-hwcomposer.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
399f97fb89 drm_hwcomposer: CI: run CtsGraphicsTestCases
Add a job to run a subset of relevant tests from CtsGraphicsTestCases on
newly built drm-hwcomposer.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
7372e0c7e2 drm_hwcomposer: CI: Add a cuttlefish container
Add a container to build cuttlefish images. The container makes the
compressed cuttlefish images available to subsequent jobs that need to
emulate an x86_64 phone running android.

The cuttlefish image is customized to use mesa llvmpipe and lavapipe
drivers.

The container build takes about 5 hours so it is expected that this
would be run very rarely.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
3e1e5c2fed drm_hwcomposer: CI: Add new job to build for x86_64
Use the aospless x86_64 tarball to build drm-hwcomposer binaries for
x86_64 architecture. These binaries will be used subsequently to run the
cts and vts tests.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
eaf48a5434 drm_hwcomposer: CI: Rename job build -> build_arm64
Rename the `build` job to `build_arm64` to specify its architecture and
to distinguish it from subsequent jobs to build for x86_64.

Also move the script for the build_arm64 job to a separate file just to
keep the top level .gitlab-ci.yml simple and easy to read.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
1025c80600 drm_hwcomposer: CI: Build aospless arm64 tarball
Currently the aospless arm64 tarball is built manually outside of CI,
uploaded to the project, and then downloaded when the CI runs.

Instead, replace this manual process with a script that builds the
aospless arm64 tarball and saves the tarball inside the aospless container
for use later in the pipeline.

This ensures that the method of building the tarball is documented and
repeatable.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
4ace798d1f drm_hwcomposer: CI: Rename the aospless container
Rename the aospless container to include the word “aospless” to better
indicate its purpose and to distinguish it from other containers that will
be added subsequently.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
7e770100ab drm_hwcomposer: CI: Move .gitlab-ci.yml up a level
The `.ci/container/.gitlab-ci.yml` file is not specific to container
builds, so move it up a level to .ci/ to better reflect its more general
role.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
25db7bee14 drm_hwcomposer: CI: Move container tags to a file
Currently the container image tags are defined as variables in the top
level .gitlab-ci.yml. Move the tags to their own file so that more tags
can be added without cluttering the top-level .gitlab-ci.yml.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 13:09:43 -07:00
Deborah Brouwer
6243089984 drm_hwcomposer: CI: Update CI templates
Update the CI templates repo to benefit from recent improvements to make
the CI_PROJECT_DIR variable available when running a script to build a
container.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-04-23 10:33:57 -07:00
Deborah Brouwer
7d3bc9c7a8 drm_hwcomposer: CI: Use fdo ci-templates
Currently a customized container is built every time that the CI pipeline
runs. Instead, use the freedesktop ci-templates to save and re-use the
customized container in the drm_hwcomposer container registry.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-02-18 15:57:34 -08:00
Deborah Brouwer
2aea508046 drm_hwcomposer: CI: Make checkstyle a placeholder
The checkstyle job runs a quick script but currently makes use of a full
gitlab runner. Instead, add the placeholder tag to this job so that it
can be picked up and run in parallel with other light-weight jobs. This
should free up resources and avoid waits to run the checkstyle job.

Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com>
2025-02-18 15:57:34 -08:00
Lucas Berthou
1d5e201547 drm_hwcomposer: updating libdisplay-info to include pnp_id_table
The tarball needs to be updated with latest version of libdisplay-info
from aosp as it contains pnp_id_table that are required for work on
color calibration.

Change-Id: Iab57b31874d2c09de67695521f8619517e6082bc
signed-off-by: Lucas Berthou <berlu@google.com>
2025-01-15 15:55:51 +00:00
Lucas Berthou
7a8e1383fa drm_hwcomposer: fixing aospless tarball
The current tarball seems to be missing some includes for
libdisplay-info, this probably happened when trying to resolve some
clank incompatibilities. Overall the aospless flow should probably be
more robust/less error prone.

Change-Id: I35d785470440132bcff75baac089efdac3be849f
signed-off-by: Lucas Berthou <berlu@google.com>
2025-01-14 18:17:14 +00:00
Lucas Berthou
4483e4731d drm_hwcomposer: Add libdisplay-info dependency and update tar with library
Updating the Docker configuration to use new aospless tarball that
contains the required static libdisplay_info library for edid parsing.

Change-Id: Iccc893d4dabde36caca3da3e71d8b26193a82404
Signed-off-by: Lucas Berthou <berlu@google.com>
2024-12-19 17:53:04 +00:00
Roman Stratiienko
6e5c82eae6 drm_hwcomposer: CI: Properly upgrade drm_hwc aospless file
In the previous version, build flags pointed to Android API v33, while
headers were from Android API v35. This caused issues when using
"if __ANDROID_API__ >= 35" preprocessor macros.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2024-10-17 02:13:20 +03:00
Roman Stratiienko
57ba08add7 drm_hwcomposer: CI: Upgrade Ubuntu and clang version
Why:
The aospless file from Android-15 contains compiler flags that
clang-15 does not understand.

Additionally, new tidy findings were suppressed.
It would be nice to fix them in the future instead.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2024-10-17 02:13:14 +03:00
Roman Stratiienko
9472795c7b Revert "drm_hwcomposer: CI: publish docker image to local container registry"
This reverts commit a999307120.
2024-10-17 02:13:12 +03:00
Roman Stratiienko
0fea188c2c Revert "drm_hwcomposer: CI: use local container image for building"
This reverts commit ca89ea5a92.
2024-10-17 02:13:05 +03:00
Roman Stratiienko
fb5a9c33dc Revert "drm_hwcomposer: CI: Only run build-docker when necessary"
This reverts commit d82729393c.
2024-10-17 02:13:04 +03:00
Roman Stratiienko
df220978cb Revert "drm_hwcomposer: CI: Use upstream container image conditionally"
This reverts commit 7aff49bb90.
2024-10-17 02:13:02 +03:00
Mattijs Korpershoek
32170177d3 drm_hwcomposer: CI: Use upstream container image conditionally
Right now we use $CI_REGISTRY_IMAGE:latest as the docker image for
running build, tidy and checkstyle.

The problem with this is that CI_REGISTRY_IMAGE points to the *fork*'s
container registry.

For example, if the ddavenport user has this fork:
https://gitlab.freedesktop.org/ddavenport/drm-hwcomposer

Then CI_REGISTRY_IMAGE will be:
registry.freedesktop.org/ddavenport/drm-hwcomposer

This won't work for forks that never build the container image.

Use registry.freedesktop.org/drm-hwcomposer/drm-hwcomposer:latest as
container image by default.

For MRs that modify .ci/Dockerfile, a container will be rebuild
and the forks image will be used instead.

Link: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/97
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-10-14 17:34:12 -04:00
Mattijs Korpershoek
d82729393c drm_hwcomposer: CI: Only run build-docker when necessary
When building the docker image via docker in docker, we sometimes
see system errors such as:

*** WARNING: Service runner-zcexkv2-project-23176-concurrent-0-14607a9f5e2c806b-docker-0 probably didn't start properly.
Health check error:
create service container: Error response from daemon: bad parameter: link is not supported (services.go:208:0s)
Service container logs:
*********

This hinders all merge requests.

Limit the build-docker job to be only ran when .ci/Dockerfile is modified.

Link: https://gitlab.freedesktop.org/drm-hwcomposer/drm-hwcomposer/-/issues/96
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-10-07 09:09:02 +02:00
Drew Davenport
4be73eef30 drm_hwcomposer: CI: Use make -j for clang-tidy step
Local testing suggests that the parallelization of clang-tidy speeds
things up considerably.

Change-Id: I1a4aecc2efc43dd1929ff7fa86a649dbbb0d65e7
Signed-off-by: Drew Davenport <ddavenport@google.com>
2024-09-03 11:50:37 -06:00
Drew Davenport
3cb9555747 drm_hwcomposer: CI: Add -k to clang-tidy make
Find as many clang-tidy errors as possible rather than stopping on the
first one.

Change-Id: I298f5e1e5bd40aa2e96acf9d2196efa72e923055
Signed-off-by: Drew Davenport <ddavenport@google.com>
2024-09-03 15:35:49 +00:00
Drew Davenport
76b9d613da drm_hwcomposer: CI: Extend timeout for clang-tidy step
clang-tidy takes a long time, and the clang-tidy pipeline step could
time out for changes which affect a large number of files.

Extend the timeout for clang-tidy so the pipeline won't fail on such
changes.

Signed-off-by: Drew Davenport <ddavenport@chromium.org>
2024-08-09 09:40:22 -06:00
Mattijs Korpershoek
ca89ea5a92 drm_hwcomposer: CI: use local container image for building
The freedesktop instance provides a docker container registry with
ubuntu 23.04 based images ready to be used for building drm_hwcomposer.

Migrate to using that container image in order to:
- Avoid apt-get installing all dependencies for each job
- Remove duplication between the Dockerfile and the .gitlab-ci.yml

Since the container image provides aospless, we no longer need to download it
for each pipeline stage.
Also, this updates the folder structure:

Before:
/builds/drm-hwcomposer/drm-hwcomposer/
/builds/drm-hwcomposer/aospless

After:
/builds/drm-hwcomposer/drm-hwcomposer/
/home/user/aospless

For "tidy", this new structure requires to override the BASE_DIR variable.

Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-07-12 16:36:49 +00:00
Mattijs Korpershoek
a999307120 drm_hwcomposer: CI: publish docker image to local container registry
drm_hwcomposer provides a .ci/Dockerfile which can be used as a base
image to rebuild drm_hwcomposer.
Unfortunetly, the CI stages (build, tidy, style) do not use this
container image. Instead, it re-installs all the dependencies for
each stage.

To use this container image, we should also build it via the CI.

Add a new build stage to build the container and publish it to the
local (gitlab-provided) docker registry.

This way, it can be reused by the other build stages.

Note: as documented in [1], this requires that the configured Gitlab
runner can run docker in privileged mode.

[1] https://docs.gitlab.com/ee/ci/docker/using_docker_build.html#use-docker-in-docker
Signed-off-by: Mattijs Korpershoek <mkorpershoek@baylibre.com>
2024-07-12 16:36:49 +00:00
Roman Stratiienko
2a93e4c882 drm_hwcomposer: CI: Use aospext to provide headers for clang-tidy
Since we're now using aospless archive for meson.build, we can use
headers from there and remove .ci/android_headers/ directory completely.

Adding aospless cflags also raised some new tidy checks fails,
which were fixed by this commit.

Since clang-tidy now relies on aospless files, running CI on the host
can't be supported and removed. Running CI within the docker container
is the only option left.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2023-11-21 18:50:58 +02:00
Roman Stratiienko
dddbb4eaeb drm_hwcomposer: CI: Enable merge request pipelines
Now, freedesktop forbids running user pipelines to avoid hacker attacks.
This change will ensure that only the drm_hwcomposer project runs the
pipeline.

Change-Id: I87b58c87b41cfd31fb41c49c0faf399950b95022
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2023-09-20 00:23:32 +03:00
Roman Stratiienko
87b716c070 drm_hwcomposer: CI: Update runner os to ubuntu 23.04
Ubuntu 22.10 is no longer supported and can't be used as a runner OS.

Change-Id: Ib52c3849442dfcedb6a94c5e7c7bbff948e5060c
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2023-09-20 00:23:32 +03:00
Roman Stratiienko
2bf68c3749 drm_hwcomposer: Add meson build to CI
Now CI is building drm_hwcomposer for arm64 arch and generates
ready-to-deploy artifacts.

Dependencies for meson cross build were extracted from Android-13
using GloDroid/aospext project [1].

./build_deploy.sh script was migrated into Makefile and no longer
require AOSP to work. Usage example:

    make build_deploy

Only arm64 platform is supported at this moment.
Other platforms will be added later.

[1]: https://github.com/GloDroid/aospext
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2023-01-04 17:17:36 +02:00
Roman Stratiienko
a7913de518 drm_hwcomposer: CI: Bump-up clang toolchain to v15
Address new clang-tidy findings, in most cases 'misc-const-correctness'
check was addressed by adding 'const' modifier, or in some cases changed
to 'auto' (where it's better for formatting).

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2022-10-20 14:14:33 +03:00
Roman Stratiienko
cf80b9b158 drm_hwcomposer: CI: Bump clang toolchain version to v14
Additionally:
1. Fix new clang-tidy findings
2. Disable readability-identifier-length check for all tidy levels

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2022-05-09 18:19:45 +03:00
Roman Stratiienko
780f7dacf9 drm_hwcomposer: CI: Upgrade to clang-13 && clang-tidy-13
+ address new clang-tidy findings.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2022-01-20 17:21:46 +02:00
Roman Stratiienko
cef5c77ef9 drm_hwcomposer: CI: Replace shell scripts with Makefile
This won't make much benefits for CI, but for local native builds will
significantly speed-up build cycle by allowing parallel build and by
using dependency tracking logic.

Signed-off-by: Roman Stratiienko <roman.o.stratiienko@globallogic.com>
2021-12-22 17:31:54 +02:00
Roman Stratiienko
d26619b5d0 drm_hwcomposer: CI: Upgrade clang-* to v12
- Enabling readability-ientifier-naming tidy check does require to specify
MacroDefinitionIgnoredRegexp key, which is available only in clang-tidy-12.

- Clang-12 isn't available on ubuntu 20.10, therefore upgrade to 21.04.

- "DEBIAN_FRONTEND: noninteractive" is required to prevent ubuntu 21.04
from hanging, presumably due to waiting for the user input.

- A positive side effect of upgrading to clang-12 is new clang-tidy-12,
which exposed new issues in the code which is also fixed by this commit,
e.g:

    Failed cppcoreguidelines-narrowing-conversions check with error:
    error: narrowing conversion from 'uint32_t' (aka 'unsigned int') to 'float'

require explicit casting to pass the check, while some of such fails are caused
by incorrect variable type and fixed by changing the type to correct one.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
2021-08-29 15:54:17 +03:00
Roman Stratiienko
d21071f7d5 drm_hwcomposer: CI: Increase coverage
Add the following files to the build:
backend/BackendClient.cpp
backend/Backend.cpp
backend/BackendManager.cpp
backend/BackendRCarDu.cpp
bufferinfo/legacy/BufferInfoImagination.cpp
bufferinfo/legacy/BufferInfoLibdrm.cpp
bufferinfo/legacy/BufferInfoMaliHisi.cpp
bufferinfo/legacy/BufferInfoMaliMediatek.cpp
bufferinfo/legacy/BufferInfoMaliMeson.cpp
bufferinfo/legacy/BufferInfoMinigbm.cpp
compositor/DrmDisplayComposition.cpp
compositor/DrmDisplayCompositor.cpp
compositor/Planner.cpp
drm/DrmGenericImporter.cpp
DrmHwcTwo.cpp
drm/ResourceManager.cpp
drm/VSyncWorker.cpp
tests/worker_test.cpp
utils/autolock.cpp

Files 'bufferinfo/BufferInfoMapperMetadata.cpp' and 'utils/hwcutils.cpp' require
a lot of additional headers, therefore move them out of the scope of this commit.

'utils/gralloc.h' isn't planned to use in pure-linux builds, therefore remove
it from 'utils' and put it into '.ci/android_headers/hardware/'

Fix minor tidy fails.

Fix linux build fails (missing includes) due to differences between libc and
bionic.

Comment-out some sections in 'tests/test_include' which aren't used by drm_hwc
but causing build failures for CI due to missing dependencies.

Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Reviewed-by: Matvii Zorin <matvii.zorin@globallogic.com>
2021-04-06 12:12:17 +03:00