1
0
Fork 0
android_external_drm_hwcomp.../.gitlab-ci.yml
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

40 lines
792 B
YAML

image: ubuntu:21.04
variables:
DEBIAN_FRONTEND: noninteractive
before_script:
- apt-get --quiet update --yes >/dev/null
- apt-get --quiet install --yes clang-12 clang-tidy-12 clang-format-12 git libdrm-dev blueprint-tools libgtest-dev >/dev/null
stages:
- build
- style
build:
stage: build
script: "./.ci/.gitlab-ci-clang-build.sh"
artifacts:
when: on_failure
untracked: true
checkstyle:
stage: style
script: "./.ci/.gitlab-ci-checkcommit.sh"
artifacts:
when: on_failure
untracked: true
tidy-coarse:
stage: style
script: "./.ci/.gitlab-ci-clang-tidy-coarse.sh"
artifacts:
when: on_failure
untracked: true
tidy-fine:
stage: style
script: "./.ci/.gitlab-ci-clang-tidy-fine.sh"
artifacts:
when: on_failure
untracked: true