1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

add cppcheck CI stages

This commit is contained in:
Niklas Eiling 2020-09-03 16:58:18 +02:00 committed by Steffen Vogel
parent 1aebd550de
commit 13c4646ce8
2 changed files with 37 additions and 0 deletions

View file

@ -168,6 +168,40 @@ test:flake8:
tags:
- docker
test:cppcheck 1/2:
stage: test
needs: ["build:fedora:x86_64"]
script:
- cppcheck --max-configs=32 -j 32 --error-exitcode=1 -q --std=c++11 -I include/villas src/ lib/ tests/unit/ | tee cppcheck-error.log
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
dependencies:
- build:fedora:x86_64
tags:
- docker
artifacts:
when: on_failure
paths:
- cppcheck-error.log
expose_as: 'cppcheck-error'
test:cppcheck 2/2:
stage: test
needs: ["build:fedora:x86_64"]
allow_failure: true
script:
- cppcheck --max-configs=32 -j 32 --error-exitcode=1 -q --enable=warning,performance,portability,information,missingInclude --std=c++11 -I Include/ -I models/Include/ Source/ Examples/ models/Source/ | tee cppcheck-warn.log
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG}
dependencies:
- build:fedora:x86_64
tags:
- docker
artifacts:
when: on_failure
paths:
- cppcheck-warn.log
expose_as: 'cppcheck-warn'
test:unit:
stage: test
dependencies:

View file

@ -86,6 +86,9 @@ RUN dnf -y install \
librdmacm-devel \
libusb-devel
RUN dnf -y install \
cppcheck
# Add local and 64-bit locations to linker paths
ENV echo /usr/local/lib >> /etc/ld.so.conf && \
echo /usr/local/lib64 >> /etc/ld.so.conf