123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- ---
- kind: pipeline
- name: default
- steps:
- - name: scan-build
- image: debian:buster
- pull: always
- commands:
- - apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-7
- - apt-get install -yq cmake uuid-dev libssl-dev
- - sed -i '/cotire/d' ./CMakeLists.txt
- - mkdir -p scan-build
- - scan-build-7 -o ./scan-build/ cmake .
- - 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
- - chmod +x scan.sh
- - ./scan.sh
- - exitstatus=`cat ./scan-build-status.txt`
- - echo "*** Exit status is $exitstatus"
- - name: notify
- image: signalwire/drone-notify
- pull: always
- environment:
- SLACK_WEBHOOK_URL:
- from_secret: slack_webhook_url
- ENV_FILE:
- from_secret: notify_env
- commands:
- - /root/scan-build-notify.sh
-
- trigger:
- branch:
- - master
- - v2.0
- trigger:
- event:
- - pull_request
- - push
- ---
- kind: pipeline
- name: tests
- steps:
- - name: tests
- image: debian:buster
- pull: always
- commands:
- - apt-get update && apt-get install -yq build-essential autotools-dev lsb-release pkg-config automake autoconf libtool-bin clang-tools-7
- - apt-get install -yq cmake uuid-dev libssl-dev colorized-logs
- - sed -i '/cotire/d' ./CMakeLists.txt
- - mkdir -p scan-build
- - scan-build-7 -o ./scan-build/ cmake .
- - mkdir -p tests/unit/logs
- - echo '#!/bin/bash\nmake -j`nproc --all` |& tee ./unit-tests-build-result.txt\nexitstatus=$${PIPESTATUS[0]}\necho $$exitstatus > ./build-status.txt\n' > build.sh
- - chmod +x build.sh
- - ./build.sh
- - echo 0 > tests/unit/run-tests-status.txt
- - echo '#!/bin/bash\nenv CTEST_OUTPUT_ON_FAILURE=1 make test |& tee >(ansi2html > ./tests/unit/logs/artifacts.html)\nexitstatus=$${PIPESTATUS[0]}\nexit $$exitstatus\n' > test.sh
- - chmod +x test.sh
- - ./test.sh && exit 0 || echo 'Some tests failed'
- - echo 1 > tests/unit/run-tests-status.txt
- - name: notify
- image: signalwire/drone-notify
- pull: always
- environment:
- SLACK_WEBHOOK_URL:
- from_secret: slack_webhook_url
- ENV_FILE:
- from_secret: notify_env
- commands:
- - /root/unit-tests-notify.sh
- trigger:
- branch:
- - master
- - v2.0
- trigger:
- event:
- - pull_request
- - push
- ---
- kind: signature
- hmac: 4b113f50913a06b099cd3de6183a6c8ef5937d0bbe747a571a855f19a8b0b539
- ...
|