Skip to content

Commit

Permalink
Release 1.5.4 (#464)
Browse files Browse the repository at this point in the history
* Bump the runner images & fix the CI (#462)

* Bump the runner images

* Bump configure-aws-credentials to v4.

* Downgrade to clang 11

* Sanitzer options

* Go back to clang 14. Turn off warnings as error for libwebsockets

* ON -> 1

* Wno-error via CFLAGS

* Pass C_FLAGS directly

* Bump PIC version and small stack size test (#461)

* Bump PIC and small stack size test

* Bump configure-aws-creds to v4

* Move AWS credentials to after build

* Add permissions

* Cd build

* Use preinstalled toolchain

* Check for seg fault message

* Check exit code

* Update user agent from 1.5.3 to 1.5.4 (#463)
  • Loading branch information
sirknightj authored Nov 22, 2024
1 parent 0d23ba8 commit 5fb356e
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 28 deletions.
85 changes: 60 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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:
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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 }}
Expand All @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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 }}
Expand All @@ -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++
Expand All @@ -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++
Expand All @@ -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++
Expand All @@ -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
Expand All @@ -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
2 changes: 1 addition & 1 deletion CMake/Dependencies/libkvspic-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CMake/Dependencies/libwebsockets-CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 5fb356e

Please sign in to comment.