Skip to content

Commit

Permalink
Updated and post-fixed. NOTE: Broadcast group still failing.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikolaj Malecki committed Sep 11, 2024
2 parents 4320e27 + 7a4f5e2 commit c3a7a3c
Show file tree
Hide file tree
Showing 279 changed files with 44,039 additions and 24,863 deletions.
12 changes: 4 additions & 8 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,15 +14,11 @@ 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 }
- 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 }
- 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 --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
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
26 changes: 26 additions & 0 deletions .github/workflows/android.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Android

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

jobs:
build:
name: NDK-R23
runs-on: ubuntu-20.04

steps:
- name: Setup Android NDK R23
uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r23
add-to-path: false
- uses: actions/checkout@v3
- name: build
run: |
cd ./scripts/build-android/
echo ${{ steps.setup-ndk.outputs.ndk-path }}
source ./build-android -n ${{ steps.setup-ndk.outputs.ndk-path }}
43 changes: 43 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "CodeQL"

on:
push:
branches: [ "master", "experimental/socket-groups" ]
pull_request:
branches: [ "master" ]

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ cpp ]

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Configure
run: cmake -DENABLE_HEAVY_LOGGING=1 -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS=-fpermissive -DENABLE_BONDING=1 .

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality

- name: Build
run: |
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"
10 changes: 6 additions & 4 deletions .github/workflows/cxx11-macos.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cxx11_win
name: cxx11

on:
push:
Expand All @@ -8,15 +8,17 @@ on:

jobs:
build:
name: macos-cxx11
name: macos
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- name: GoogleTest
run: brew install googletest
- uses: actions/checkout@v3
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_EXPERIMENTAL_BONDING=ON
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DUSE_CXX_STD=14
- name: build
run: cd _build && cmake --build ./
- name: test
Expand Down
33 changes: 24 additions & 9 deletions .github/workflows/cxx11-ubuntu.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,38 @@
name: cxx11_win
name: cxx11

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

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

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@v2
- 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_EXPERIMENTAL_BONDING=ON
cmake ../ -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -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 }}"
12 changes: 6 additions & 6 deletions .github/workflows/cxx11-win.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: cxx11_win
name: cxx11

on:
push:
Expand All @@ -9,16 +9,16 @@ on:
jobs:
build:

name: windows-cxx11
name: windows
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: configure
run: |
md _build && cd _build
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_EXPERIMENTAL_BONDING=ON
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_ENCRYPTION=OFF -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DUSE_CXX_STD=c++11
- name: build
run: cd _build && cmake --build ./ --config Release
run: cd _build && cmake --build ./ --config Release --verbose
- name: test
run: cd _build && ctest --extra-verbose -C Release
run: cd _build && ctest -E "TestIPv6.v6_calls_v4|TestConnectionTimeout.BlockingLoop" --extra-verbose -C Release
25 changes: 25 additions & 0 deletions .github/workflows/iOS.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: iOS

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

jobs:
build:
strategy:
matrix:
cxxstdsync: [OFF, ON]

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

steps:
- uses: actions/checkout@v3
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DENABLE_ENCRYPTION=OFF -DENABLE_STDCXX_SYNC=${{matrix.cxxstdsync}} -DENABLE_UNITTESTS=OFF -DENABLE_BONDING=ON --toolchain scripts/iOS.cmake
- name: build
run: cd _build && cmake --build ./
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"
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,13 @@ _*/
# Ignode Visual Studio Code temp folder
.vs/
.vscode/

# Ignore vcpkg submodule
vcpkg/

# LSP
compile_commands.json

# ignore files generated by clion and cmake
.idea/
cmake-build-debug/
2 changes: 1 addition & 1 deletion .lgtm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ extraction:
cpp:
configure:
command:
- cmake . -DENABLE_HEAVY_LOGGING=1 -DENABLE_EXPERIMENTAL_BONDING=1
- cmake . -DENABLE_HEAVY_LOGGING=1 -DENABLE_BONDING=1
Loading

0 comments on commit c3a7a3c

Please sign in to comment.