1 Star 0 Fork 3

告别板砖/amazon-kinesis-video-streams-webrtc-sdk-c

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 11.69 KB
一键复制 编辑 原始数据 按行查看 历史
Hassan Sahibzada 提交于 2021-08-02 16:13 . Update .travis.yml (#1213)
language: cpp
sudo: true
branches:
only:
- master
cache:
- directories:
- $HOME/.cache
-
services:
- docker
addons:
apt:
packages:
- gdb
- docker-ce
script:
- export AWS_KVS_LOG_LEVEL=3
- make
- ulimit -c unlimited -S
- timeout --signal=SIGABRT 60m ./tst/webrtc_client_test
after_failure:
- for i in $(find ./ -maxdepth 1 -name 'core*' -print); do gdb $(pwd)/tst/webrtc_client_test core* -ex "thread apply all bt" -ex "set pagination 0" -batch; done;
matrix:
# MemorySanitizer and UndefinedBehaviorSanitizer are still WIP
allow_failures:
- env: allowTestFail=true
include:
#clang check
- name: "clang-format Check"
os: linux
compiler: clang
before_script:
- sudo apt-get -q update
- sudo apt-get -y install clang-format
- mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE
script:
- cd ..
- bash scripts/check-clang.sh
# MacOS Builds
- name: "OSX GCC"
os: osx
compiler: gcc
before_script:
- mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
script:
- make
- export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:`pwd`/../open-source/lib"
- ./tst/webrtc_client_test
after_failure: skip # timeout not available on MacOS
- name: "OSX Clang"
os: osx
compiler: clang
before_script:
- mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE
script:
- make
- export DYLD_LIBRARY_PATH="$DYLD_LIBRARY_PATH:`pwd`/../open-source/lib"
- ./tst/webrtc_client_test || travis_terminate 1;
# Execute selected tests without auth integration
- unset AWS_ACCESS_KEY_ID
- unset AWS_SECRET_ACCESS_KEY
- ./tst/webrtc_client_test --gtest_break_on_failure --gtest_filter="SignalingApiFunctionalityTest.*:SignalingApiTest.*:TurnConnectionFunctionalityTest.*"
after_failure: skip # timeout not available on MacOS
# Code Coverage
- name: "Linux GCC Code Coverage"
os: linux
compiler: gcc
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
before_script:
- mkdir build && cd build && cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE
after_success:
- for test_file in $(find CMakeFiles/kvsWebrtcClient.dir CMakeFiles/kvsWebrtcSignalingClient.dir -name '*.gcno'); do gcov $test_file; done
- bash <(curl -s https://codecov.io/bash)
# AddressSanitizer
- name: "Linux Clang AddressSanitizer"
os: linux
compiler: clang
env:
- ASAN_OPTIONS=detect_odr_violation=0:detect_leaks=1
- LSAN_OPTIONS=suppressions=../tst/suppressions/LSAN.supp
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
before_script: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE
# UndefinedBehaviorSanitizer
- name: "Linux Clang UndefinedBehaviorSanitizer"
os: linux
compiler: clang
env: UBSAN_OPTIONS=halt_on_error=1
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
before_script: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE
# MemorySanitizer
- name: "Linux Clang MemorySanitizer"
env: allowTestFail=true
before_install:
# TODO: Remove the following 2 lines. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart
- mkdir build
- docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -w /src/build -dit --name msan-tester -v $(pwd):/src seaduboi/kvs-msan-tester
- msan-tester() { docker exec -it msan-tester "$@"; }
script:
- msan-tester cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_DEPENDENCIES=FALSE -DBUILD_TEST=TRUE -DMEMORY_SANITIZER=TRUE -DCMAKE_CXX_FLAGS="-stdlib=libc++ -L/usr/src/libcxx_msan/lib -lc++abi -I/usr/src/libcxx_msan/include -I/usr/src/libcxx_msan/include/c++/v1 -fsanitize=memory -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize-memory-track-origins"
- msan-tester make
- msan-tester ./tst/webrtc_client_test
after_failure: skip # no coredumps in container
# ThreadSanitizer
- name: "Linux Clang ThreadSanitizer"
os: linux
compiler: clang
env: TSAN_OPTIONS=halt_on_error=1:suppressions=../tst/suppressions/TSAN.supp
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
before_script: mkdir build && cd build && cmake .. -DCMAKE_BUILD_TYPE=Debug -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE
# Old Version GCC 4.4
- name: "Linux GCC 4.4 Build"
os: linux
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -q update
- sudo apt-get -y install gcc-4.4
- sudo apt-get -y install gdb
compiler: gcc
before_script: export CC=gcc-4.4 && mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE
# Static Build
- name: "Static Build"
before_install:
# TODO: Remove the following 2 lines. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- echo '{"ipv6":true,"fixed-cidr-v6":"2001:db8:1::/64"}' | sudo tee /etc/docker/daemon.json
- sudo service docker restart
- mkdir build
- docker run -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY -w /src/build -dit --security-opt=seccomp=.github/default.json --name alpine -v $(pwd):/src alpine:latest
- alpine() { docker exec -it alpine "$@"; }
install:
- alpine apk update
- alpine apk upgrade
- alpine apk add alpine-sdk cmake clang linux-headers perl bash openssl-dev
script:
- alpine cmake .. -DBUILD_STATIC_LIBS=TRUE -DBUILD_TEST=TRUE
- alpine make
# ldd will return non-zero when there's no dynamic link. So, the positive value for static builds is non-zero
- alpine ../scripts/check-static-build.sh || travis_terminate 1
- alpine ./tst/webrtc_client_test
after_failure: skip # no coredumps in container
# Cross-compilation to ARM, no tests are run
- name: "ARM Cross-compilation"
os: linux
addons:
apt:
packages:
- gcc-arm-linux-gnueabi
- g++-arm-linux-gnueabi
- binutils-arm-linux-gnueabi
compiler: gcc
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
before_script:
- export CC=arm-linux-gnueabi-gcc CXX=arm-linux-gnueabi-g++
- mkdir build && cd build
- cmake .. -DBUILD_OPENSSL=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LIBSRTP_HOST_PLATFORM=x86_64-unknown-linux-gnu -DBUILD_LIBSRTP_DESTINATION_PLATFORM=arm-unknown-linux-uclibcgnueabi
script: make
- name: "mbedTLS - Linux GCC 4.4 Build"
os: linux
compiler: gcc
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -q update
- sudo apt-get -y install gcc-4.4
- sudo apt-get -y install gdb
before_script: mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON
- name: "mbedTLS - Linux Clang"
os: linux
compiler: clang
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
before_script: mkdir build && cd build && cmake .. -DBUILD_TEST=TRUE -DUSE_OPENSSL=OFF -DUSE_MBEDTLS=ON
- name: "Windows MSVC"
env: allowTestFail=true
os: windows
script:
- choco install nasm strawberryperl
- unset CC CC_FOR_BUILD CXX CXX_FOR_BUILD # We want to use MSVC
- export "PATH=/c/Strawberry/perl/site/bin:/c/Strawberry/perl/bin:/c/Strawberry/c/bin:/c/Program Files/NASM:`pwd`/open-source/lib:`pwd`/open-source/bin:$PATH"
- .github/build_windows.bat
- cd build/tst && ./webrtc_client_test.exe --gtest_filter="-DataChannelFunctionalityTest.*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3"
- name: "Sample check"
os: linux
compiler: gcc
before_install:
# TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891.
- sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get -q update
- sudo apt-get -y install gcc-4.4
before_script: mkdir build && cd build && cmake ..
script:
- make
- cd ..
- ./scripts/check-sample.sh
# Generate Doxygen
- name: "Generate Doxygen"
if: type = push
before_install:
- docker run -w /src/.github -dit --name alpine -v $(pwd):/src alpine
- alpine() { docker exec -it alpine "$@"; }
- alpine apk update
- alpine apk add doxygen graphviz
- alpine apk add --no-cache ttf-freefont
script:
# Add SSH key to agent
- |
eval "$(ssh-agent -s)"
openssl aes-256-cbc -K $encrypted_d627db542948_key -iv $encrypted_d627db542948_iv -in .github/github_deploy_key.enc -out .github/github_deploy_key -d
chmod 600 .github/github_deploy_key
ssh-add .github/github_deploy_key
rm .github/github_deploy_key
# Generate doxygen in container, need latest version
- alpine doxygen Doxyfile
- alpine chmod -R 777 doc
- mv .github/doc/html /tmp
# Unshallow repo
- |
git remote rm origin
git remote add origin git@github.com:awslabs/amazon-kinesis-video-streams-webrtc-sdk-c.git
git fetch
# Move to gh-pages and create new commit
- |
git checkout gh-pages
rm -rf * .github
mv /tmp/html/* .
# Commit and push
- |
git add .
git commit -m "Auto-generated from travis"
git push
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C
1
https://gitee.com/kyoexe/amazon-kinesis-video-streams-webrtc-sdk-c.git
git@gitee.com:kyoexe/amazon-kinesis-video-streams-webrtc-sdk-c.git
kyoexe
amazon-kinesis-video-streams-webrtc-sdk-c
amazon-kinesis-video-streams-webrtc-sdk-c
master

搜索帮助