Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ build_script:
- 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 ../ }
- ps: if ( $Env:RUN_UNIT_TESTS ) { cd _build; ctest -E "TestIPv6.v6_calls_v4" --extra-verbose -C $Env:CONFIGURATION; cd .. }

after_build:
- cmd: >-
Expand Down
83 changes: 29 additions & 54 deletions .github/workflows/abi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,40 +18,26 @@ jobs:
base_version: ${{ steps.build.outputs.SRT_BASE }}
tag_version: ${{ steps.build.outputs.SRT_TAG_VERSION }}
steps:

- uses: actions/checkout@v3
with:
path: gitview_pr

- id: settings
run: echo "SCRIPTS=$PWD/gitview_pr/scripts/workflows/abi" >> $GITHUB_ENV

- id: configure
name: Configure (cmake)
run: |
cd gitview_pr
mkdir _build && cd _build
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_BONDING=1 -DENABLE_PKTINFO=1 -DENABLE_MAXREXMITBW=1 ../
run: $SCRIPTS/step1-configure-pr.sh

- id: build
name: Build and dump
run: |
sudo apt install -y abi-dumper abi-compliance-checker tcl
cd gitview_pr
cd _build && cmake --build ./
make install DESTDIR=./installdir
SRT_TAG_VERSION=v$(../scripts/get-build-version.tcl full)
echo "SRT_TAG_VERSION=$SRT_TAG_VERSION" >> "$GITHUB_OUTPUT"
SRT_TAG=${SRT_TAG_VERSION}dev-$(git rev-parse --short HEAD)
echo "TAGGING PR BUILD: $SRT_TAG"
abi-dumper libsrt.so -o libsrt-pr.dump -public-headers installdir/usr/local/include/srt/ -lver $SRT_TAG
ls -ld libsrt-pr.dump
sha256sum libsrt-pr.dump
SRT_BASE=v$(../scripts/get-build-version.tcl base)
if [[ $SRT_TAG_VERSION == $SRT_BASE ]]; then
echo "NOT CHECKING ABI: base version is being built: $SRT_TAG (not emitting SRT_BASE)"
#echo "SRT_BASE=''" >> "$GITHUB_OUTPUT"
else
echo "WILL CHECK ABI changes $SRT_BASE - $SRT_TAG_VERSION"
echo "SRT_BASE=$SRT_BASE" >> "$GITHUB_OUTPUT"
fi
$SCRIPTS/step2-build-pr__OUTPUT.sh $GITHUB_OUTPUT
echo "--- GITHUB_OUTPUT ---"
cat $GITHUB_OUTPUT
echo "---------------------"

- id: upload_pr_dump
uses: actions/upload-artifact@v4
with:
Expand All @@ -68,36 +54,28 @@ jobs:
SRT_BASE: ${{ needs.build_pr.outputs.base_version }}
SRT_TAG_VERSION: ${{ needs.build_pr.outputs.tag_version }}
steps:

- uses: actions/checkout@v3
with:
path: gitview_pr

- id: settings
run: echo "SCRIPTS=$PWD/gitview_pr/scripts/workflows/abi" >> $GITHUB_ENV

- uses: actions/checkout@v3
with:
path: gitview_base
ref: ${{ env.SRT_BASE }}

- id: configure_tag
name: Configure (cmake)
run: |
echo "TAG:$SRT_TAG_VERSION BASE:$SRT_BASE"

#This is currently a paranoid check - the if should do the job
if [[ -z $SRT_BASE ]]; then
echo "NO BASE DEFINED. NOT BUILDING"
exit 1
fi
cd gitview_base
mkdir _build && cd _build
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_BONDING=1 -DENABLE_PKTINFO=1 -DENABLE_MAXREXMITBW=1 ../
$SCRIPTS/step3-configure-base__SRT_TAG_VERSION__SRT_BASE.sh $SRT_TAG_VERSION $SRT_BASE
- id: build_tag
name: Build and dump
if: ${{ success() }}
run: |
sudo apt install -y abi-dumper
sudo apt install -y tcl
cd gitview_base
cd _build && cmake --build ./
make install DESTDIR=./installdir
echo "TAGGING BASE BUILD: $SRT_BASE"
abi-dumper libsrt.so -o libsrt-base.dump -public-headers installdir/usr/local/include/srt/ -lver $SRT_BASE
ls -ld libsrt-base.dump
sha256sum libsrt-base.dump
$SCRIPTS/step4-build-base__SRT_BASE.sh $SRT_BASE
- id: upload_base_dump
uses: actions/upload-artifact@v4
with:
Expand All @@ -112,6 +90,13 @@ jobs:
SRT_BASE: ${{ needs.build_pr.outputs.base_version }}

steps:

