diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 78f811921..1f3af92c0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,7 @@ jobs: bash scripts/check-clang.sh mac-os-build-gcc: - runs-on: macos-12 + runs-on: macos-13 permissions: id-token: write contents: read @@ -43,7 +43,7 @@ jobs: cmake .. --trace -DBUILD_TEST=TRUE make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -55,7 +55,7 @@ jobs: ./tst/producer_test mac-os-build-clang: - runs-on: macos-12 + runs-on: macos-13 env: AWS_KVS_LOG_LEVEL: 2 permissions: @@ -72,7 +72,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -101,7 +101,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DCMAKE_C_COMPILER=$(brew --prefix llvm@15)/bin/clang -DCMAKE_CXX_COMPILER=$(brew --prefix llvm@15)/bin/clang++ make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -132,7 +132,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -144,7 +144,7 @@ jobs: ./tst/producer_test mac-os-build-gcc-local-openssl: - runs-on: macos-12 + runs-on: macos-13 permissions: id-token: write contents: read @@ -165,7 +165,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE -DLOCAL_OPENSSL_BUILD=ON make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -177,7 +177,7 @@ jobs: ./tst/producer_test mac-os-build-clang-local-openssl: - runs-on: macos-12 + runs-on: macos-13 env: AWS_KVS_LOG_LEVEL: 2 LDFLAGS: -L/usr/local/opt/openssl@3/lib @@ -196,7 +196,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DLOCAL_OPENSSL_BUILD=ON make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -208,7 +208,7 @@ jobs: ./tst/producer_test linux-gcc-code-coverage: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: AWS_KVS_LOG_LEVEL: 2 permissions: @@ -223,7 +223,7 @@ jobs: cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_COMMON_LWS=TRUE make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -241,7 +241,7 @@ jobs: bash <(curl -s https://codecov.io/bash) address-sanitizer: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: id-token: write contents: read @@ -258,7 +258,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -271,7 +271,7 @@ jobs: timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure undefined-behavior-sanitizer: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest permissions: id-token: write contents: read @@ -288,7 +288,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -313,7 +313,7 @@ jobs: # - name: Clone repository # uses: actions/checkout@v3 # - name: Configure AWS Credentials - # uses: aws-actions/configure-aws-credentials@v1-node16 + # uses: aws-actions/configure-aws-credentials@v4 # with: # role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} # role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -339,7 +339,7 @@ jobs: # - name: Clone repository # uses: actions/checkout@v3 # - name: Configure AWS Credentials - # uses: aws-actions/configure-aws-credentials@v1-node16 + # uses: aws-actions/configure-aws-credentials@v4 # with: # role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} # role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -356,7 +356,7 @@ jobs: # timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure ubuntu-gcc: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: AWS_KVS_LOG_LEVEL: 2 CC: gcc @@ -377,7 +377,7 @@ jobs: cmake .. -DBUILD_TEST=TRUE make - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -408,7 +408,7 @@ jobs: git config --system core.longpaths true .github/build_windows.bat - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v1-node16 + uses: aws-actions/configure-aws-credentials@v4 with: role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} @@ -420,7 +420,7 @@ jobs: & "D:\a\amazon-kinesis-video-streams-producer-c\amazon-kinesis-video-streams-producer-c\build\tst\producer_test.exe" --gtest_filter="-ProducerFunctionalityTest.pressure_on_buffer_duration_fail_new_connection_at_token_rotation" arm64-cross-compilation: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: CC: aarch64-linux-gnu-gcc CXX: aarch64-linux-gnu-g++ @@ -439,7 +439,7 @@ jobs: make file libcproducer.so linux-aarch64-cross-compilation: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: CC: aarch64-linux-gnu-gcc CXX: aarch64-linux-gnu-g++ @@ -458,7 +458,7 @@ jobs: make file libcproducer.so arm32-cross-compilation: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest env: CC: arm-linux-gnueabi-gcc CXX: arm-linux-gnueabi-g++ @@ -478,7 +478,7 @@ jobs: file libcproducer.so linux-build-gcc-static: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - name: Clone repository uses: actions/checkout@v3 @@ -487,3 +487,38 @@ jobs: mkdir build && cd build cmake .. -DBUILD_STATIC=ON make + + linux-thread-size-check: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - name: Clone repository + uses: actions/checkout@v3 + - name: Configure AWS Credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} + role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} + aws-region: ${{ secrets.AWS_REGION }} + role-duration-seconds: 10800 + - name: Build Repository + run: | + mkdir build && cd build + cmake .. -DBUILD_TEST=TRUE -DKVS_DEFAULT_STACK_SIZE=65536 + make -j$(nproc) + - name: Run tests with expected failure + run: | + set +e + cd build + ./tst/producer_test --gtest_filter="ProducerClientBasicTest.*" + TEST_EXIT_CODE=$? + + # 128 (abnormal exit) + 11 (segmentation fault) = 139 + if [ $TEST_EXIT_CODE -ne 139 ]; then + echo "Unexpected exit code: $TEST_EXIT_CODE" + exit 1 + fi + echo "Test exited as expected with code $TEST_EXIT_CODE." + shell: bash diff --git a/CMake/Dependencies/libkvspic-CMakeLists.txt b/CMake/Dependencies/libkvspic-CMakeLists.txt index 87a0fb728..847a4286e 100644 --- a/CMake/Dependencies/libkvspic-CMakeLists.txt +++ b/CMake/Dependencies/libkvspic-CMakeLists.txt @@ -7,7 +7,7 @@ include(ExternalProject) # clone repo only ExternalProject_Add(libkvspic-download GIT_REPOSITORY https://github.com/awslabs/amazon-kinesis-video-streams-pic.git - GIT_TAG v1.1.0 + GIT_TAG v1.2.0 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/kvspic-src" BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/kvspic-build" CMAKE_ARGS diff --git a/CMake/Dependencies/libwebsockets-CMakeLists.txt b/CMake/Dependencies/libwebsockets-CMakeLists.txt index 3ada49e4b..82bb46447 100644 --- a/CMake/Dependencies/libwebsockets-CMakeLists.txt +++ b/CMake/Dependencies/libwebsockets-CMakeLists.txt @@ -18,12 +18,16 @@ else() set(LWS_WITH_MBEDTLS OFF) endif() +# v3.2.3 of LWS does not support DISABLE_WERROR flag. Needed for Clang-14 due to build warnings +set(LWS_CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-error") + ExternalProject_Add(project_libwebsockets GIT_REPOSITORY https://github.com/warmcat/libwebsockets.git GIT_TAG v3.2.3 PREFIX ${CMAKE_CURRENT_BINARY_DIR}/build CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${OPEN_SRC_INSTALL_PREFIX} + -DCMAKE_C_FLAGS=${LWS_CMAKE_C_FLAGS} -DLWS_WITH_HTTP2=1 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DLWS_HAVE_HMAC_CTX_new=1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b8199bc6..37d684504 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,11 +1,11 @@ cmake_minimum_required(VERSION 3.6.3) set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake;${CMAKE_MODULE_PATH}") include(Utilities) -project(KinesisVideoProducerC VERSION 1.5.3 LANGUAGES C) +project(KinesisVideoProducerC VERSION 1.5.4 LANGUAGES C) set(KINESIS_VIDEO_PRODUCER_C_MAJOR_VERSION 1) set(KINESIS_VIDEO_PRODUCER_C_MINOR_VERSION 5) -set(KINESIS_VIDEO_PRODUCER_C_PATCH_VERSION 3) +set(KINESIS_VIDEO_PRODUCER_C_PATCH_VERSION 4) set(KINESIS_VIDEO_PRODUCER_C_VERSION ${KINESIS_VIDEO_PRODUCER_C_MAJOR_VERSION}.${KINESIS_VIDEO_PRODUCER_C_MINOR_VERSION}.${KINESIS_VIDEO_PRODUCER_C_PATCH_VERSION}) include(GNUInstallDirs)