This repository has been archived on 2022-02-10. You can view files and clone it, but cannot push or open issues or pull requests.
fortuna/.drone.starlark
surtur 46a6cdba3a
All checks were successful
continuous-integration/drone/push Build is passing
cmake: add {-g3,-gsplit-dwarf} flags for debugging
cmake:
* check if we're being run for valgrind, in which case do not split
  dwarf information, valgrinds does not like it (see #1).

makefile:
* build for vagrant into a separate folder entirely.

ci:
* install gcc, cmake and ninja along with vagrant, since now we are
  building inside of the ci container as well.

close #1
2021-11-02 04:40:07 +01:00

81 lines
2.0 KiB
Plaintext

# vim: ft=bzl.starlark noexpandtab
def main(ctx):
return {
"kind": "pipeline",
"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 --language=c++ --std=c++20 --enable=all --verbose ./*.{cpp,h}"
]
},
{
"name": "build debug",
"image": "docker.io/immawanderer/fedora-cpp:linux-amd64",
"pull": "always",
"depends_on": ["cppcheck"],
"commands": [
"uname -r",
"make debug"
]
},
{
"name": "build release",
"image": "docker.io/immawanderer/fedora-cpp:linux-amd64",
"pull": "always",
"depends_on": ["cppcheck"],
"commands": [
"uname -r",
"make release"
]
},
{
"name": "build on alpine",
"image": "docker.io/alpine:3.14",
"pull": "always",
"depends_on": ["cppcheck"],
"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"
]
},
{
"name": "valgrind debug",
"image": "docker.io/archlinux:base-devel",
"pull": "always",
"depends_on": ["build debug"],
"commands": [
"uname -r",
"pacman -Sy gcc cmake ninja valgrind --noconfirm --needed",
"valgrind --version",
"make valgrind"
]
},
{
"name": "valgrind release",
"image": "docker.io/archlinux:base-devel",
"pull": "always",
"depends_on": ["build release"],
"commands": [
"uname -r",
"pacman -Sy gcc cmake ninja valgrind --noconfirm --needed",
"valgrind --version",
"make valgrind-release"
]
}
]
}