-
Notifications
You must be signed in to change notification settings - Fork 3
/
.drone.yml
50 lines (47 loc) · 1.2 KB
/
.drone.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
pipeline:
build:
image: frebib/alpine-cmake:3.7
environment:
- NO_SETCAP=true
- PACKAGES=libcap-dev
commands:
# Run the default entrypoint
- /usr/local/bin/entrypoint true
# Build with make
- make clean all
# Build with cmake
- SRC="$(pwd)"
- DIR="$(mktemp -dt cmake-build.XXXXXX)"
- cd "$DIR"
- cmake "$SRC"
- make
docker:
image: spritsail/docker-build
volumes: [ '/var/run/docker.sock:/var/run/docker.sock' ]
rm: true
build_args:
- CC=${CC}
test:
image: alpine:3.7
privileged: true
environment:
- RAWSOCK_NOBIND=true
commands:
- apk --no-cache --quiet add coreutils libcap make valgrind
- make --warn-undefined-variables install PREFIX=/usr
# Ensure there are no relative paths in range so netd links to /usr/bin
- cd /
- ldconfig /usr/lib
- ldd /usr/bin/netd
# ret 124 is a timeout therefore it did not crash
- timeout -s SIGINT 10
valgrind
--leak-check=full
--show-reachable=yes
--track-origins=yes
netd >/dev/null
|| test $? -eq 124
matrix:
CC:
- gcc
- clang