Skip to content
Snippets Groups Projects
Verified Commit 68688fac authored by Oto Šťáva's avatar Oto Šťáva
Browse files

.gitlab-ci: use Arch for linting

This allows us to use the newest versions of linter tools.
parent 0a1f0024
1 merge request!1546Protocol layers and other parts refactoring (+ nits)
......@@ -37,6 +37,10 @@ Checks: |-
-readability-magic-numbers,
-readability-non-const-parameter,
-readability-redundant-declaration,
-clang-analyzer-core.UndefinedBinaryOperatorResult
# TODO: remove `-clang-analyzer-core.UndefinedBinaryOperatorResult` when we
# upgrade to Clang >=18 (it's a false positive )
WarningsAsErrors: |-
cert-*,
......@@ -45,7 +49,7 @@ WarningsAsErrors: |-
readability-*,
-readability-non-const-parameter,
HeaderFilterRegex: '(contrib/ucw/*.h|/usr/*.h)'
HeaderFilterRegex: 'contrib/ucw/*.h'
CheckOptions:
- key: readability-identifier-naming
value: 'lower_case'
......
......@@ -20,7 +20,7 @@ variables:
# IMAGE_TAG is a Git branch/tag name from https://gitlab.nic.cz/knot/knot-resolver-ci
# In general, keep it pointing to a tag - use a branch only for development.
# More info in the knot-resolver-ci repository.
IMAGE_TAG: 'v20240506'
IMAGE_TAG: 'v20240604'
IMAGE_PREFIX: '$CI_REGISTRY/knot/knot-resolver-ci'
image: $IMAGE_PREFIX/debian12-knot_3_3:$IMAGE_TAG
......@@ -84,6 +84,12 @@ stages:
reports:
junit: build_ci*/meson-logs/integration.deckard.junit.xml
.after_build_arch: &after_build_arch
<<: *after_build
image: $IMAGE_PREFIX/arch:$IMAGE_TAG
needs:
- build-arch
.nodep: &nodep
<<: *common
needs: []
......@@ -112,6 +118,15 @@ archive:
script:
- apkg make-archive
build-arch:
<<: *build
image: $IMAGE_PREFIX/arch:$IMAGE_TAG
script:
- meson build_ci_arch --prefix=$PREFIX -Dmalloc=disabled -Dwerror=true
- ninja -C build_ci_arch
- ninja -C build_ci_arch install >/dev/null
- ${MESON_TEST} --suite unit --suite config --suite dnstap --no-suite snowflake
build-stable:
<<: *build
script:
......@@ -264,7 +279,7 @@ lint:pedantic:
- ninja -C build_pedantic_clang
lint:tidy:
<<: *after_build
<<: *after_build_arch
stage: sanity
script:
- ninja -C build_ci* tidy
......
......@@ -181,6 +181,13 @@ add_project_arguments(
language: 'c',
)
if meson.get_compiler('c').get_id() == 'gcc'
add_project_arguments(
'-Wno-nonnull-compare', # reasonable to do in assertions
language: 'c',
)
endif
# Files for clang-tidy lint
c_src_lint = files()
......
......@@ -312,5 +312,7 @@ KRESD_LOG_IO_CLOSE = re.compile(r'^\[io \].*closed by peer.*')
@contextmanager
def make_kresd(workdir, certname=None, ip='127.0.0.1', ip6='::1', **kwargs):
with Kresd(workdir, ip=ip, ip6=ip6, certname=certname, **kwargs) as kresd:
yield kresd
print(kresd.partial_log())
try:
yield kresd
finally:
print(kresd.partial_log())
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment