Skip to content

Commit 55b20f9

Browse files
committed
Merge remote-tracking branch 'upstream/development' into belabox-dev2
2 parents ae39253 + ced4386 commit 55b20f9

File tree

129 files changed

+9157
-5559
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

129 files changed

+9157
-5559
lines changed

.github/workflows/abi.yml

Lines changed: 67 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,75 +15,122 @@ jobs:
1515
runs-on: ubuntu-latest
1616

1717
outputs:
18-
SRT_BASE: ${{ steps.commands.outputs.SRT_BASE }}
18+
base_version: ${{ steps.build.outputs.SRT_BASE }}
19+
tag_version: ${{ steps.build.outputs.SRT_TAG_VERSION }}
1920
steps:
2021
- uses: actions/checkout@v3
2122
with:
2223
path: gitview_pr
23-
- name: configure
24+
- id: configure
25+
name: Configure (cmake)
2426
run: |
2527
cd gitview_pr
2628
mkdir _build && cd _build
27-
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNITTESTS=ON ../
28-
- name: build
29+
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNITTESTS=OFF ../
30+
- id: build
31+
name: Build and dump
2932
run: |
3033
sudo apt install -y abi-dumper
3134
sudo apt install -y tcl
3235
cd gitview_pr/_build && cmake --build ./
3336
make install DESTDIR=./installdir
3437
SRT_TAG_VERSION=v$(../scripts/get-build-version.tcl full)
38+
echo "SRT_TAG_VERSION=$SRT_TAG_VERSION" >> "$GITHUB_OUTPUT"
3539
SRT_TAG=${SRT_TAG_VERSION}dev-$(git rev-parse --short HEAD)
40+
echo "TAGGING PR BUILD: $SRT_TAG"
3641
abi-dumper libsrt.so -o libsrt-pr.dump -public-headers installdir/usr/local/include/srt/ -lver $SRT_TAG
42+
ls -ld libsrt-pr.dump
43+
sha256sum libsrt-pr.dump
3744
SRT_BASE=v$(../scripts/get-build-version.tcl base)
3845
if [[ $SRT_TAG_VERSION == $SRT_BASE ]]; then
39-
echo "NOT CHECKING ABI: base version is being built: $SRT_TAG"
40-
echo "SRT_BASE=''" >> "$GITHUB_OUTPUT"
41-
exit 0
46+
echo "NOT CHECKING ABI: base version is being built: $SRT_TAG (not emitting SRT_BASE)"
47+
#echo "SRT_BASE=''" >> "$GITHUB_OUTPUT"
48+
else
49+
echo "WILL CHECK ABI changes $SRT_BASE - $SRT_TAG_VERSION"
50+
echo "SRT_BASE=$SRT_BASE" >> "$GITHUB_OUTPUT"
4251
fi
43-
echo "SRT_BASE=$SRT_BASE" >> "$GITHUB_OUTPUT"
52+
- id: upload_pr_dump
53+
uses: actions/upload-artifact@v4
54+
with:
55+
name: abidump_pr
56+
path: gitview_pr/_build/libsrt-pr.dump
4457

4558
build_base:
4659
name: Build base version
4760
runs-on: ubuntu-latest
4861
needs: build_pr
49-
if: ${{ needs.build_pr.outputs.SRT_BASE != '' }}
62+
if: ${{ needs.build_pr.outputs.base_version != '' }}
5063

5164
env:
52-
SRT_BASE: ${{ needs.build_pr.outputs.SRT_BASE }}
65+
SRT_BASE: ${{ needs.build_pr.outputs.base_version }}
66+
SRT_TAG_VERSION: ${{ needs.build_pr.outputs.tag_version }}
5367
steps:
5468
- uses: actions/checkout@v3
5569
with:
5670
path: gitview_base
5771
ref: ${{ env.SRT_BASE }}
58-
- name: configure_tag
72+
- id: configure_tag
73+
name: Configure (cmake)
5974
run: |
60-
echo $SRT_TAG_VERSION
75+
echo "TAG:$SRT_TAG_VERSION BASE:$SRT_BASE"
76+
77+
#This is currently a paranoid check - the if should do the job
78+
if [[ -z $SRT_BASE ]]; then
79+
echo "NO BASE DEFINED. NOT BUILDING"
80+
exit 1
81+
fi
6182
cd gitview_base
6283
mkdir _build && cd _build
63-
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNITTESTS=ON ../
64-
- name: build_tag
84+
cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_UNITTESTS=OFF ../
85+
- id: build_tag
86+
name: Build and dump
87+
if: ${{ success() }}
6588
run: |
89+
sudo apt install -y abi-dumper
90+
sudo apt install -y tcl
6691
cd gitview_base
6792
cd _build && cmake --build ./
6893
make install DESTDIR=./installdir
94+
echo "TAGGING BASE BUILD: $SRT_BASE"
6995
abi-dumper libsrt.so -o libsrt-base.dump -public-headers installdir/usr/local/include/srt/ -lver $SRT_BASE
96+
ls -ld libsrt-base.dump
97+
sha256sum libsrt-base.dump
98+
- id: upload_base_dump
99+
uses: actions/upload-artifact@v4
100+
with:
101+
name: abidump_base
102+
path: gitview_base/_build/libsrt-base.dump
70103

