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