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>
Build android-agnostic code in linux environment.
Enable static code analysis using clang-tidy.
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Check the subject prefix starts with "drm_hwcomposer: " and we have
Signed-off-by tags for both author and committer.
Change-Id: Ib26b8e5cbeae2156014f2bbfb8703545bdc1decb
Signed-off-by: Sean Paul <seanpaul@chromium.org>
This will be useful for adding more functionality to it. It's not very
practical to script inside the yml.
Change-Id: I71aa6b40d282f750eb9bce65dd2cfd9e2828905b
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Updating clang-format to 5.0 to get a bit more control over our
styling. Two things that will be beneficial:
- Alphabeticalize headers
- More control around line breaking, especially preferring
val = SomeFunction(arg1,
arg2);
vs:
val =
SomeFunction(arg1, arg2);
It's still not perfect, but it seems greatly improved.
Signed-off-by: Sean Paul <seanpaul@chromium.org>
The clang-format pipeline generates false negatives
sometimes, with:
$ git diff -U0 --no-color master...HEAD | clang-format-diff-3.5 -p 1 -style=file > format-fixup.patch
fatal: ambiguous argument 'master...HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
as seen here:
https://gitlab.freedesktop.org/john.stultz/drm-hwcomposer/-/jobs/932
This tries to address the issue by explictly fetching
freedesktop/master and referencing FETHC_HEAD instead of master
which doesn't always exist.
Change-Id: I7a07d412eae164841427da90dfc7298697c5e783
Reviewed-by: Alexandru Gheorghe <alexandru-cosmin.gheorghe@arm.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>