diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 628cf96b09..26d3db2330 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -507,156 +507,156 @@ jobs: - name: Install dependencies run: | sudo apt clean && sudo apt update - sudo apt-get -y install libcurl4-openssl-dev - openssl version - - name: Build repository - run: | - # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. - sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' - mkdir build && cd build - cmake .. -DBUILD_TEST=TRUE - make - - name: Run tests - run: | - cd build - timeout --signal=SIGABRT 60m ./tst/webrtc_client_test - ubuntu-os-build-openssl-old: - runs-on: ubuntu-latest - env: - AWS_KVS_LOG_LEVEL: 2 - permissions: - id-token: write - contents: read - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - aws-region: ${{ secrets.AWS_REGION }} - - name: Install dependencies - run: | - sudo apt clean && sudo apt update - sudo apt-get -y install libcurl4-openssl-dev +# sudo apt-get -y install libcurl4-openssl-dev openssl version - name: Build repository run: | # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' mkdir build && cd build - cmake .. -DBUILD_TEST=TRUE -DBUILD_OLD_OPENSSL_VERSION=ON -DENABLE_AWS_SDK_IN_TESTS=OFF + cmake .. -DBUILD_TEST=TRUE -DENABLE_AWS_SDK_IN_TESTS=OFF make - name: Run tests run: | cd build timeout --signal=SIGABRT 60m ./tst/webrtc_client_test - windows-msvc-openssl: - runs-on: windows-2022 - env: - AWS_KVS_LOG_LEVEL: 1 - permissions: - id-token: write - contents: read - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - aws-region: ${{ secrets.AWS_REGION }} - - name: Move cloned repo - shell: powershell - run: | - mkdir C:\webrtc - Move-Item -Path "D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\*" -Destination "C:\webrtc" - - name: Install dependencies - shell: powershell - run: | - choco install gstreamer --version=1.16.2 - choco install gstreamer-devel --version=1.16.2 - curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip - mkdir C:\tools\pthreads-w32-2-9-1-release\ - Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release - # - name: Build libwebsockets from source - # shell: powershell - # run: | - # $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\include' - # git config --system core.longpaths true - # cd C:\tools\ - # git clone https://github.com/warmcat/libwebsockets.git - # git checkout v4.2.2 - # cd libwebsockets - # mkdir build - # cd build - # cmake .. -DLWS_HAVE_PTHREAD_H=1 -DLWS_EXT_PTHREAD_INCLUDE_DIR="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\include" -DLWS_EXT_PTHREAD_LIBRARIES="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\lib\\x64\\libpthreadGC2.a" -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_OPENSSL_INCLUDE_DIRS="C:\\Program Files\\OpenSSL\\include" -DLWS_OPENSSL_LIBRARIES="C:\\Program Files\\OpenSSL\\lib\\libssl.lib;C:\\Program Files\\OpenSSL\\lib\\libcrypto.lib" - # cmake --build . --config DEBUG - - name: Build repository - shell: powershell - run: | - openssl version - cd C:\webrtc - git config --system core.longpaths true - .github\build_windows_openssl.bat - - name: Run tests - shell: powershell - run: | - $env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build' - & "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:DtlsApiTest*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" - windows-msvc-openssl-old: - runs-on: windows-2022 - env: - AWS_KVS_LOG_LEVEL: 1 - permissions: - id-token: write - contents: read - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v2 - with: - role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} - aws-region: ${{ secrets.AWS_REGION }} - - name: Move cloned repo - shell: powershell - run: | - mkdir C:\webrtc - Move-Item -Path "D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\*" -Destination "C:\webrtc" - - name: Install dependencies - shell: powershell - run: | - choco install gstreamer --version=1.16.2 - choco install gstreamer-devel --version=1.16.2 - curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip - mkdir C:\tools\pthreads-w32-2-9-1-release\ - Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release - # - name: Build libwebsockets from source - # shell: powershell - # run: | - # $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\include' - # git config --system core.longpaths true - # cd C:\tools\ - # git clone https://github.com/warmcat/libwebsockets.git - # git checkout v4.2.2 - # cd libwebsockets - # mkdir build - # cd build - # cmake .. -DLWS_HAVE_PTHREAD_H=1 -DLWS_EXT_PTHREAD_INCLUDE_DIR="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\include" -DLWS_EXT_PTHREAD_LIBRARIES="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\lib\\x64\\libpthreadGC2.a" -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_OPENSSL_INCLUDE_DIRS="C:\\Program Files\\OpenSSL\\include" -DLWS_OPENSSL_LIBRARIES="C:\\Program Files\\OpenSSL\\lib\\libssl.lib;C:\\Program Files\\OpenSSL\\lib\\libcrypto.lib" - # cmake --build . --config DEBUG - - name: Build repository - shell: powershell - run: | - openssl version - cd C:\webrtc - git config --system core.longpaths true - .github\build_windows_openssl_old.bat - - name: Run tests - shell: powershell - run: | - $env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build' - & "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:DtlsApiTest*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" +# ubuntu-os-build-openssl-old: +# runs-on: ubuntu-latest +# env: +# AWS_KVS_LOG_LEVEL: 2 +# permissions: +# id-token: write +# contents: read +# steps: +# - name: Clone repository +# uses: actions/checkout@v3 +# - name: Configure AWS Credentials +# uses: aws-actions/configure-aws-credentials@v2 +# with: +# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} +# aws-region: ${{ secrets.AWS_REGION }} +# - name: Install dependencies +# run: | +# sudo apt clean && sudo apt update +# sudo apt-get -y install libcurl4-openssl-dev +# openssl version +# - name: Build repository +# run: | +# # TODO: Remove the following line. This is only a workaround for enabling IPv6, https://github.com/travis-ci/travis-ci/issues/8891. +# sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' +# mkdir build && cd build +# cmake .. -DBUILD_TEST=TRUE -DBUILD_OLD_OPENSSL_VERSION=ON -DENABLE_AWS_SDK_IN_TESTS=OFF +# make +# - name: Run tests +# run: | +# cd build +# timeout --signal=SIGABRT 60m ./tst/webrtc_client_test +# windows-msvc-openssl: +# runs-on: windows-2022 +# env: +# AWS_KVS_LOG_LEVEL: 1 +# permissions: +# id-token: write +# contents: read +# steps: +# - name: Clone repository +# uses: actions/checkout@v3 +# - name: Configure AWS Credentials +# uses: aws-actions/configure-aws-credentials@v2 +# with: +# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} +# aws-region: ${{ secrets.AWS_REGION }} +# - name: Move cloned repo +# shell: powershell +# run: | +# mkdir C:\webrtc +# Move-Item -Path "D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\*" -Destination "C:\webrtc" +# - name: Install dependencies +# shell: powershell +# run: | +# choco install gstreamer --version=1.16.2 +# choco install gstreamer-devel --version=1.16.2 +# curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip +# mkdir C:\tools\pthreads-w32-2-9-1-release\ +# Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release +# # - name: Build libwebsockets from source +# # shell: powershell +# # run: | +# # $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\include' +# # git config --system core.longpaths true +# # cd C:\tools\ +# # git clone https://github.com/warmcat/libwebsockets.git +# # git checkout v4.2.2 +# # cd libwebsockets +# # mkdir build +# # cd build +# # cmake .. -DLWS_HAVE_PTHREAD_H=1 -DLWS_EXT_PTHREAD_INCLUDE_DIR="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\include" -DLWS_EXT_PTHREAD_LIBRARIES="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\lib\\x64\\libpthreadGC2.a" -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_OPENSSL_INCLUDE_DIRS="C:\\Program Files\\OpenSSL\\include" -DLWS_OPENSSL_LIBRARIES="C:\\Program Files\\OpenSSL\\lib\\libssl.lib;C:\\Program Files\\OpenSSL\\lib\\libcrypto.lib" +# # cmake --build . --config DEBUG +# - name: Build repository +# shell: powershell +# run: | +# openssl version +# cd C:\webrtc +# git config --system core.longpaths true +# .github\build_windows_openssl.bat +# - name: Run tests +# shell: powershell +# run: | +# $env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build' +# & "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:DtlsApiTest*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" +# windows-msvc-openssl-old: +# runs-on: windows-2022 +# env: +# AWS_KVS_LOG_LEVEL: 1 +# permissions: +# id-token: write +# contents: read +# steps: +# - name: Clone repository +# uses: actions/checkout@v3 +# - name: Configure AWS Credentials +# uses: aws-actions/configure-aws-credentials@v2 +# with: +# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} +# aws-region: ${{ secrets.AWS_REGION }} +# - name: Move cloned repo +# shell: powershell +# run: | +# mkdir C:\webrtc +# Move-Item -Path "D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\*" -Destination "C:\webrtc" +# - name: Install dependencies +# shell: powershell +# run: | +# choco install gstreamer --version=1.16.2 +# choco install gstreamer-devel --version=1.16.2 +# curl.exe -o C:\tools\pthreads-w32-2-9-1-release.zip ftp://sourceware.org/pub/pthreads-win32/pthreads-w32-2-9-1-release.zip +# mkdir C:\tools\pthreads-w32-2-9-1-release\ +# Expand-Archive -Path C:\tools\pthreads-w32-2-9-1-release.zip -DestinationPath C:\tools\pthreads-w32-2-9-1-release +# # - name: Build libwebsockets from source +# # shell: powershell +# # run: | +# # $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\a\amazon-kinesis-video-streams-webrtc-sdk-c\amazon-kinesis-video-streams-webrtc-sdk-c\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\lib\x64;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\include' +# # git config --system core.longpaths true +# # cd C:\tools\ +# # git clone https://github.com/warmcat/libwebsockets.git +# # git checkout v4.2.2 +# # cd libwebsockets +# # mkdir build +# # cd build +# # cmake .. -DLWS_HAVE_PTHREAD_H=1 -DLWS_EXT_PTHREAD_INCLUDE_DIR="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\include" -DLWS_EXT_PTHREAD_LIBRARIES="C:\\tools\\pthreads-w32-2-9-1-release\\Pre-built.2\\lib\\x64\\libpthreadGC2.a" -DLWS_WITH_MINIMAL_EXAMPLES=1 -DLWS_OPENSSL_INCLUDE_DIRS="C:\\Program Files\\OpenSSL\\include" -DLWS_OPENSSL_LIBRARIES="C:\\Program Files\\OpenSSL\\lib\\libssl.lib;C:\\Program Files\\OpenSSL\\lib\\libcrypto.lib" +# # cmake --build . --config DEBUG +# - name: Build repository +# shell: powershell +# run: | +# openssl version +# cd C:\webrtc +# git config --system core.longpaths true +# .github\build_windows_openssl_old.bat +# - name: Run tests +# shell: powershell +# run: | +# $env:Path += ';C:\webrtc\open-source\bin;C:\tools\pthreads-w32-2-9-1-release\Pre-built.2\dll\x64;C:\webrtc\build' +# & "C:\webrtc\build\tst\webrtc_client_test.exe" --gtest_filter="-DataChannelFunctionalityTest.*:DtlsApiTest*:IceApiTest.*:IceFunctionalityTest.*:PeerConnectionFunctionalityTest.*:SignalingApiFunctionalityTest.*:TurnConnectionFunctionalityTest.*:RtpFunctionalityTest.marshallUnmarshallH264Data:RtpFunctionalityTest.packingUnpackingVerifySameH264Frame:RtcpFunctionalityTest.onRtcpPacketCompound:RtcpFunctionalityTest.twcc3" # # windows-msvc-mbedtls: # # runs-on: windows-2022 diff --git a/CMakeLists.txt b/CMakeLists.txt index f943c26a08..a8d2d18ca9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -177,10 +177,9 @@ if(BUILD_DEPENDENCIES) -DOPENSSL_DIR=${OPEN_SRC_INSTALL_PREFIX} -DUSE_OPENSSL=${USE_OPENSSL} -DUSE_MBEDTLS=${USE_MBEDTLS} - -DLWS_OPENSSL_LIBRARIES=${OPEN_SRC_INSTALL_PREFIX} -DLWS_OPENSSL_CRYPTO_LIBRARY=${OPENSSL_CRYPTO_LIBRARY} -DLWS_OPENSSL_SSL_LIBRARY=${OPENSSL_SSL_LIBRARY} - -DLWS_OPENSSL_INCLUDE_DIRS=${OPENSSL_INCLUDE_DIRS} + -DLWS_OPENSSL_INCLUDE_DIRS=${OPENSSL_INCLUDE_DIR} -DCMAKE_C_FLAGS=${CMAKE_C_FLAGS}) endif() build_dependency(websockets ${BUILD_ARGS})