Skip to content

Commit

Permalink
Merged from upstream. Changed purpose
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki committed May 8, 2023
2 parents 5930f72 + 3cefede commit f83a8f4
Show file tree
Hide file tree
Showing 253 changed files with 31,852 additions and 19,164 deletions.
4 changes: 2 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ 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 "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 }
- 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
Expand Down
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 }}"
6 changes: 4 additions & 2 deletions .github/workflows/cxx11-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,13 @@ jobs:
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 ../ -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
6 changes: 3 additions & 3 deletions .github/workflows/cxx11-ubuntu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ on:
jobs:
build:
name: ubuntu
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: configure
run: |
mkdir _build && cd _build
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_UNITTESTS=ON -DENABLE_EXPERIMENTAL_BONDING=ON
cmake ../ -DENABLE_STDCXX_SYNC=ON -DENABLE_UNITTESTS=ON -DENABLE_BONDING=ON -DENABLE_TESTING=ON -DENABLE_EXAMPLES=ON
- name: build
run: cd _build && cmake --build ./
- name: test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/cxx11-win.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
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
- name: build
run: cd _build && cmake --build ./ --config Release
- name: test
run: cd _build && ctest -E "TestIPv6.v6_calls_v4" --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 ./
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ _*/
# Ignode Visual Studio Code temp folder
.vs/
.vscode/

# Ignore vcpkg submodule
vcpkg/

# LSP
compile_commands.json
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
34 changes: 23 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@ addons:
- cmake
- libssl-dev
- 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: true # TODO: this should be removed once this bug is fixed: https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296
update: false
packages:
- openssl

Expand All @@ -23,20 +25,24 @@ matrix:
- os: linux
env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_CODE_COVERAGE=ON -DENABLE_EXPERIMENTAL_BONDING=ON'
- BUILD_OPTS='-DENABLE_CODE_COVERAGE=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- RUN_SONARCUBE=1
- RUN_CODECOV=1
- env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_EXPERIMENTAL_BONDING=ON'
- BUILD_OPTS='-DENABLE_LOGGING=OFF -DUSE_ENCLIB=mbedtls -DENABLE_MONOTONIC_CLOCK=ON -DENABLE_BONDING=ON -DCMAKE_CXX_FLAGS="-Werror"'
- os: linux
env: BUILD_TYPE=Release
- os: osx
osx_image: xcode10.2
env: BUILD_TYPE=Debug
osx_image: xcode11.1
env:
- BUILD_TYPE=Debug
- BUILD_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
- os: osx
osx_image: xcode10.2
env: BUILD_TYPE=Release
osx_image: xcode11.1
env:
- BUILD_TYPE=Release
- BUILD_OPTS='-DCMAKE_CXX_FLAGS="-Werror"'
- os: linux
compiler: x86_64-w64-mingw32-g++
addons:
Expand All @@ -48,13 +54,13 @@ matrix:
- gcc-mingw-w64
- g++-mingw-w64-x86-64
before_script:
- git clone -b OpenSSL_1_1_1-stable https://github.com/openssl/openssl.git openssl
- git clone -b OpenSSL_1_1_1g https://github.com/openssl/openssl.git openssl
- cd openssl
- ./Configure --cross-compile-prefix=x86_64-w64-mingw32- mingw64
- make
- cd ..
env: BUILD_TYPE=Release

# Power jobs
- os: linux
arch: ppc64le
Expand All @@ -65,6 +71,7 @@ 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 @@ -87,10 +94,15 @@ script:
make -j$(nproc);
fi
- if [ "$TRAVIS_COMPILER" != "x86_64-w64-mingw32-g++" ]; then
./test-srt --gtest_filter="-TestMuxer.IPv4_and_IPv6:TestIPv6.v6_calls_v6*";
source ./scripts/collect-gcov.sh;
ulimit -c unlimited;
./test-srt --gtest_filter="-$TESTS_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
Expand Down
Loading

0 comments on commit f83a8f4

Please sign in to comment.