Add debug log line for global curl initialization #640
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Producer C SDK CI | |
on: | |
push: | |
branches: | |
- develop | |
- master | |
pull_request: | |
branches: | |
- develop | |
- master | |
jobs: | |
clang-format-check: | |
runs-on: macos-latest | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install clang-format | |
run: | | |
brew install clang-format | |
clang-format --version | |
- name: Run clang format check | |
run: | | |
bash scripts/check-clang.sh | |
mac-os-build-gcc: | |
runs-on: macos-13 | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
CC: gcc-14 | |
CXX: g++-14 | |
AWS_KVS_LOG_LEVEL: 2 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
brew install pkgconfig | |
brew unlink openssl # it seems the libcurl is trying to access this openssl despite explicitly setting it to our build | |
mkdir build && cd build | |
cmake .. --trace -DBUILD_TEST=TRUE | |
make | |
- 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: Run tests | |
run: | | |
cd build | |
./tst/producer_test | |
mac-os-build-clang: | |
runs-on: macos-13 | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
brew install pkgconfig | |
brew unlink openssl # it seems the libcurl is trying to access this openssl despite explicitly setting it to our build | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE | |
make | |
- 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: Run tests | |
run: | | |
cd build | |
./tst/producer_test | |
mac-os-m1-build-clang: | |
runs-on: macos-latest | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
brew install pkgconfig | |
brew unlink openssl # it seems the libcurl is trying to access this openssl despite explicitly setting it to our build | |
mkdir build && cd build | |
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@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: Run tests | |
run: | | |
cd build | |
./tst/producer_test | |
mac-os-m1-build-gcc: | |
runs-on: macos-latest | |
env: | |
CC: gcc-13 | |
CXX: g++-13 | |
AWS_KVS_LOG_LEVEL: 2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
brew install pkgconfig | |
brew unlink openssl # it seems the libcurl is trying to access this openssl despite explicitly setting it to our build | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE | |
make | |
- 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: Run tests | |
run: | | |
cd build | |
./tst/producer_test | |
mac-os-build-gcc-local-openssl: | |
runs-on: macos-13 | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
CC: gcc-14 | |
CXX: g++-14 | |
AWS_KVS_LOG_LEVEL: 2 | |
LDFLAGS: -L/usr/local/opt/openssl@3/lib | |
CPPFLAGS: -I/usr/local/opt/openssl@3/include | |
OPENSSL_ROOT_DIR: /usr/local/opt/openssl@3/ | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
brew info openssl | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DLOCAL_OPENSSL_BUILD=ON | |
make | |
- 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: Run tests | |
run: | | |
cd build | |
./tst/producer_test | |
mac-os-build-clang-local-openssl: | |
runs-on: macos-13 | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
LDFLAGS: -L/usr/local/opt/openssl@3/lib | |
CPPFLAGS: -I/usr/local/opt/openssl@3/include | |
OPENSSL_ROOT_DIR: /usr/local/opt/openssl@3/ | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
brew info openssl | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DLOCAL_OPENSSL_BUILD=ON | |
make | |
- 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: Run tests | |
run: | | |
cd build | |
./tst/producer_test | |
linux-gcc-code-coverage: | |
runs-on: ubuntu-latest | |
container: | |
image: public.ecr.aws/ubuntu/ubuntu:20.04_stable | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
DEBIAN_FRONTEND: noninteractive | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install dependenices | |
run: | | |
apt-get update | |
apt-get install -y git build-essential automake pkg-config cmake gcovr ggcov lcov | |
- name: Build repository | |
run: | | |
mkdir build && cd build | |
cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_COMMON_LWS=TRUE | |
make -j$(nproc) | |
- 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: Run tests | |
run: | | |
cd build | |
ulimit -c unlimited -S | |
timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure | |
- name: Code coverage | |
run: | | |
cd build | |
for test_file in $(find cproducer.dir kvsCommonCurl.dir kvsCommonLws.dir -name '*.gcno'); do gcov $test_file; done | |
bash <(curl -s https://codecov.io/bash) | |
ubuntu-gcc: | |
runs-on: ubuntu-latest | |
container: | |
image: public.ecr.aws/ubuntu/ubuntu:20.04_stable | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
CC: gcc | |
CXX: g++ | |
DEBIAN_FRONTEND: noninteractive | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y git build-essential automake pkg-config cmake | |
- name: Build repository | |
run: | | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=ON | |
make -j$(nproc) | |
- 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: Run tests | |
run: | | |
cd build | |
timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure | |
windows-msvc: | |
runs-on: windows-2022 | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
choco install nasm strawberryperl pkgconfiglite | |
- name: Build repository | |
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-producer-c\amazon-kinesis-video-streams-producer-c\open-source\lib;D:\a\amazon-kinesis-video-streams-producer-c\amazon-kinesis-video-streams-producer-c\open-source\bin' | |
git config --system core.longpaths true | |
.github/build_windows.bat | |
- 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: Run tests | |
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-producer-c\amazon-kinesis-video-streams-producer-c\open-source\lib;D:\a\amazon-kinesis-video-streams-producer-c\amazon-kinesis-video-streams-producer-c\open-source\bin' | |
& "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-latest | |
env: | |
CC: aarch64-linux-gnu-gcc | |
CXX: aarch64-linux-gnu-g++ | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt clean && sudo apt update | |
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build Repository | |
run: | | |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic64 | |
make | |
file libcproducer.so | |
linux-aarch64-cross-compilation: | |
runs-on: ubuntu-latest | |
env: | |
CC: aarch64-linux-gnu-gcc | |
CXX: aarch64-linux-gnu-g++ | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt clean && sudo apt update | |
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build Repository | |
run: | | |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DBUILD_OPENSSL_PLATFORM=linux-aarch64 | |
make | |
file libcproducer.so | |
arm32-cross-compilation: | |
runs-on: ubuntu-latest | |
env: | |
CC: arm-linux-gnueabi-gcc | |
CXX: arm-linux-gnueabi-g++ | |
steps: | |
- name: Install dependencies | |
run: | | |
sudo apt clean && sudo apt update | |
sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build Repository | |
run: | | |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 | |
make | |
file libcproducer.so | |
linux-build-gcc-static: | |
runs-on: ubuntu-latest | |
container: | |
image: public.ecr.aws/ubuntu/ubuntu:20.04_stable | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
AWS_KVS_LOG_LEVEL: 2 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y git cmake build-essential automake pkg-config | |
- name: Build Repository | |
run: | | |
mkdir build && cd build | |
cmake .. -DBUILD_STATIC=ON | |
make -j$(nproc) | |
linux-thread-size-check: | |
runs-on: ubuntu-latest | |
container: | |
image: public.ecr.aws/ubuntu/ubuntu:20.04_stable | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
AWS_KVS_LOG_LEVEL: 2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
apt-get update | |
apt-get install -y git cmake build-essential automake pkg-config | |
- 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 |