2019-11-21 13:43:28 -05:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: unit-tests
|
|
|
|
|
|
|
|
steps:
|
2020-06-11 09:26:50 -04:00
|
|
|
- name: bootstrap
|
2022-08-08 18:08:40 -04:00
|
|
|
image: signalwire/freeswitch-public-base:bullseye
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2019-11-21 13:43:28 -05:00
|
|
|
commands:
|
2019-12-27 10:25:38 -05:00
|
|
|
- cat /proc/sys/kernel/core_pattern
|
2019-11-21 13:43:28 -05:00
|
|
|
- ./bootstrap.sh -j
|
2020-06-11 09:26:50 -04:00
|
|
|
|
|
|
|
- name: configure
|
2022-08-08 18:08:40 -04:00
|
|
|
image: signalwire/freeswitch-public-base:bullseye
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2022-03-17 20:17:33 -04:00
|
|
|
environment:
|
|
|
|
REPOTOKEN:
|
|
|
|
from_secret: repotoken
|
2020-06-11 09:26:50 -04:00
|
|
|
commands:
|
2022-03-17 20:17:33 -04:00
|
|
|
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
2021-05-24 10:17:28 -04:00
|
|
|
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
|
2022-03-17 20:17:33 -04:00
|
|
|
- export REPOTOKEN=''
|
|
|
|
- rm -rf /etc/apt/auth.conf
|
2021-05-24 10:17:28 -04:00
|
|
|
- git clone https://github.com/freeswitch/sofia-sip.git
|
|
|
|
- cd sofia-sip && ./autogen.sh && ./configure.gnu && make -j`nproc` && make install && cd ..
|
2020-05-15 14:44:19 -04:00
|
|
|
- echo 'codecs/mod_openh264' >> modules.conf
|
2020-05-21 14:34:37 -04:00
|
|
|
- sed -i '/applications\\/mod_http_cache/s/^#//g' modules.conf
|
|
|
|
- sed -i '/event_handlers\\/mod_rayo/s/^#//g' modules.conf
|
|
|
|
- sed -i '/formats\\/mod_opusfile/s/^#//g' modules.conf
|
|
|
|
- sed -i '/languages\\/mod_lua/s/^#//g' modules.conf
|
2022-03-26 14:47:42 -04:00
|
|
|
- export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0
|
2022-08-26 15:47:54 -04:00
|
|
|
- ./configure --enable-address-sanitizer --enable-fake-dlclose
|
2020-06-11 09:26:50 -04:00
|
|
|
|
|
|
|
- name: build
|
2022-08-08 18:08:40 -04:00
|
|
|
image: signalwire/freeswitch-public-base:bullseye
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2022-03-17 20:17:33 -04:00
|
|
|
environment:
|
|
|
|
REPOTOKEN:
|
|
|
|
from_secret: repotoken
|
2020-06-11 09:26:50 -04:00
|
|
|
commands:
|
2022-03-17 20:17:33 -04:00
|
|
|
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
2021-05-24 10:17:28 -04:00
|
|
|
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
|
2022-03-17 20:17:33 -04:00
|
|
|
- export REPOTOKEN=''
|
|
|
|
- rm -rf /etc/apt/auth.conf
|
2021-05-24 10:17:28 -04:00
|
|
|
- cd sofia-sip && make install && cd ..
|
2020-06-11 09:26:50 -04:00
|
|
|
- echo '#!/bin/bash\nmake -j`nproc --all` |& tee ./unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./build-status.txt\n' > build.sh
|
2019-11-21 13:43:28 -05:00
|
|
|
- chmod +x build.sh
|
|
|
|
- ./build.sh
|
2020-06-11 09:26:50 -04:00
|
|
|
|
|
|
|
- name: run-tests
|
2022-08-08 18:08:40 -04:00
|
|
|
image: signalwire/freeswitch-public-base:bullseye
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2022-03-17 20:17:33 -04:00
|
|
|
environment:
|
|
|
|
REPOTOKEN:
|
|
|
|
from_secret: repotoken
|
2020-06-11 09:26:50 -04:00
|
|
|
commands:
|
2022-03-17 20:17:33 -04:00
|
|
|
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
2021-05-24 10:17:28 -04:00
|
|
|
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
|
2022-03-17 20:17:33 -04:00
|
|
|
- export REPOTOKEN=''
|
|
|
|
- rm -rf /etc/apt/auth.conf
|
2021-05-24 10:17:28 -04:00
|
|
|
- cd sofia-sip && make install && cd ..
|
2020-06-11 09:26:50 -04:00
|
|
|
- make install || true
|
2019-11-21 13:43:28 -05:00
|
|
|
- cd tests/unit
|
2022-03-26 14:47:42 -04:00
|
|
|
- export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1:fast_unwind_on_malloc=0
|
2019-11-21 13:43:28 -05:00
|
|
|
- ./run-tests.sh
|
2019-12-27 10:25:38 -05:00
|
|
|
- ls -la /cores
|
|
|
|
- mkdir logs && (mv log_run-tests_*.html logs || true) && (mv backtrace_*.txt logs || true)
|
2019-11-21 13:43:28 -05:00
|
|
|
- echo 0 > run-tests-status.txt
|
|
|
|
- ./collect-test-logs.sh && exit 0 || echo 'Some tests failed'
|
|
|
|
- echo 1 > run-tests-status.txt
|
|
|
|
- cd logs && ls -la
|
|
|
|
|
|
|
|
- name: notify
|
2020-10-17 19:16:47 -04:00
|
|
|
image: signalwire/drone-notify
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2019-11-21 13:43:28 -05:00
|
|
|
environment:
|
|
|
|
SLACK_WEBHOOK_URL:
|
|
|
|
from_secret: slack_webhook_url
|
2020-10-17 19:16:47 -04:00
|
|
|
ENV_FILE:
|
|
|
|
from_secret: notify_env
|
2019-11-21 13:43:28 -05:00
|
|
|
commands:
|
2020-10-17 19:16:47 -04:00
|
|
|
- /root/unit-tests-notify.sh
|
2021-05-24 10:17:28 -04:00
|
|
|
|
2019-11-21 13:43:28 -05:00
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
- push
|
2020-03-06 09:24:31 -05:00
|
|
|
|
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: scan-build
|
|
|
|
|
|
|
|
steps:
|
2020-06-11 09:26:50 -04:00
|
|
|
- name: bootstrap
|
2022-08-08 18:08:40 -04:00
|
|
|
image: signalwire/freeswitch-public-base:bullseye
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2020-03-06 09:24:31 -05:00
|
|
|
commands:
|
|
|
|
- ./bootstrap.sh -j
|
2020-06-11 09:26:50 -04:00
|
|
|
|
|
|
|
- name: configure
|
2022-08-08 18:08:40 -04:00
|
|
|
image: signalwire/freeswitch-public-base:bullseye
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2022-03-17 20:17:33 -04:00
|
|
|
environment:
|
|
|
|
REPOTOKEN:
|
|
|
|
from_secret: repotoken
|
2020-06-11 09:26:50 -04:00
|
|
|
commands:
|
2022-03-17 20:17:33 -04:00
|
|
|
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
2020-08-13 16:10:21 -04:00
|
|
|
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
|
2022-03-17 20:17:33 -04:00
|
|
|
- export REPOTOKEN=''
|
|
|
|
- rm -rf /etc/apt/auth.conf
|
2020-03-06 09:24:31 -05:00
|
|
|
- cp build/modules.conf.most modules.conf
|
|
|
|
#Enable/Uncomment mods
|
2020-05-15 14:44:19 -04:00
|
|
|
- echo 'codecs/mod_openh264' >> modules.conf
|
2020-03-06 09:24:31 -05:00
|
|
|
- sed -i "/mod_mariadb/s/^#//g" modules.conf
|
|
|
|
- sed -i "/mod_v8/s/^#//g" modules.conf
|
|
|
|
#Disable/Comment out mods
|
|
|
|
- sed -i '/mod_ilbc/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_isac/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_mp4/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_mongo/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_pocketsphinx/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_sangoma_codec/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_siren/s/^/#/g' modules.conf
|
|
|
|
#Comment out mods for a while
|
|
|
|
- sed -i '/mod_avmd/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_basic/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_cdr_mongodb/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_cv/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_erlang_event/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_perl/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_rtmp/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_unimrcp/s/^/#/g' modules.conf
|
|
|
|
- sed -i '/mod_xml_rpc/s/^/#/g' modules.conf
|
|
|
|
- ./configure
|
2020-06-11 09:26:50 -04:00
|
|
|
|
|
|
|
- name: scan-build
|
2022-08-08 18:08:40 -04:00
|
|
|
image: signalwire/freeswitch-public-base:bullseye
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2022-03-17 20:17:33 -04:00
|
|
|
environment:
|
|
|
|
REPOTOKEN:
|
|
|
|
from_secret: repotoken
|
2020-06-11 09:26:50 -04:00
|
|
|
commands:
|
2022-03-17 20:17:33 -04:00
|
|
|
- echo "machine freeswitch.signalwire.com password $REPOTOKEN" > /etc/apt/auth.conf
|
2020-08-13 16:10:21 -04:00
|
|
|
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
|
|
|
|
- DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
|
2022-03-17 20:17:33 -04:00
|
|
|
- export REPOTOKEN=''
|
|
|
|
- rm -rf /etc/apt/auth.conf
|
2020-03-06 09:24:31 -05:00
|
|
|
- mkdir -p scan-build
|
2022-08-08 18:08:40 -04:00
|
|
|
- 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
|
2020-03-06 09:24:31 -05:00
|
|
|
- chmod +x scan.sh
|
|
|
|
- ./scan.sh
|
|
|
|
- exitstatus=`cat ./scan-build-status.txt`
|
|
|
|
- echo "*** Exit status is $exitstatus"
|
|
|
|
|
|
|
|
- name: notify
|
2020-10-17 19:16:47 -04:00
|
|
|
image: signalwire/drone-notify
|
2021-07-14 12:03:58 -04:00
|
|
|
pull: always
|
2020-03-06 09:24:31 -05:00
|
|
|
environment:
|
|
|
|
SLACK_WEBHOOK_URL:
|
|
|
|
from_secret: slack_webhook_url
|
2020-10-17 19:16:47 -04:00
|
|
|
ENV_FILE:
|
|
|
|
from_secret: notify_env
|
2020-03-06 09:24:31 -05:00
|
|
|
commands:
|
2020-10-17 19:16:47 -04:00
|
|
|
- /root/scan-build-notify.sh
|
2020-03-06 09:24:31 -05:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- master
|
|
|
|
event:
|
|
|
|
- pull_request
|
|
|
|
- push
|
|
|
|
|
2019-11-21 13:43:28 -05:00
|
|
|
---
|
|
|
|
kind: signature
|
2022-08-26 15:47:54 -04:00
|
|
|
hmac: 780e4aaee61e3683ea4a8d6fe5131f7c9e62ebad727546013f18df0fca80d705
|
2019-11-21 13:43:28 -05:00
|
|
|
|
|
|
|
...
|