Skip to content

Commit

Permalink
Merge branch 'master' into docs/rejection-codes
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko authored Aug 7, 2024
2 parents d24170b + 1919479 commit 4d3cdab
Show file tree
Hide file tree
Showing 145 changed files with 7,409 additions and 3,863 deletions.
10 changes: 3 additions & 7 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ configuration:
- Debug

image:
- Visual Studio 2022
- Visual Studio 2019
- Visual Studio 2015
- Visual Studio 2013

platform:
- x64
Expand All @@ -14,12 +14,8 @@ platform:
build_script:
- ps: $VSIMG = $Env:APPVEYOR_BUILD_WORKER_IMAGE; $CNFG = $Env:CONFIGURATION
# use a few differing arguments depending on VS version to exercise different options during builds
- ps: if ($VSIMG -match '2019' -and $CNFG -eq "Release") { .\scripts\build-windows.ps1 -STATIC_LINK_SSL ON -BUILD_APPS ON -UNIT_TESTS ON -BONDING ON }
- ps: if ($VSIMG -match '2019' -and $CNFG -eq "Debug") { .\scripts\build-windows.ps1 -STATIC_LINK_SSL ON -BUILD_APPS ON }
- ps: if ($VSIMG -match '2015' -and $CNFG -eq "Release") { .\scripts\build-windows.ps1 -STATIC_LINK_SSL ON -BUILD_APPS ON -UNIT_TESTS ON -BONDING ON}
- ps: if ($VSIMG -match '2015' -and $CNFG -eq "Debug") { .\scripts\build-windows.ps1 -STATIC_LINK_SSL ON -BUILD_APPS OFF }
- ps: if ($VSIMG -match '2013' -and $CNFG -eq "Release") { .\scripts\build-windows.ps1 -CXX11 OFF -BUILD_APPS ON }
- ps: if ($VSIMG -match '2013' -and $CNFG -eq "Debug") { Exit-AppveyorBuild } # just skip 2013 debug build for speed
- ps: if ($CNFG -eq "Release") { .\scripts\build-windows.ps1 -STATIC_LINK_SSL ON -BUILD_APPS ON -UNIT_TESTS ON -BONDING ON}
- ps: if ($CNFG -eq "Debug") { if ($VSIMG -match '2015') { .\scripts\build-windows.ps1 -STATIC_LINK_SSL ON -BUILD_APPS OFF } else {.\scripts\build-windows.ps1 -STATIC_LINK_SSL ON -BUILD_APPS ON }}

test_script:
- ps: if ( $Env:RUN_UNIT_TESTS ) { cd ./_build; ctest -E "TestIPv6.v6_calls_v4" --extra-verbose -C $Env:CONFIGURATION; cd ../ }
Expand Down
61 changes: 61 additions & 0 deletions .github/workflows/abi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: ABI checks

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
SRT_BASE: v1.5.0

jobs:
build:
name: ABI checks
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3
with:
path: pull_request
- name: configure
run: |
cd pull_request
mkdir _build && cd _build
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNITTESTS=ON ../
- name: build
run: |
sudo apt install -y abi-dumper
cd pull_request/_build && cmake --build ./
make install DESTDIR=./installdir
SRT_TAG_VERSION=$(cat version.h |grep SRT_VERSION_MINOR |head -n1 |awk {'print $3'})
abi-dumper libsrt.so -o libsrt-pr.dump -public-headers installdir/usr/local/include/srt/ -lver 0
SRT_BASE="v1.$SRT_TAG_VERSION.0"
echo "SRT_BASE=$SRT_BASE" >> "$GITHUB_ENV"
- uses: actions/checkout@v3
with:
path: tag
ref: ${{ env.SRT_BASE }}
- name: configure_tag
run: |
echo $SRT_TAG_VERSION
cd tag
mkdir _build && cd _build
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNITTESTS=ON ../
- name: build_tag
run: |
cd tag
cd _build && cmake --build ./
make install DESTDIR=./installdir
abi-dumper libsrt.so -o libsrt-tag.dump -public-headers installdir/usr/local/include/srt/ -lver 1
- name: abi-check
run: |
git clone https://github.com/lvc/abi-compliance-checker.git
cd abi-compliance-checker && sudo make install && cd ../
abi-compliance-checker -l libsrt -old tag/_build/libsrt-tag.dump -new pull_request/_build/libsrt-pr.dump
RES=$?
if (( $RES != 0 ))
then
echo "ABI/API Compatibility check failed with value $?"
exit $RES
fi
25 changes: 20 additions & 5 deletions .github/workflows/cxx11-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,34 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]

types: [opened, synchronize, reopened]
jobs:
build:
name: ubuntu
runs-on: ubuntu-20.04