- uses: actions/checkout@v3
with:
path: gitview_pr
- id: settings
run: |
echo "SCRIPTS=$PWD/gitview_pr/scripts/workflows/abi" >> $GITHUB_ENV
- name: Download base dump
uses: actions/download-artifact@v4
with:
Expand All @@ -124,18 +109,8 @@ jobs:
path: .
- name: abi-check
run: |
sudo apt install -y abi-dumper abi-compliance-checker tcl
echo "FILESYSTEM state before running abi-check at $PWD"
ls -l
sha256sum libsrt-base.dump
sha256sum libsrt-pr.dump
RES=0
abi-compliance-checker -l libsrt -old libsrt-base.dump -new libsrt-pr.dump || RES=$?
# Flatten the report for download-preview
cd compat_reports
REPORT=$(find . -name *.html)
cp $REPORT compat_report.html
cd ..
$SCRIPTS/prepare-environment.sh
$SCRIPTS/step5-run-abi-check.sh || RES=$?
if (( $RES != 0 )); then
echo "ABI/API Compatibility check failed with value $?"
echo "RES=$RES" >>$GITHUB_ENV
Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/iOS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,24 @@ jobs:
build:
strategy:
matrix:
cxxstdsync: [OFF, ON]
sync: [posix, std]

name: iOS-cxxsync${{ matrix.cxxstdsync }}
name: iOS SYNC=${{ matrix.sync }}
runs-on: macos-latest

steps:

- uses: actions/checkout@v3

- name: Install dependency packages
run: |
brew install make llvm
run: ./scripts/workflows/build/macos-prepare-environment.sh

- name: configure
run: |
mkdir _build && cd _build
export PATH="/opt/homebrew/opt/llvm/bin:$PATH" CC=clang CXX=clang++
cmake .. -DCMAKE_MAKE_PROGRAM=gmake -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_MONOTONIC_CLOCK=OFF -DENABLE_UNITTESTS=OFF -DUSE_CXX_STD=c++11 -DENABLE_BONDING=ON --toolchain scripts/iOS.cmake
echo "Compiler id:"
$CXX -v
./scripts/workflows/build/configure.sh _build -sync ${{ matrix.sync }} -ut off -enc off -std 11 -bonding on -- -DCMAKE_MAKE_PROGRAM=gmake --toolchain scripts/iOS.cmake

- name: build
run: cd _build && cmake --build ./
run: ./scripts/workflows/build/build.sh _build
23 changes: 9 additions & 14 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@ jobs:
runs-on: macos-latest

steps:
- name: GoogleTest
run: |
brew tap-new Haivision/gt-local
brew extract --version=1.12.1 --force googletest Haivision/gt-local
brew trust Haivision/gt-local
brew install googletest@1.12.1
# NOTE: 1.12.1 is the last version that requires C++11; might need update later
# curl -o googletest.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23e7fb4dc0cc73facc3772815741e1deb87d6406/Formula/googletest.rb
# brew install -s googletest.rb
- uses: actions/checkout@v3

- name: Environment
run: ./scripts/workflows/build/macos-prepare-environment.sh -ut on

- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DUSE_CXX_STD=17
run: ./scripts/workflows/build/configure.sh _build -werror on -sync std -enc off -ut on -bonding on -std 17

- name: build
run: cd _build && cmake --build ./
run: ./scripts/workflows/build/build.sh _build

- name: test
run: cd _build && ctest --extra-verbose
run: ./scripts/workflows/build/test.sh _build
24 changes: 10 additions & 14 deletions .github/workflows/ubuntu-c++03.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,20 @@ jobs:
name: logging=${{ matrix.logging }} bonding=${{ matrix.bonding }}
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v3

- name: prepare
run: |
sudo apt update
sudo apt install -y tcl cmake libssl-dev gdb
run: ./scripts/workflows/build/ubuntu-prepare-environment.sh

- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_STDCXX_SYNC=OFF -DUSE_CXX_STD=03 -DENABLE_ENCRYPTION=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=${{ matrix.bonding }} -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DENABLE_LOGGING=${{ matrix.logging }}
run: ./scripts/workflows/build/configure.sh _build -sync posix -std 03 -bonding ${{ matrix.bonding }} -logging ${{ matrix.logging }} -examples on -testing on -werror on -ut on

- name: build
# That below is likely SonarQube remains, which was removed earlier.
#run: cd _build && build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build .
run: cd _build && cmake --build .
run: ./scripts/workflows/build/build.sh _build

- name: test
run: |
echo "core.%e" | sudo tee /proc/sys/kernel/core_pattern
ulimit -c unlimited
cd _build && ctest --extra-verbose
SUCCESS=$?
if [ -f core.test-srt ]; then gdb -batch ./test-srt -c core.test-srt -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
test $SUCCESS == 0;
run: ./scripts/workflows/build/test.sh _build

