]>
Commit | Line | Data |
---|---|---|
0bd676db AV |
1 | --- |
2 | kind: pipeline | |
3 | name: unit-tests | |
4 | ||
5 | steps: | |
9a94c3d5 | 6 | - name: bootstrap |
372182fc | 7 | image: signalwire/freeswitch-public-base:bullseye |
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 | |
372182fc | 14 | image: signalwire/freeswitch-public-base:bullseye |
a4d09d26 | 15 | pull: always |
6913ccd4 AV |
16 | environment: |
17 | REPOTOKEN: | |
18 | from_secret: repotoken | |
9a94c3d5 | 19 | commands: |
6913ccd4 | 20 | - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf |
f631ac80 AV |
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 | |
6913ccd4 AV |
23 | - export REPOTOKEN='' |
24 | - rm -rf /etc/apt/auth.conf | |
f631ac80 AV |
25 | - git clone https://github.com/freeswitch/sofia-sip.git |
26 | - cd sofia-sip && ./autogen.sh && ./configure.gnu && make -j`nproc` && make install && cd .. | |
493f8a22 | 27 | - echo 'codecs/mod_openh264' >> modules.conf |
553c06ad AV |
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 | |
e14a2d9c | 32 | - export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0 |
4d9c71e2 | 33 | - ./configure --enable-address-sanitizer --enable-fake-dlclose |
9a94c3d5 AV |
34 | |
35 | - name: build | |
372182fc | 36 | image: signalwire/freeswitch-public-base:bullseye |
a4d09d26 | 37 | pull: always |
6913ccd4 AV |
38 | environment: |
39 | REPOTOKEN: | |
40 | from_secret: repotoken | |
9a94c3d5 | 41 | commands: |
6913ccd4 | 42 | - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf |
f631ac80 AV |
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 | |
6913ccd4 AV |
45 | - export REPOTOKEN='' |
46 | - rm -rf /etc/apt/auth.conf | |
f631ac80 | 47 | - cd sofia-sip && make install && cd .. |
9a94c3d5 | 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 |
0bd676db AV |
49 | - chmod +x build.sh |
50 | - ./build.sh | |
9a94c3d5 AV |
51 | |
52 | - name: run-tests | |
372182fc | 53 | image: signalwire/freeswitch-public-base:bullseye |
a4d09d26 | 54 | pull: always |
6913ccd4 AV |
55 | environment: |
56 | REPOTOKEN: | |
57 | from_secret: repotoken | |
9a94c3d5 | 58 | commands: |
6913ccd4 | 59 | - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf |
f631ac80 AV |
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 | |
6913ccd4 AV |
62 | - export REPOTOKEN='' |
63 | - rm -rf /etc/apt/auth.conf | |
f631ac80 | 64 | - cd sofia-sip && make install && cd .. |
9a94c3d5 | 65 | - make install || true |
0bd676db | 66 | - cd tests/unit |
e14a2d9c | 67 | - export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0 |
0bd676db | 68 | - ./run-tests.sh |
9762569b AV |
69 | - ls -la /cores |
70 | - mkdir logs && (mv log_run-tests_*.html logs || true) && (mv backtrace_*.txt logs || true) | |
0bd676db AV |
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 | |
4273ec30 | 77 | image: signalwire/drone-notify |
a4d09d26 | 78 | pull: always |
0bd676db | 79 | environment: |
0bd676db AV |
80 | SLACK_WEBHOOK_URL: |
81 | from_secret: slack_webhook_url | |
4273ec30 AV |
82 | ENV_FILE: |
83 | from_secret: notify_env | |
0bd676db | 84 | commands: |
4273ec30 | 85 | - /root/unit-tests-notify.sh |
f631ac80 | 86 | |
0bd676db AV |
87 | trigger: |
88 | branch: | |
89 | - master | |
90 | event: | |
91 | - pull_request | |
92 | - push | |
dcf03769 AV |
93 | |
94 | --- | |
95 | kind: pipeline | |
96 | name: scan-build | |
97 | ||
dcf03769 | 98 | steps: |
9a94c3d5 | 99 | - name: bootstrap |
372182fc | 100 | image: signalwire/freeswitch-public-base:bullseye |
a4d09d26 | 101 | pull: always |
dcf03769 AV |
102 | commands: |
103 | - ./bootstrap.sh -j | |
9a94c3d5 AV |
104 | |
105 | - name: configure | |
372182fc | 106 | image: signalwire/freeswitch-public-base:bullseye |
a4d09d26 | 107 | pull: always |
6913ccd4 AV |
108 | environment: |
109 | REPOTOKEN: | |
110 | from_secret: repotoken | |
9a94c3d5 | 111 | commands: |
6913ccd4 | 112 | - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf |
0f95e265 AV |
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 | |
6913ccd4 AV |
115 | - export REPOTOKEN='' |
116 | - rm -rf /etc/apt/auth.conf | |
dcf03769 AV |
117 | - cp build/modules.conf.most modules.conf |
118 | #Enable/Uncomment mods | |
493f8a22 | 119 | - echo 'codecs/mod_openh264' >> modules.conf |
dcf03769 AV |
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 | |
dcf03769 | 137 | - sed -i '/mod_rtmp/s/^/#/g' modules.conf |
dcf03769 | 138 | - sed -i '/mod_unimrcp/s/^/#/g' modules.conf |
dcf03769 AV |
139 | - sed -i '/mod_xml_rpc/s/^/#/g' modules.conf |
140 | - ./configure | |
9a94c3d5 AV |
141 | |
142 | - name: scan-build | |
372182fc | 143 | image: signalwire/freeswitch-public-base:bullseye |
a4d09d26 | 144 | pull: always |
6913ccd4 AV |
145 | environment: |
146 | REPOTOKEN: | |
147 | from_secret: repotoken | |
9a94c3d5 | 148 | commands: |
6913ccd4 | 149 | - echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf |
0f95e265 AV |
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 | |
6913ccd4 AV |
152 | - export REPOTOKEN='' |
153 | - rm -rf /etc/apt/auth.conf | |
dcf03769 | 154 | - mkdir -p scan-build |
372182fc | 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 |
dcf03769 AV |
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 | |
4273ec30 | 162 | image: signalwire/drone-notify |
a4d09d26 | 163 | pull: always |
dcf03769 | 164 | environment: |
dcf03769 AV |
165 | SLACK_WEBHOOK_URL: |
166 | from_secret: slack_webhook_url | |
4273ec30 AV |
167 | ENV_FILE: |
168 | from_secret: notify_env | |
dcf03769 | 169 | commands: |
4273ec30 | 170 | - /root/scan-build-notify.sh |
dcf03769 | 171 | |
dcf03769 AV |
172 | trigger: |
173 | branch: | |
174 | - master | |
175 | event: | |
176 | - pull_request | |
177 | - push | |
178 | ||
0bd676db AV |
179 | --- |
180 | kind: signature | |
4d9c71e2 | 181 | hmac: 780e4aaee61e3683ea4a8d6fe5131f7c9e62ebad727546013f18df0fca80d705 |
0bd676db AV |
182 | |
183 | ... |