fortuna/.drone.starlark

85 lines
2.1 KiB
Plaintext
Raw Normal View History

2021-10-20 02:55:47 +02:00
# vim: ft=bzl.starlark noexpandtab
def main(ctx):
return {
"kind": "pipeline",
"type": "docker",
"name": "testing",
"steps": [
2021-10-24 21:35:57 +02:00
{
"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"
]
},
2021-10-20 02:55:47 +02:00
{
"name": "build debug",
"image": "docker.io/immawanderer/fedora-cpp:linux-amd64",
"pull": "always",
2021-10-24 21:35:57 +02:00
"depends_on": ["cppcheck"],
2021-10-20 02:55:47 +02:00
"commands": [
"uname -r",
"mkdir -pv debug",
"cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -B debug",
"ninja -C debug"
]
},
{
"name": "build release",
"image": "docker.io/immawanderer/fedora-cpp:linux-amd64",
"pull": "always",
2021-10-24 21:35:57 +02:00
"depends_on": ["cppcheck"],
2021-10-20 02:55:47 +02:00
"commands": [
"uname -r",
"mkdir -pv release",
"cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B release",
"ninja -C release"
]
},
{
"name": "build on alpine",
"image": "docker.io/alpine:3.14",
"pull": "always",
2021-10-24 21:35:57 +02:00
"depends_on": ["cppcheck"],
2021-10-20 02:55:47 +02:00
"commands": [
"uname -r",
"apk add --no-cache gcc g++ cmake ninja --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing",
"ln -sv /usr/bin/ninja /usr/bin/ninja-build",
"mkdir -pv debug-alpine",
"cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -B debug-alpine",
"ninja -C debug-alpine && ls -lah ./debug-alpine && ./debug-alpine/fortuna" + "||" + "true"
]
2021-10-24 21:35:57 +02:00
},
{
"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"
]
2021-10-20 02:55:47 +02:00
}
]
}