71104
check_abi:
72105
name: Compare ABI
73106
runs-on: ubuntu-latest
74107
needs: [build_pr, build_base]
75108
env:
76-
SRT_BASE: ${{ needs.build_pr.outputs.SRT_BASE }}
109+
SRT_BASE: ${{ needs.build_pr.outputs.base_version }}
77110

78111
steps:
112+
- name: Download base dump
113+
uses: actions/download-artifact@v4
114+
with:
115+
name: abidump_base
116+
path: .
117+
- name: Download pr dump
118+
uses: actions/download-artifact@v4
119+
with:
120+
name: abidump_pr
121+
path: .
79122
- name: abi-check
80123
run: |
81-
#git clone https://github.com/lvc/abi-compliance-checker.git
82-
cd gitview_pr/submodules
83-
git submodule update --init abi-compliance-checker
124+
git clone https://github.com/lvc/abi-compliance-checker.git
125+
#cd gitview_pr/submodules
126+
#git submodule update --init abi-compliance-checker
84127
cd abi-compliance-checker && sudo make install && cd ../
85-
cd ../..
86-
abi-compliance-checker -l libsrt -old gitview_base/_build/libsrt-base.dump -new gitview_pr/_build/libsrt-pr.dump
128+
#cd ../..
129+
echo "FILESYSTEM state before running abi-check at $PWD"
130+
ls -l
131+
sha256sum libsrt-base.dump
132+
sha256sum libsrt-pr.dump
133+
abi-compliance-checker -l libsrt -old libsrt-base.dump -new libsrt-pr.dump
87134
RES=$?
88135
if (( $RES != 0 )); then
89136
echo "ABI/API Compatibility check failed with value $?"
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: C++03 (old compat)
2+
3+
on:
4+
push:
5+
branches: [ "master", "dev" ]
6+
pull_request:
7+
branches: [ "master", "dev" ]
8+
types: [opened, synchronize, reopened]
9+
jobs:
10+
build:
11+
name: ubuntu
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
- name: configure
16+
run: |
17+
mkdir _build && cd _build
18+
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_STDCXX_SYNC=OFF -DUSE_CXX_STD=c++03 -DENABLE_ENCRYPTION=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON -DENABLE_CODE_COVERAGE=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
19+
- name: build
20+
# That below is likely SonarQube remains, which was removed earlier.
21+
#run: cd _build && build-wrapper-linux-x86-64 --out-dir ${{ env.BUILD_WRAPPER_OUT_DIR }} cmake --build .
22+
run: cd _build && cmake --build .
23+
- name: test
24+
run: |
25+
cd _build && ctest --extra-verbose
26+
- name: codecov
27+
run: |
28+
source ./scripts/collect-gcov.sh
29+
bash <(curl -s https://codecov.io/bash)

.github/workflows/cxx11-macos.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,11 @@ jobs:
1414
steps:
1515
- name: GoogleTest
1616
run: |
17-
curl -o googletest.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23e7fb4dc0cc73facc3772815741e1deb87d6406/Formula/googletest.rb
18-
brew install -s googletest.rb
17+
brew extract --version=1.12.1 --force googletest
18+
brew install googletest@1.12.1
19+
# NOTE: 1.12.1 is the last version that requires C++11; might need update later
20+
# curl -o googletest.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/23e7fb4dc0cc73facc3772815741e1deb87d6406/Formula/googletest.rb
21+
# brew install -s googletest.rb
1922
- uses: actions/checkout@v3
2023
- name: configure
2124
run: |

.github/workflows/cxx11-ubuntu.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: cxx11
1+
name: C++11
22

33
on:
44
push:

.github/workflows/iOS.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
build:
1111
strategy:
1212
matrix:
13-
cxxstdsync: [OFF, ON]
13+
cxxstdsync: [ON] #[OFF, ON] # cxxsync=off is Linux-gcc-only.
1414

1515
name: iOS-cxxsync${{ matrix.cxxstdsync }}
1616
runs-on: macos-latest
@@ -20,6 +20,6 @@ jobs:
2020
- name: configure
2121
run: |
2222
mkdir _build && cd _build
23-
cmake ../ -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_UNITTESTS=OFF -DUSE_CXX_STD=c++11 -DENABLE_BONDING=ON --toolchain scripts/iOS.cmake
23+
cmake ../ -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
2424
- name: build
2525
run: cd _build && cmake --build ./

.travis.yml

Lines changed: 75 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# TRAVIS Configuration file
2+
#
3+
# XXX MIND SYNTAX TRICKS:
4+
# - Keep column consistency
5+
# - TAB characters NOT ALLOWED anywhere
6+
# - COLON characters (in freestanding strings) not allowed in the script
7+
18
language: cpp
29
dist: xenial
310

@@ -16,27 +23,27 @@ addons:
1623
packages:
1724
- openssl
1825

19-
matrix:
26+
jobs:
2027
include:
2128
- os: linux
2229
env:
2330
- BUILD_TYPE=Debug CFG="monotonic openssl werror"
24-
- BUILD_OPTS='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
31+
- CMAKE_OPTS='-DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
2532
- env:
2633
- BUILD_TYPE=Debug CFG="nologging mbedtls monotonic werror"
27-
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
34+
- CMAKE_OPTS='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
2835
- os: linux
2936
env: BUILD_TYPE=Release CFG=default
30-
- os: osx
31-
osx_image: xcode11.1
32-
env:
33-
- BUILD_TYPE=Debug CFG=werror
34-
- BUILD_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
35-
- os: osx
36-
osx_image: xcode11.1
37-
env:
38-
- BUILD_TYPE=Release CFG=werror
39-
- BUILD_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
37+
# - os: osx
38+
# osx_image: xcode11.1
39+
# env:
40+
# - BUILD_TYPE=Debug CFG=werror
41+
# - CMAKE_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
42+
# - os: osx
43+
# osx_image: xcode11.1
44+
# env:
45+
# - BUILD_TYPE=Release CFG=werror
46+
# - CMAKE_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
4047
- os: linux
4148
compiler: x86_64-w64-mingw32-g++
4249
addons:
@@ -53,39 +60,70 @@ matrix:
5360
- ./Configure --cross-compile-prefix=x86_64-w64-mingw32- mingw64
5461
- make
5562
- cd ..
56-
env: BUILD_TYPE=Release CFG=default
63+
env: BUILD_TYPE=Release CFG=no-UT
5764

5865
# Power jobs
66+
# Forcing Focal distro because Xenial
67+
# has somehow outdated CMake
5968
- os: linux
6069
arch: ppc64le
70+
dist: focal
6171
env:
62-
- BUILD_TYPE=Debug
72+
- ARCH=PowerPC BUILD_TYPE=Debug
6373
- arch: ppc64le
74+
dist: focal
6475
env:
65-
- BUILD_TYPE=Release CFG=monotonic
66-
- BUILD_OPTS='-DENABLE_MONOTONIC_CLOCK=ON'
76+
- ARCH=PowerPC BUILD_TYPE=Release CFG=monotonic
77+
- CMAKE_OPTS='-DENABLE_MONOTONIC_CLOCK=ON'
6778
script:
79+
- CMAKE_VERSION=$(cmake --version | head -1 | awk '{print $3}')
80+
- echo CMAKE version $CMAKE_VERSION
81+
- CMAKE_VERSION_OK=$(echo "puts [package vcompare $CMAKE_VERSION 3.10]" | tclsh);
82+
- if [ "$CMAKE_VERSION_OK" == "-1" ]; then
83+
echo "ERROR - cmake version too old, >=3.10 required";
84+
exit 1;
85+
fi;
86+
- export REQUIRE_UNITTESTS=1
87+
- if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then
88+
CMAKE_OPTS+=" -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc";
89+
CMAKE_OPTS+=" -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++";
90+
CMAKE_OPTS+=" -DENABLE_STDCXX_SYNC=OFF -DENABLE_LOCALIF_WIN32=OFF -DENABLE_UNITTESTS=OFF -DUSE_OPENSSL_PC=OFF";
91+
CMAKE_OPTS+=" -DOPENSSL_ROOT_DIR=$PWD/openssl";
92+
CMAKE_OPTS+=" -DOPENSSL_CRYPTO_LIBRARY=$PWD/openssl/libcrypto-1_1-x64.dll";
93+
CMAKE_OPTS+=" -DCMAKE_SYSTEM_NAME=Windows";
94+
REQUIRE_UNITTESTS=0;
95+
fi;
96+
if [ "$TRAVIS_OS_NAME" == "osx" ]; then
97+
export PKG_CONFIG_PATH="$(brew --prefix openssl)/lib/pkgconfig";
98+
fi;
99+
if (( $REQUIRE_UNITTESTS )); then
100+
CMAKE_OPTS+=" -DENABLE_UNITTESTS=ON";
101+
fi;
68102
- echo COMPILER $TRAVIS_COMPILER
69103
- echo SYSTEM $TRAVIS_OS_NAME
70104
- echo BUILD_TYPE $BUILD_TYPE
71-
- echo BUILD_OPTS $BUILD_OPTS
72-
- cmake --version | head -1
73-
- if [ "$TRAVIS_COMPILER" == "x86_64-w64-mingw32-g++" ]; then
74-
export CC="x86_64-w64-mingw32-gcc";
75-
export CXX="x86_64-w64-mingw32-g++";
76-
CMAKE_OPTS="-DENABLE_UNITTESTS=OFF -DUSE_OPENSSL_PC=OFF -DOPENSSL_ROOT_DIR=\"$PWD/openssl\" -DCMAKE_SYSTEM_NAME=Windows"
77-
elif [ "$TRAVIS_OS_NAME" == "linux" ]; then
78-
CMAKE_OPTS="-DENABLE_UNITTESTS=ON"
79-
elif [ "$TRAVIS_OS_NAME" == "osx" ]; then
80-
export PKG_CONFIG_PATH=$(brew --prefix openssl)"/lib/pkgconfig";
81-
CMAKE_OPTS="-DENABLE_UNITTESTS=ON"
82-
fi
83-
- cmake . -DCMAKE_BUILD_TYPE=$BUILD_TYPE $BUILD_OPTS $CMAKE_OPTS; then echo "Configure OK"; else cat CMakeFiles/CMakeError.log; fi;
84-
- make -j$(nproc);
85-
- if [ "$TRAVIS_COMPILER" != "x86_64-w64-mingw32-g++" ]; then
105+
- echo CMAKE_OPTS $CMAKE_OPTS
106+
- export SUCCESS=0
107+
- cmake . --debug-output -DCMAKE_MESSAGE_LOG_LEVEL=VERBOSE -DCMAKE_BUILD_TYPE=$BUILD_TYPE $CMAKE_OPTS 2>&1 || SUCCESS=$?;
108+
- if (($SUCCESS == 0)); then
109+
echo "Configure OK";
110+
else
111+
echo "-- OUTPUT --";
112+
cat CMakeFiles/CMakeOutput.log || echo "NO OUTPUT";
113+
echo "-- ERRORS --";
114+
cat CMakeFiles/CMakeError.log || echo "NO LOGS";
115+
exit 1;
116+
fi;
117+
- make VERBOSE=1 -j$(nproc);
118+
- if (( $REQUIRE_UNITTESTS )); then
86119
ulimit -c unlimited;
87-
./test-srt -disable-ipv6;
88-
SUCCESS=$?;
89-
if [ -f core ]; then gdb -batch ./test-srt -c core -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
90-
test $SUCCESS == 0;
91-
fi
120+
if [ ! -f ./test-srt ]; then
121+
echo "ERROR - UT application not found";
122+
false;
123+
else
124+
./test-srt -disable-ipv6;
125+
SUCCESS=$?;
126+
if [ -f core ]; then gdb -batch ./test-srt -c core -ex bt -ex "info thread" -ex quit; else echo "NO CORE - NO CRY!"; fi;
127+
test $SUCCESS == 0;
128+
fi;
129+
fi;

0 commit comments

Comments
 (0)