Bump PIC version and small stack size test #594
Workflow file for this run
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-12 | |
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@v1-node16 | |
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-12 | |
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@v1-node16 | |
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@v1-node16 | |
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@v1-node16 | |
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-12 | |
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@v1-node16 | |
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-12 | |
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@v1-node16 | |
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-20.04 | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
mkdir build && cd build | |
cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_COMMON_LWS=TRUE | |
make | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
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) | |
address-sanitizer: | |
runs-on: ubuntu-20.04 | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
CC: clang | |
CXX: clang++ | |
AWS_KVS_LOG_LEVEL: 2 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE | |
make | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
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 | |
undefined-behavior-sanitizer: | |
runs-on: ubuntu-20.04 | |
permissions: | |
id-token: write | |
contents: read | |
env: | |
CC: clang | |
CXX: clang++ | |
AWS_KVS_LOG_LEVEL: 2 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build repository | |
run: | | |
mkdir build && cd build | |
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 | |
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 | |
# memory-sanitizer: | |
# runs-on: ubuntu-20.04 | |
# permissions: | |
# id-token: write | |
# contents: read | |
# env: | |
# CC: clang | |
# CXX: clang++ | |
# AWS_KVS_LOG_LEVEL: 2 | |
# steps: | |
# - name: Clone repository | |
# uses: actions/checkout@v3 | |
# - name: Configure AWS Credentials | |
# uses: aws-actions/configure-aws-credentials@v1-node16 | |
# with: | |
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
# role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} | |
# aws-region: ${{ secrets.AWS_REGION }} | |
# - name: Build repository | |
# run: | | |
# mkdir build && cd build | |
# cmake .. -DBUILD_TEST=TRUE -DMEMORY_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE | |
# make | |
# ulimit -c unlimited -S | |
# timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure | |
# thread-sanitizer: | |
# runs-on: ubuntu-20.04 | |
# permissions: | |
# id-token: write | |
# contents: read | |
# env: | |
# CC: clang | |
# CXX: clang++ | |
# AWS_KVS_LOG_LEVEL: 2 | |
# steps: | |
# - name: Clone repository | |
# uses: actions/checkout@v3 | |
# - name: Configure AWS Credentials | |
# uses: aws-actions/configure-aws-credentials@v1-node16 | |
# with: | |
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }} | |
# role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} | |
# aws-region: ${{ secrets.AWS_REGION }} | |
# - name: Build repository | |
# run: | | |
# mkdir build && cd build | |
# cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE | |
# make | |
# - name: Run tests | |
# run: | | |
# cd build | |
# ulimit -c unlimited -S | |
# timeout --signal=SIGABRT 150m ./tst/producer_test --gtest_break_on_failure | |
ubuntu-gcc: | |
runs-on: ubuntu-20.04 | |
env: | |
AWS_KVS_LOG_LEVEL: 2 | |
CC: gcc | |
CXX: g++ | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
sudo apt clean && sudo apt update | |
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6' | |
- name: Build repository | |
run: | | |
mkdir build && cd build | |
cmake .. -DBUILD_TEST=TRUE | |
make | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
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 | |
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@v1-node16 | |
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-20.04 | |
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-20.04 | |
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-20.04 | |
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-20.04 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
- name: Build Repository | |
run: | | |
mkdir build && cd build | |
cmake .. -DBUILD_STATIC=ON | |
make | |
linux-thread-size-check: | |
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: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
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 -DBUILD_OPENSSL_PLATFORM=linux-aarch64 -DKVS_DEFAULT_STACK_SIZE=65536 | |
make -j$(nproc) | |
- name: Run tests with expected failure | |
run: | | |
set +e | |
./tst/producer_test --gtest_filter="ProducerClientBasicTest.*" | |
TEST_EXIT_CODE=$? | |
if [ $TEST_EXIT_CODE -ne 1 ]; then | |
echo "Unexpected exit code: $TEST_EXIT_CODE" | |
exit 1 | |
fi | |
echo "Test exited as expected with code 1." | |
shell: bash |