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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Local testing suggests that the parallelization of clang-tidy speeds
things up considerably.
Change-Id: I1a4aecc2efc43dd1929ff7fa86a649dbbb0d65e7
Signed-off-by: Drew Davenport <ddavenport@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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>
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>