forked from signalwire/libks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.drone.yml
90 lines (80 loc) · 2.58 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
---
kind: pipeline
name: default
steps:
- name: scan-build
image: debian:buster
pull: always
commands:
- apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-7
- apt-get install -yq cmake uuid-dev libssl-dev
- sed -i '/cotire/d' ./CMakeLists.txt
- mkdir -p scan-build
- scan-build-7 -o ./scan-build/ cmake .
- echo '#!/bin/bash\nscan-build-7 -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./scan-build-status.txt\n' > scan.sh
- chmod +x scan.sh
- ./scan.sh
- exitstatus=`cat ./scan-build-status.txt`
- echo "*** Exit status is $exitstatus"
- name: notify
image: signalwire/drone-notify
pull: always
environment:
SLACK_WEBHOOK_URL:
from_secret: slack_webhook_url
ENV_FILE:
from_secret: notify_env
commands:
- /root/scan-build-notify.sh
trigger:
branch:
- master
- v2.0
trigger:
event:
- pull_request
- push
---
kind: pipeline
name: tests
steps:
- name: tests
image: debian:buster
pull: always
commands:
- apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-7
- apt-get install -yq cmake uuid-dev libssl-dev colorized-logs
- sed -i '/cotire/d' ./CMakeLists.txt
- mkdir -p scan-build
- scan-build-7 -o ./scan-build/ cmake .
- mkdir -p tests/unit/logs
- echo '#!/bin/bash\nmake -j`nproc --all` |& tee ./unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./build-status.txt\n' > build.sh
- chmod +x build.sh
- ./build.sh
- echo 0 > tests/unit/run-tests-status.txt
- echo '#!/bin/bash\nenv CTEST_OUTPUT_ON_FAILURE=1 make test |& tee >(ansi2html > ./tests/unit/logs/artifacts.html)\nexitstatus=$${PIPESTATUS[0]}\nexit $$exitstatus\n' > test.sh
- chmod +x test.sh
- ./test.sh && exit 0 || echo 'Some tests failed'
- echo 1 > tests/unit/run-tests-status.txt
- name: notify
image: signalwire/drone-notify
pull: always
environment:
SLACK_WEBHOOK_URL:
from_secret: slack_webhook_url
ENV_FILE:
from_secret: notify_env
commands:
- /root/unit-tests-notify.sh
trigger:
branch:
- master
- v2.0
trigger:
event:
- pull_request
- push
---
kind: signature
hmac: fe1e87b032687d1bbddba7dffa029891e4a4076f194eaf43139b1c5ceaa83a5d
...