env:
BUILD_WRAPPER_OUT_DIR: sonar-output # Directory where build-wrapper output will be placed
steps:
- uses: actions/checkout@v3
- name: Install sonar-scanner and build-wrapper
uses: sonarsource/sonarcloud-github-c-cpp@v2
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON -DENABLE_CODE_COVERAGE=ON
- name: build
run: cd _build && cmake --build ./
run: cd _build && build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build .
- name: test
run: cd _build && ctest --extra-verbose
run: |
cd _build && ctest --extra-verbose
- name: codecov
run: |
source ./scripts/collect-gcov.sh
bash <(curl -s https://codecov.io/bash)
- name: Run SonarCloud Scan for C and C++
if: ${{ !github.event.pull_request.head.repo.fork }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# Consult https://docs.sonarcloud.io/advanced-setup/ci-based-analysis/sonarscanner-cli/ for more information and options.
run: sonar-scanner --define sonar.cfamily.build-wrapper-output=_build/"${{ env.BUILD_WRAPPER_OUT_DIR }}"
41 changes: 41 additions & 0 deletions .github/workflows/s390x-focal.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: QEMU to run s390x-focal

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
Tests:
runs-on: ubuntu-latest
steps:
- name: Setup multiarch/qemu-user-static
run: |
docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: ubuntu-core:s390x-focal
uses: docker://multiarch/ubuntu-core:s390x-focal
with:
args: >
bash -c
"uname -a &&
lscpu | grep Endian
"
- name: Checkout
uses: actions/checkout@v3
- name: configure
uses: docker://multiarch/ubuntu-core:s390x-focal
with:
args: >
bash -c
"apt-get -y update &&
export DEBIAN_FRONTEND=noninteractive &&
export TZ=Etc/UTC &&
apt-get -y install tzdata &&
uname -a &&
lscpu | grep Endian &&
apt-get -y install cmake g++ libssl-dev git &&
mkdir _build && cd _build &&
cmake ../ -DENABLE_ENCRYPTION=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON &&
cmake --build ./ &&
./test-srt -disable-ipv6"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ vcpkg/

# LSP
compile_commands.json

# ignore files generated by clion and cmake
.idea/
cmake-build-debug/
31 changes: 3 additions & 28 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@ addons:
- build-essential
- libmbedtls-dev
- gdb
sonarcloud:
organization: "haivision"
token:
secure: "wJZC0kyyjuf4SZyonZ6p/5Ga9asEqSnKWF9NpRbu6S6ceERO7vbebuSJF5qX3A6ivPuw0TTk5WASOdnvIyfA28FU/D0MWRdH8K7T3w77wdE9EgAEYTUXzdrbzJY18+9pxjljHwWXWALPSGf3MClg4irWrdk1e6uHK+68R39+ZvBGBFpWeeZy/+at9+xwhtAGKBlSHe8zc+3wPxuYdvviLVJ25qbpNmnzkUR0X89G+UBl90raCPSN32EHFdImHZ5DxfEQQJgZFRjzQUY4EW/iYwaMel7jufAq0ClgV4psKujl9Lz8cPqx3WgqRfJyiIthOMTsac7G4zAw8LK2CI0VsssBp0JalLXaumi6vG7o6c3rIwKckzSKccq3pHa7h45praIVVn9s3nq+Q/JGA11FMkKQxdQtmwgFsLhbi6ZxabgsUi5KtWoWY2z6MgpJuROuAjNxZi9XJzUoJs7zSTUtRRW7V8Q2lRiOnknYh25N6TCA5bpyy1EZmRdJErm071YNI9P01gbFz5137FWJFiJzro9TGF0KoHSGiCIdUt3WlMzwr/i/wFLxFBQOZQ2rjTXvhs4hxONxMZV3gzxA1NdLaf9i5Mh6jxVMV+ujaRSV7JmPGzxqiAlpT9cJUhTCYuar9diLLeDrpe7RawEZR8V1xVDQ7yT8ruDNQ78VbSn/sC0="
homebrew:
update: false
packages:
Expand All @@ -25,9 +21,7 @@ matrix:
- os: linux
env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_CODE_COVERAGE=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- RUN_SONARCUBE=1
- RUN_CODECOV=1
- BUILD_OPTS='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
Expand Down Expand Up @@ -71,7 +65,6 @@ matrix:
- BUILD_TYPE=Release
- BUILD_OPTS='-DENABLE_MONOTONIC_CLOCK=ON'
script:
- TESTS_IPv6="TestMuxer.IPv4_and_IPv6:TestIPv6.v6_calls_v6*:ReuseAddr.ProtocolVersion:ReuseAddr.*6" ; # Tests to skip due to lack of IPv6 support
- if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then
export CC="x86_64-w64-mingw32-gcc";
export CXX="x86_64-w64-mingw32-g++";
Expand All @@ -82,29 +75,11 @@ script:
export PKG_CONFIG_PATH=$(brew --prefix openssl)"/lib/pkgconfig";
cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS -DENABLE_UNITTESTS="ON";
fi
- echo "TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG"
- echo "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST"
- if [[ "$TRAVIS_REPO_SLUG" != "Haivision/srt" || "$TRAVIS_PULL_REQUEST" -gt 0 ]]; then
export RUN_SONARCUBE=0;
fi
- echo "RUN_SONARCUBE=$RUN_SONARCUBE"
- if (( "$RUN_SONARCUBE" )); then
build-wrapper-linux-x86-64 --out-dir bw-output make;
else
make -j$(nproc);
fi
- make -j$(nproc);
- if [ "$TRAVIS_COMPILER" != "x86_64-w64-mingw32-g++" ]; then
ulimit -c unlimited;
./test-srt --gtest_filter="-$TESTS_IPv6";
./test-srt -disable-ipv6;
SUCCESS=$?;
if [ -f core ]; then gdb -batch ./test-srt -c core -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
test $SUCCESS == 0;
fi
after_success:
- if (( "$RUN_CODECOV" )); then
source ./scripts/collect-gcov.sh;
bash <(curl -s https://codecov.io/bash);
fi
- if (( "$RUN_SONARCUBE" )); then
sonar-scanner -D"sonar.cfamily.gcov.reportPath=.";
fi
Loading

0 comments on commit 4d3cdab

Please sign in to comment.