2
0

.drone.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  1. ---
  2. kind: pipeline
  3. name: unit-tests
  4. steps:
  5. - name: bootstrap
  6. image: signalwire/freeswitch-public-base
  7. pull: always
  8. commands:
  9. - cat /proc/sys/kernel/core_pattern
  10. - ./bootstrap.sh -j
  11. - name: configure
  12. image: signalwire/freeswitch-public-base
  13. pull: always
  14. commands:
  15. - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
  16. - DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
  17. - git clone https://github.com/freeswitch/sofia-sip.git
  18. - cd sofia-sip && ./autogen.sh && ./configure.gnu && make -j`nproc` && make install && cd ..
  19. - echo 'codecs/mod_openh264' >> modules.conf
  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
  24. - export ASAN_OPTIONS=log_path=stdout:disable_coredump=0:unmap_shadow_on_exit=1;
  25. - ./configure --enable-address-sanitizer
  26. - name: build
  27. image: signalwire/freeswitch-public-base
  28. pull: always
  29. commands:
  30. - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
  31. - DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
  32. - cd sofia-sip && make install && cd ..
  33. - echo '#!/bin/bash\nmake -j`nproc --all` |& tee ./unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./build-status.txt\n' > build.sh
  34. - chmod +x build.sh
  35. - ./build.sh
  36. - name: run-tests
  37. image: signalwire/freeswitch-public-base
  38. pull: always
  39. commands:
  40. - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libsofia-sip-ua0 libspandsp-dev
  41. - DEBIAN_FRONTEND=noninteractive apt-get -yq install libspandsp3-dev
  42. - cd sofia-sip && make install && cd ..
  43. - make install || true
  44. - cd tests/unit
  45. - ./run-tests.sh
  46. - ls -la /cores
  47. - mkdir logs && (mv log_run-tests_*.html logs || true) && (mv backtrace_*.txt logs || true)
  48. - echo 0 > run-tests-status.txt
  49. - ./collect-test-logs.sh && exit 0 || echo 'Some tests failed'
  50. - echo 1 > run-tests-status.txt
  51. - cd logs && ls -la
  52. - name: notify
  53. image: signalwire/drone-notify
  54. pull: always
  55. environment:
  56. SLACK_WEBHOOK_URL:
  57. from_secret: slack_webhook_url
  58. ENV_FILE:
  59. from_secret: notify_env
  60. commands:
  61. - /root/unit-tests-notify.sh
  62. trigger:
  63. branch:
  64. - master
  65. event:
  66. - pull_request
  67. - push
  68. ---
  69. kind: pipeline
  70. name: scan-build
  71. steps:
  72. - name: bootstrap
  73. image: signalwire/freeswitch-public-base
  74. pull: always
  75. commands:
  76. - ./bootstrap.sh -j
  77. - name: configure
  78. image: signalwire/freeswitch-public-base
  79. pull: always
  80. commands:
  81. - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
  82. - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
  83. - cp build/modules.conf.most modules.conf
  84. #Enable/Uncomment mods
  85. - echo 'codecs/mod_openh264' >> modules.conf
  86. - sed -i "/mod_mariadb/s/^#//g" modules.conf
  87. - sed -i "/mod_v8/s/^#//g" modules.conf
  88. #Disable/Comment out mods
  89. - sed -i '/mod_ilbc/s/^/#/g' modules.conf
  90. - sed -i '/mod_isac/s/^/#/g' modules.conf
  91. - sed -i '/mod_mp4/s/^/#/g' modules.conf
  92. - sed -i '/mod_mongo/s/^/#/g' modules.conf
  93. - sed -i '/mod_pocketsphinx/s/^/#/g' modules.conf
  94. - sed -i '/mod_sangoma_codec/s/^/#/g' modules.conf
  95. - sed -i '/mod_siren/s/^/#/g' modules.conf
  96. #Comment out mods for a while
  97. - sed -i '/mod_avmd/s/^/#/g' modules.conf
  98. - sed -i '/mod_basic/s/^/#/g' modules.conf
  99. - sed -i '/mod_cdr_mongodb/s/^/#/g' modules.conf
  100. - sed -i '/mod_cv/s/^/#/g' modules.conf
  101. - sed -i '/mod_erlang_event/s/^/#/g' modules.conf
  102. - sed -i '/mod_perl/s/^/#/g' modules.conf
  103. - sed -i '/mod_rtmp/s/^/#/g' modules.conf
  104. - sed -i '/mod_unimrcp/s/^/#/g' modules.conf
  105. - sed -i '/mod_xml_rpc/s/^/#/g' modules.conf
  106. - ./configure
  107. - name: scan-build
  108. image: signalwire/freeswitch-public-base
  109. pull: always
  110. commands:
  111. - apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -yq remove libspandsp-dev
  112. - DEBIAN_FRONTEND=noninteractive apt-get -yq install libsofia-sip-ua-dev libspandsp3-dev
  113. - mkdir -p scan-build
  114. - 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
  115. - chmod +x scan.sh
  116. - ./scan.sh
  117. - exitstatus=`cat ./scan-build-status.txt`
  118. - echo "*** Exit status is $exitstatus"
  119. - name: notify
  120. image: signalwire/drone-notify
  121. pull: always
  122. environment:
  123. SLACK_WEBHOOK_URL:
  124. from_secret: slack_webhook_url
  125. ENV_FILE:
  126. from_secret: notify_env
  127. commands:
  128. - /root/scan-build-notify.sh
  129. trigger:
  130. branch:
  131. - master
  132. event:
  133. - pull_request
  134. - push
  135. ---
  136. kind: signature
  137. hmac: a85b0db203d2c9a71c3e4a63a46b5513fbdb3b8f5135e21d0fe0992f33626824
  138. ...