]> git.ipfire.org Git - thirdparty/freeswitch.git/blob - .drone.yml
[Core] check_ice: sanitize second field of the candidates. Add new switch_is_uint_in_...
[thirdparty/freeswitch.git] / .drone.yml
1 ---
2 kind: pipeline
3 name: unit-tests
4
5 steps:
6 - name: bootstrap
7 image: signalwire/freeswitch-public-base:bullseye
8 pull: always
9 commands:
10 - cat /proc/sys/kernel/core_pattern
11 - ./bootstrap.sh -j
12
13 - name: configure
14 image: signalwire/freeswitch-public-base:bullseye
15 pull: always
16 environment:
17 REPOTOKEN:
18 from_secret: repotoken
19 commands:
20 - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
21 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
22 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
23 - export REPOTOKEN=''
24 - rm -rf /etc/apt/auth.conf
25 - git clone https://github.com/freeswitch/sofia-sip.git
26 - cd sofia-sip && ./autogen.sh && ./configure.gnu && make -j`nproc` && make install && cd ..
27 - echo 'codecs/mod_openh264' >> modules.conf
28 - sed -i '/applications\\/mod_http_cache/s/^#//g' modules.conf
29 - sed -i '/event_handlers\\/mod_rayo/s/^#//g' modules.conf
30 - sed -i '/formats\\/mod_opusfile/s/^#//g' modules.conf
31 - sed -i '/languages\\/mod_lua/s/^#//g' modules.conf
32 - export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0
33 - ./configure --enable-address-sanitizer --enable-fake-dlclose
34
35 - name: build
36 image: signalwire/freeswitch-public-base:bullseye
37 pull: always
38 environment:
39 REPOTOKEN:
40 from_secret: repotoken
41 commands:
42 - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
43 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
44 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
45 - export REPOTOKEN=''
46 - rm -rf /etc/apt/auth.conf
47 - cd sofia-sip && make install && cd ..
48 - echo '#!/bin/bash\nmake -j`nproc --all` |& tee ./unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./build-status.txt\n' > build.sh
49 - chmod +x build.sh
50 - ./build.sh
51
52 - name: run-tests
53 image: signalwire/freeswitch-public-base:bullseye
54 pull: always
55 environment:
56 REPOTOKEN:
57 from_secret: repotoken
58 commands:
59 - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
60 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
61 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
62 - export REPOTOKEN=''
63 - rm -rf /etc/apt/auth.conf
64 - cd sofia-sip && make install && cd ..
65 - make install || true
66 - cd tests/unit
67 - export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0
68 - ./run-tests.sh
69 - ls -la /cores
70 - mkdir logs && (mv log_run-tests_*.html logs || true) && (mv backtrace_*.txt logs || true)
71 - echo 0 > run-tests-status.txt
72 - ./collect-test-logs.sh && exit 0 || echo 'Some tests failed'
73 - echo 1 > run-tests-status.txt
74 - cd logs && ls -la
75
76 - name: notify
77 image: signalwire/drone-notify
78 pull: always
79 environment:
80 SLACK_WEBHOOK_URL:
81 from_secret: slack_webhook_url
82 ENV_FILE:
83 from_secret: notify_env
84 commands:
85 - /root/unit-tests-notify.sh
86
87 trigger:
88 branch:
89 - master
90 event:
91 - pull_request
92 - push
93
94 ---
95 kind: pipeline
96 name: scan-build
97
98 steps:
99 - name: bootstrap
100 image: signalwire/freeswitch-public-base:bullseye
101 pull: always
102 commands:
103 - ./bootstrap.sh -j
104
105 - name: configure
106 image: signalwire/freeswitch-public-base:bullseye
107 pull: always
108 environment:
109 REPOTOKEN:
110 from_secret: repotoken
111 commands:
112 - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
113 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
114 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
115 - export REPOTOKEN=''
116 - rm -rf /etc/apt/auth.conf
117 - cp build/modules.conf.most modules.conf
118 #Enable/Uncomment mods
119 - echo 'codecs/mod_openh264' >> modules.conf
120 - sed -i "/mod_mariadb/s/^#//g" modules.conf
121 - sed -i "/mod_v8/s/^#//g" modules.conf
122 #Disable/Comment out mods
123 - sed -i '/mod_ilbc/s/^/#/g' modules.conf
124 - sed -i '/mod_isac/s/^/#/g' modules.conf
125 - sed -i '/mod_mp4/s/^/#/g' modules.conf
126 - sed -i '/mod_mongo/s/^/#/g' modules.conf
127 - sed -i '/mod_pocketsphinx/s/^/#/g' modules.conf
128 - sed -i '/mod_sangoma_codec/s/^/#/g' modules.conf
129 - sed -i '/mod_siren/s/^/#/g' modules.conf
130 #Comment out mods for a while
131 - sed -i '/mod_avmd/s/^/#/g' modules.conf
132 - sed -i '/mod_basic/s/^/#/g' modules.conf
133 - sed -i '/mod_cdr_mongodb/s/^/#/g' modules.conf
134 - sed -i '/mod_cv/s/^/#/g' modules.conf
135 - sed -i '/mod_erlang_event/s/^/#/g' modules.conf
136 - sed -i '/mod_perl/s/^/#/g' modules.conf
137 - sed -i '/mod_rtmp/s/^/#/g' modules.conf
138 - sed -i '/mod_unimrcp/s/^/#/g' modules.conf
139 - sed -i '/mod_xml_rpc/s/^/#/g' modules.conf
140 - ./configure
141
142 - name: scan-build
143 image: signalwire/freeswitch-public-base:bullseye
144 pull: always
145 environment:
146 REPOTOKEN:
147 from_secret: repotoken
148 commands:
149 - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
150 - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
151 - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
152 - export REPOTOKEN=''
153 - rm -rf /etc/apt/auth.conf
154 - mkdir -p scan-build
155 - echo '#!/bin/bash\nscan-build-11 -o ./scan-build/ make -j`nproc --all` |& tee ./scan-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./scan-build-status.txt\n' > scan.sh
156 - chmod +x scan.sh
157 - ./scan.sh
158 - exitstatus=`cat ./scan-build-status.txt`
159 - echo "*** Exit status is $exitstatus"
160
161 - name: notify
162 image: signalwire/drone-notify
163 pull: always
164 environment:
165 SLACK_WEBHOOK_URL:
166 from_secret: slack_webhook_url
167 ENV_FILE:
168 from_secret: notify_env
169 commands:
170 - /root/scan-build-notify.sh
171
172 trigger:
173 branch:
174 - master
175 event:
176 - pull_request
177 - push
178
179 ---
180 kind: signature
181 hmac: 780e4aaee61e3683ea4a8d6fe5131f7c9e62ebad727546013f18df0fca80d705
182
183 ...