]> git.ipfire.org Git - thirdparty/freeswitch.git/blame - .drone.yml
Merge pull request #1274 from signalwire/signalwiregatewaydown
[thirdparty/freeswitch.git] / .drone.yml
CommitLineData
0bd676db
AV
1---
2kind: pipeline
3name: unit-tests
4
5steps:
9a94c3d5 6 - name: bootstrap
0bd676db 7 image: signalwire/freeswitch-public-base
a4d09d26 8 pull: always
0bd676db 9 commands:
9762569b 10 - cat /proc/sys/kernel/core_pattern
0bd676db 11 - ./bootstrap.sh -j
9a94c3d5
AV
12
13 - name: configure
14 image: signalwire/freeswitch-public-base
a4d09d26 15 pull: always
9a94c3d5 16 commands:
0f95e265
AV
17 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
18 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
0bd676db 19 - echo "applications/mod_test" >> modules.conf
493f8a22 20 - echo 'codecs/mod_openh264' >> modules.conf
553c06ad
AV
21 - sed -i '/applications\\/mod_http_cache/s/^#//g' modules.conf
22 - sed -i '/event_handlers\\/mod_rayo/s/^#//g' modules.conf
23 - sed -i '/formats\\/mod_opusfile/s/^#//g' modules.conf
24 - sed -i '/languages\\/mod_lua/s/^#//g' modules.conf
6d31e846 25 - export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1;
0af29afc 26 - ./configure --enable-address-sanitizer
9a94c3d5
AV
27
28 - name: build
29 image: signalwire/freeswitch-public-base
a4d09d26 30 pull: always
9a94c3d5 31 commands:
0f95e265
AV
32 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
33 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
9a94c3d5 34 - echo '#!/bin/bash\nmake -j`nproc --all` |& tee ./unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./build-status.txt\n' > build.sh
0bd676db
AV
35 - chmod +x build.sh
36 - ./build.sh
9a94c3d5
AV
37
38 - name: run-tests
39 image: signalwire/freeswitch-public-base
a4d09d26 40 pull: always
9a94c3d5 41 commands:
0f95e265
AV
42 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
43 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
9a94c3d5 44 - make install || true
0bd676db
AV
45 - cd tests/unit
46 - ./run-tests.sh
9762569b
AV
47 - ls -la /cores
48 - mkdir logs && (mv log_run-tests_*.html logs || true) && (mv backtrace_*.txt logs || true)
0bd676db
AV
49 - echo 0 > run-tests-status.txt
50 - ./collect-test-logs.sh && exit 0 || echo 'Some tests failed'
51 - echo 1 > run-tests-status.txt
52 - cd logs && ls -la
53
54 - name: notify
4273ec30 55 image: signalwire/drone-notify
a4d09d26 56 pull: always
0bd676db 57 environment:
0bd676db
AV
58 SLACK_WEBHOOK_URL:
59 from_secret: slack_webhook_url
4273ec30
AV
60 ENV_FILE:
61 from_secret: notify_env
0bd676db 62 commands:
4273ec30 63 - /root/unit-tests-notify.sh
0bd676db
AV
64
65trigger:
66 branch:
67 - master
68 event:
69 - pull_request
70 - push
dcf03769
AV
71
72---
73kind: pipeline
74name: scan-build
75
dcf03769 76steps:
9a94c3d5 77 - name: bootstrap
dcf03769 78 image: signalwire/freeswitch-public-base:stretch
a4d09d26 79 pull: always
dcf03769
AV
80 commands:
81 - ./bootstrap.sh -j
9a94c3d5
AV
82
83 - name: configure
84 image: signalwire/freeswitch-public-base:stretch
a4d09d26 85 pull: always
9a94c3d5 86 commands:
0f95e265
AV
87 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
88 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
dcf03769
AV
89 - cp build/modules.conf.most modules.conf
90 #Enable/Uncomment mods
493f8a22 91 - echo 'codecs/mod_openh264' >> modules.conf
dcf03769
AV
92 - sed -i "/mod_mariadb/s/^#//g" modules.conf
93 - sed -i "/mod_v8/s/^#//g" modules.conf
94 #Disable/Comment out mods
95 - sed -i '/mod_ilbc/s/^/#/g' modules.conf
96 - sed -i '/mod_isac/s/^/#/g' modules.conf
97 - sed -i '/mod_mp4/s/^/#/g' modules.conf
98 - sed -i '/mod_mongo/s/^/#/g' modules.conf
99 - sed -i '/mod_pocketsphinx/s/^/#/g' modules.conf
100 - sed -i '/mod_sangoma_codec/s/^/#/g' modules.conf
101 - sed -i '/mod_siren/s/^/#/g' modules.conf
102 #Comment out mods for a while
103 - sed -i '/mod_avmd/s/^/#/g' modules.conf
104 - sed -i '/mod_basic/s/^/#/g' modules.conf
105 - sed -i '/mod_cdr_mongodb/s/^/#/g' modules.conf
106 - sed -i '/mod_cv/s/^/#/g' modules.conf
107 - sed -i '/mod_erlang_event/s/^/#/g' modules.conf
108 - sed -i '/mod_perl/s/^/#/g' modules.conf
dcf03769 109 - sed -i '/mod_rtmp/s/^/#/g' modules.conf
dcf03769 110 - sed -i '/mod_unimrcp/s/^/#/g' modules.conf
dcf03769
AV
111 - sed -i '/mod_xml_rpc/s/^/#/g' modules.conf
112 - ./configure
9a94c3d5
AV
113
114 - name: scan-build
115 image: signalwire/freeswitch-public-base:stretch
a4d09d26 116 pull: always
9a94c3d5 117 commands:
0f95e265
AV
118 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
119 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
dcf03769 120 - mkdir -p scan-build
553c06ad 121 - echo '#!/bin/bash\nscan-build-4.0 -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./scan-build-status.txt\n' > scan.sh
dcf03769
AV
122 - chmod +x scan.sh
123 - ./scan.sh
124 - exitstatus=`cat ./scan-build-status.txt`
125 - echo "*** Exit status is $exitstatus"
126
127 - name: notify
4273ec30 128 image: signalwire/drone-notify
a4d09d26 129 pull: always
dcf03769 130 environment:
dcf03769
AV
131 SLACK_WEBHOOK_URL:
132 from_secret: slack_webhook_url
4273ec30
AV
133 ENV_FILE:
134 from_secret: notify_env
dcf03769 135 commands:
4273ec30 136 - /root/scan-build-notify.sh
dcf03769
AV
137
138
139trigger:
140 branch:
141 - master
142 event:
143 - pull_request
144 - push
145
0bd676db
AV
146---
147kind: signature
a4d09d26 148hmac: bc24832140c40a8fde4bb04bd6bcce43029bf1641ed4acc3585fe52049ae24dc
0bd676db
AV
149
150...