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