.drone.yml 5.1 KB

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