ci: add {cppcheck,valgrind} steps
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2021-10-24 21:35:57 +02:00
parent f30148a2fb
commit 86c37f53d9
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D

View File

@ -5,11 +5,23 @@ def main(ctx):
"type": "docker",
"name": "testing",
"steps": [
{
"name": "cppcheck",
"image": "docker.io/archlinux:base-devel",
"pull": "always",
"depends_on": ["clone"],
"commands": [
"pacman -Sy cppcheck --noconfirm --needed",
"uname -r",
"cppcheck --version",
"cppcheck --enable=all ./*.cpp ./*.h"
]
},
{
"name": "build debug",
"image": "docker.io/immawanderer/fedora-cpp:linux-amd64",
"pull": "always",
"depends_on": ["clone"],
"depends_on": ["cppcheck"],
"commands": [
"uname -r",
"mkdir -pv debug",
@ -21,7 +33,7 @@ def main(ctx):
"name": "build release",
"image": "docker.io/immawanderer/fedora-cpp:linux-amd64",
"pull": "always",
"depends_on": ["clone"],
"depends_on": ["cppcheck"],
"commands": [
"uname -r",
"mkdir -pv release",
@ -33,7 +45,7 @@ def main(ctx):
"name": "build on alpine",
"image": "docker.io/alpine:3.14",
"pull": "always",
"depends_on": ["clone"],
"depends_on": ["cppcheck"],
"commands": [
"uname -r",
"apk add --no-cache gcc g++ cmake ninja --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing",
@ -42,6 +54,30 @@ def main(ctx):
"cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -B debug-alpine",
"ninja -C debug-alpine && ls -lah ./debug-alpine && ./debug-alpine/fortuna" + "||" + "true"
]
},
{
"name": "valgrind debug",
"image": "docker.io/archlinux:base-devel",
"pull": "always",
"depends_on": ["build debug"],
"commands": [
"uname -r",
"pacman -Sy valgrind --noconfirm --needed",
"valgrind --version",
"valgrind ./debug/fortuna"
]
},
{
"name": "valgrind release",
"image": "docker.io/archlinux:base-devel",
"pull": "always",
"depends_on": ["build release"],
"commands": [
"uname -r",
"pacman -Sy valgrind --noconfirm --needed",
"valgrind --version",
"valgrind ./release/fortuna"
]
}
]
}