33 changes: 13 additions & 20 deletions .github/workflows/ubuntu-c++11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,37 +16,30 @@ jobs:
name: ON ${{ matrix.machine }}
runs-on: "${{ matrix.machine }}"
steps:

- uses: actions/checkout@v3

- name: prepare
run: |
sudo apt update
RUNON=${{ matrix.machine }}
if [[ $RUNON == ubuntu-latest ]]; then
sudo apt install -y gdb
fi
sudo apt install -y tcl cmake
[[ $RUNON == ubuntu-24.04-arm ]] || sudo apt install libssl-dev
[[ ${{ matrix.machine }} == ubuntu-24.04-arm ]] && OPT+=" -gdb off -ssl off"
./scripts/workflows/build/ubuntu-prepare-environment.sh $OPT

- name: configure
run: |
RUNON=${{ matrix.machine }}
ENCRYPTION=ON
[[ $RUNON == ubuntu-24.04-arm ]] && ENCRYPTION=OFF
mkdir _build && cd _build
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DUSE_CXX_STD=11 -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=$ENCRYPTION -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON -DENABLE_DEBUG=ON -DENABLE_CODE_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
[[ ${{ matrix.machine }} == ubuntu-24.04-arm ]] && OPT+=" -enc off"
./scripts/workflows/build/configure.sh _build $OPT -werror on -std 11 -ut on -bonding on -testing on -examples on -debug on -codecov on
- name: build
run: cd _build && cmake --build .
run: ./scripts/workflows/build/build.sh _build

- name: test
run: |
echo "core.%e" | sudo tee /proc/sys/kernel/core_pattern
ulimit -c unlimited
cd _build && ctest --extra-verbose
SUCCESS=$?
if [ -f core.test-srt ]; then gdb -batch ./test-srt -c core.test-srt -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
test $SUCCESS == 0;
run: ./scripts/workflows/build/test.sh _build

- name: codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}

# ALTERNATIVE manual running of codecov; not in use as long as Github action works.
# name: codecov
# run: |
# ./scripts/codecov/update.sh
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/ubuntu-mingw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,10 @@ jobs:
sudo apt install -y g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix
- name: Configure
run: |
mkdir _build && cd _build
export CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix
#cmake .. -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=OFF -DUSE_OPENSSL_PC=OFF -DCMAKE_SYSTEM_NAME=Windows -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# Warn-on-error turned off because there's a warning about epoll about unimplemented system fd subscription system
cmake .. -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=OFF -DUSE_OPENSSL_PC=OFF -DCMAKE_SYSTEM_NAME=Windows -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
# NOTE: -werror off because epoll warns about unimplemented system socket poll
./scripts/workflows/build/configure.sh _build -werror off -enc off -ut off -bonding on -testing on -- -DUSE_OPENSSL_PC=OFF -DCMAKE_SYSTEM_NAME=Windows

- name: Build
run: cd _build && make -j -k
run: ./scripts/workflows/build/build.sh _build

4 changes: 4 additions & 0 deletions .github/workflows/windows-msvc-noenc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ jobs:
runs-on: windows-latest

steps:

- uses: actions/checkout@v3

- name: configure
run: |
md _build && cd _build
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_LOCALIF_WIN32=ON -DUSE_CXX_STD=c++11

- name: build
run: cd _build && cmake --build ./ --config Release --verbose

- name: test
run: cd _build && ctest -E "TestIPv6.v6_calls_v4|TestConnectionTimeout.BlockingLoop" --extra-verbose -C Release
28 changes: 28 additions & 0 deletions scripts/workflows/abi/prepare-environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

if [[ "`id -u`" != "0" ]]; then
echo "REQUIRED ROOT; attempting to resolve into sudo:"
exec sudo $0 "$@"
fi

# Check distro
eval `cat /etc/*release* | grep ^NAME`

echo "System detected: $NAME"

case "$NAME" in
Ubuntu)
apt install -y abi-dumper abi-compliance-checker tcl
;;

openSUSE*)
zypper install -y abi-dumper abi-compliance-checker tcl
;;

*)
echo >&2 "ERROR: Unsupported system. Please update script"
exit 1
;;
esac


17 changes: 17 additions & 0 deletions scripts/workflows/abi/prepare-repository.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash -x

# NOTE: This step is to be run manually only. Github workflow
# will do the same through actions. Some duplicated settings are here, too.
# XXX Consider some common settings storage

export SRT_BASE=v1.5.0

WD=$PWD

PR_LABEL=`git rev-parse HEAD`

git clone --depth 1 --revision=$PR_LABEL git@github.com:Haivision/srt.git gitview_pr
git clone --depth 1 --branch $SRT_BASE git@github.com:Haivision/srt.git gitview_base



Loading
Loading