From fd1514b7cfdd8a12b69b00ac859d83e3d3ad64bf Mon Sep 17 00:00:00 2001 From: sirknightj Date: Mon, 3 Feb 2025 22:07:05 -0800 Subject: [PATCH] Add windows debug dump dir check --- .github/workflows/ci.yml | 832 +++++++++++++------------- .github/workflows/codeql-analysis.yml | 128 ++-- .github/workflows/kvssink.yml | 164 +++-- .github/workflows/raspberry-pi.yaml | 186 +++--- kvs_log_configuration | 2 +- 5 files changed, 687 insertions(+), 625 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4f0a62f..ef2f8740 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,416 +1,416 @@ -name: Producer CPP SDK CI - -on: - push: - branches: - - develop - - master - pull_request: - branches: - - develop - - master - -jobs: - 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: Install dependencies - run: | - brew install pkg-config openssl cmake gstreamer log4cplus - brew unlink openssl - - name: Build repository - run: | - mkdir build && cd build - sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DCMAKE_INSTALL_PREFIX=.' - make - make install - - 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/producerTest - - mac-os-build-gcc: - runs-on: macos-13 - permissions: - id-token: write - contents: read - env: - CC: gcc - CXX: g++ - AWS_KVS_LOG_LEVEL: 2 - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Install dependencies - run: | - brew install pkg-config openssl cmake gstreamer log4cplus - brew unlink openssl - - name: Build repository - run: | - mkdir build && cd build - cmake .. -DBUILD_TEST=TRUE -DCMAKE_INSTALL_PREFIX=. - make - make install - - 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/producerTest - - 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: Install dependencies - run: | - sudo apt clean && sudo apt update - sudo apt install -y libunwind-dev - sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - name: Build repository - run: | - mkdir build && cd build - cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. - make - make install - - 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 60m ./tst/producerTest - - name: Code coverage - run: | - cd build - for test_file in $(find CMakeFiles/KinesisVideoProducer.dir gstkvssink.dir KinesisVideoProducerJNI.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: Install dependencies - run: | - sudo apt clean && sudo apt update - sudo apt install -y libunwind-dev - sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - name: Build repository - run: | - mkdir build && cd build - cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. - make - make install - - 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 60m ./tst/producerTest - - 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: Install dependencies - run: | - sudo apt clean && sudo apt update - sudo apt install -y libunwind-dev - sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - name: Build repository - run: | - mkdir build && cd build - cmake .. -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. - make - make install - - 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 60m ./tst/producerTest - - # 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/producerTest --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: | - # sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - # mkdir build && cd build - # cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE - # make - # ulimit -c unlimited -S - # timeout --signal=SIGABRT 20m ./tst/producerTest - - 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 apt install -y libunwind-dev - sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - name: Build repository - run: | - mkdir build && cd build - cmake .. -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. - make - make install - - 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 60m ./tst/producerTest - - windows-msvc: - runs-on: windows-2022 - env: - AWS_KVS_LOG_LEVEL: 7 - permissions: - id-token: write - contents: read - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Move repository - run: | - mkdir C:\producer - Move-Item -Path "D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\*" -Destination "D:\producer" - - name: Install dependencies - run: | - choco install nasm strawberryperl - choco install gstreamer --version=1.22.8 - choco install gstreamer-devel --version=1.22.8 - - name: Build repository - run: | - $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin' - git config --system core.longpaths true - cd D:\producer - dir - .\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:\producer\open-source\local\lib;D:\producer\open-source\local\bin' - & "D:\producer\build\tst\producerTest.exe" - - 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 install -y libunwind-dev - sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu - sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - 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 -DBUILD_LOG4CPLUS_HOST=arm-linux -DCMAKE_INSTALL_PREFIX=. - make - make install - file libKinesisVideoProducer.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 install -y libunwind-dev - sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu - sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - 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 -DBUILD_LOG4CPLUS_HOST=arm-linux -DCMAKE_INSTALL_PREFIX=. - make - make install - file libKinesisVideoProducer.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 install -y libunwind-dev - sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi - sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - 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 -DBUILD_LOG4CPLUS_HOST=arm-linux -DCMAKE_INSTALL_PREFIX=. - make - make install - file libKinesisVideoProducer.so - - linux-build-gcc-static: - runs-on: ubuntu-20.04 - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Install dependencies - run: | - sudo apt clean && sudo apt update - sudo apt install -y libunwind-dev - sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - name: Build repository - run: | - mkdir build && cd build - cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=ON - make - - linux-build-gcc-shared: - runs-on: ubuntu-20.04 - steps: - - name: Clone repository - uses: actions/checkout@v3 - - name: Install dependencies - run: | - sudo apt clean && sudo apt update - sudo apt install -y libunwind-dev - sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools - - name: Build repository - run: | - mkdir build && cd build - cmake .. -DBUILD_DEPENDENCIES=OFF -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=OFF -DBUILD_SHARED_LIBS=ON - make +#name: Producer CPP SDK CI +# +#on: +# push: +# branches: +# - develop +# - master +# pull_request: +# branches: +# - develop +# - master +# +#jobs: +# 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: Install dependencies +# run: | +# brew install pkg-config openssl cmake gstreamer log4cplus +# brew unlink openssl +# - name: Build repository +# run: | +# mkdir build && cd build +# sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE -DCMAKE_INSTALL_PREFIX=.' +# make +# make install +# - 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/producerTest +# +# mac-os-build-gcc: +# runs-on: macos-13 +# permissions: +# id-token: write +# contents: read +# env: +# CC: gcc +# CXX: g++ +# AWS_KVS_LOG_LEVEL: 2 +# steps: +# - name: Clone repository +# uses: actions/checkout@v3 +# - name: Install dependencies +# run: | +# brew install pkg-config openssl cmake gstreamer log4cplus +# brew unlink openssl +# - name: Build repository +# run: | +# mkdir build && cd build +# cmake .. -DBUILD_TEST=TRUE -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# - 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/producerTest +# +# 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: Install dependencies +# run: | +# sudo apt clean && sudo apt update +# sudo apt install -y libunwind-dev +# sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - name: Build repository +# run: | +# mkdir build && cd build +# cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# - 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 60m ./tst/producerTest +# - name: Code coverage +# run: | +# cd build +# for test_file in $(find CMakeFiles/KinesisVideoProducer.dir gstkvssink.dir KinesisVideoProducerJNI.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: Install dependencies +# run: | +# sudo apt clean && sudo apt update +# sudo apt install -y libunwind-dev +# sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - name: Build repository +# run: | +# mkdir build && cd build +# cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# - 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 60m ./tst/producerTest +# +# 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: Install dependencies +# run: | +# sudo apt clean && sudo apt update +# sudo apt install -y libunwind-dev +# sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - name: Build repository +# run: | +# mkdir build && cd build +# cmake .. -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# - 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 60m ./tst/producerTest +# +# # 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/producerTest --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: | +# # sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# # mkdir build && cd build +# # cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE +# # make +# # ulimit -c unlimited -S +# # timeout --signal=SIGABRT 20m ./tst/producerTest +# +# 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 apt install -y libunwind-dev +# sudo apt-get install -y libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - name: Build repository +# run: | +# mkdir build && cd build +# cmake .. -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# - 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 60m ./tst/producerTest +# +# windows-msvc: +# runs-on: windows-2022 +# env: +# AWS_KVS_LOG_LEVEL: 7 +# permissions: +# id-token: write +# contents: read +# steps: +# - name: Clone repository +# uses: actions/checkout@v3 +# - name: Move repository +# run: | +# mkdir C:\producer +# Move-Item -Path "D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\*" -Destination "D:\producer" +# - name: Install dependencies +# run: | +# choco install nasm strawberryperl +# choco install gstreamer --version=1.22.8 +# choco install gstreamer-devel --version=1.22.8 +# - name: Build repository +# run: | +# $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin' +# git config --system core.longpaths true +# cd D:\producer +# dir +# .\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:\producer\open-source\local\lib;D:\producer\open-source\local\bin' +# & "D:\producer\build\tst\producerTest.exe" +# +# 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 install -y libunwind-dev +# sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu +# sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - 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 -DBUILD_LOG4CPLUS_HOST=arm-linux -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# file libKinesisVideoProducer.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 install -y libunwind-dev +# sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu +# sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - 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 -DBUILD_LOG4CPLUS_HOST=arm-linux -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# file libKinesisVideoProducer.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 install -y libunwind-dev +# sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi +# sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - 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 -DBUILD_LOG4CPLUS_HOST=arm-linux -DCMAKE_INSTALL_PREFIX=. +# make +# make install +# file libKinesisVideoProducer.so +# +# linux-build-gcc-static: +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone repository +# uses: actions/checkout@v3 +# - name: Install dependencies +# run: | +# sudo apt clean && sudo apt update +# sudo apt install -y libunwind-dev +# sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - name: Build repository +# run: | +# mkdir build && cd build +# cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=ON +# make +# +# linux-build-gcc-shared: +# runs-on: ubuntu-20.04 +# steps: +# - name: Clone repository +# uses: actions/checkout@v3 +# - name: Install dependencies +# run: | +# sudo apt clean && sudo apt update +# sudo apt install -y libunwind-dev +# sudo apt-get install libssl-dev libcurl4-openssl-dev liblog4cplus-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools +# - name: Build repository +# run: | +# mkdir build && cd build +# cmake .. -DBUILD_DEPENDENCIES=OFF -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_STATIC=OFF -DBUILD_SHARED_LIBS=ON +# make diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f2fa5f73..d77606ab 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -1,67 +1,67 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. +## For most projects, this workflow file will not need changing; you simply need +## to commit it to your repository. +## +## You may wish to alter this file to override the set of languages analyzed, +## or to provide custom queries or build logic. +## +## ******** NOTE ******** +## We have attempted to detect the languages in your repository. Please check +## the `language` matrix defined below to confirm you have the correct set of +## supported CodeQL languages. +## +#name: "CodeQL" # -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. +#on: +# push: +# branches: [ master, develop ] +# pull_request: +# # The branches below must be a subset of the branches above +# branches: [ master, develop ] +# schedule: +# - cron: '41 13 * * 2' # -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. +#jobs: +# analyze: +# name: Analyze +# runs-on: ubuntu-latest # -name: "CodeQL" - -on: - push: - branches: [ master, develop ] - pull_request: - # The branches below must be a subset of the branches above - branches: [ master, develop ] - schedule: - - cron: '41 13 * * 2' - -jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - language: [ 'cpp' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 +# strategy: +# fail-fast: false +# matrix: +# language: [ 'cpp' ] +# # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] +# # Learn more: +# # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed +# +# steps: +# - name: Checkout repository +# uses: actions/checkout@v3 +# +# # Initializes the CodeQL tools for scanning. +# - name: Initialize CodeQL +# uses: github/codeql-action/init@v2 +# with: +# languages: ${{ matrix.language }} +# # If you wish to specify custom queries, you can do so here or in a config file. +# # By default, queries listed here will override any specified in a config file. +# # Prefix the list here with "+" to use these queries and those in the config file. +# # queries: ./path/to/local/query, your-org/your-repo/queries@main +# +# # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). +# # If this step fails, then you should remove it and run the build manually (see below) +# - name: Autobuild +# uses: github/codeql-action/autobuild@v2 +# +# # ℹī¸ Command-line programs to run using the OS shell. +# # 📚 https://git.io/JvXDl +# +# # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines +# # and modify them (or add more) to build your code if your project +# # uses a compiled language +# +# #- run: | +# # make bootstrap +# # make release +# +# - name: Perform CodeQL Analysis +# uses: github/codeql-action/analyze@v2 diff --git a/.github/workflows/kvssink.yml b/.github/workflows/kvssink.yml index 017f2f51..6bbfc725 100644 --- a/.github/workflows/kvssink.yml +++ b/.github/workflows/kvssink.yml @@ -11,48 +11,103 @@ on: - master jobs: - unit-tests: - runs-on: ubuntu-latest - timeout-minutes: 30 +# unit-tests: +# runs-on: ubuntu-latest +# timeout-minutes: 30 +# permissions: +# id-token: write +# contents: read +# strategy: +# matrix: +# include: +# - os: Ubuntu 22.04 +# image: public.ecr.aws/ubuntu/ubuntu:22.04_stable +# - os: Ubuntu 20.04 +# image: public.ecr.aws/ubuntu/ubuntu:20.04_stable +# fail-fast: false +# +# name: kvssink unit tests on ${{ matrix.os }} +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# +# - name: Install dependencies +# run: | +# sudo apt-get update +# sudo apt-get install -y automake build-essential cmake git \ +# gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad \ +# gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \ +# gstreamer1.0-tools \ +# libcurl4-openssl-dev libgstreamer1.0-dev \ +# libgstreamer-plugins-base1.0-dev liblog4cplus-dev \ +# libssl-dev pkg-config valgrind +# +# - name: Setup build directory +# run: | +# mkdir -p build +# cd build +# +# - name: Build kvssink unit tests +# working-directory: ./build +# run: | +# cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug -DALIGNED_MEMORY_MODEL=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 the unit tests +# working-directory: ./build +# run: | +# export GST_PLUGIN_PATH=`pwd` +# GST_DEBUG=4 ./tst/gstkvsplugintest + +# - name: Run the unit tests with valgrind +# working-directory: ./build +# run: | +# export GST_PLUGIN_PATH=`pwd` +# valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \ +# --verbose --log-file=valgrind-out.txt ./tst/gstkvsplugintest +# +# if grep -q "All heap blocks were freed -- no leaks are possible" valgrind-out.txt; then +# echo "No memory leaks detected" +# else +# echo "Memory leaks detected. Review the valgrind output:" +# cat valgrind-out.txt +# exit 1 +# fi + + windows-debug-dump-dir: + runs-on: windows-2022 + env: + AWS_KVS_LOG_LEVEL: 1 permissions: id-token: write contents: read - strategy: - matrix: - include: - - os: Ubuntu 22.04 - image: public.ecr.aws/ubuntu/ubuntu:22.04_stable - - os: Ubuntu 20.04 - image: public.ecr.aws/ubuntu/ubuntu:20.04_stable - fail-fast: false - - name: kvssink unit tests on ${{ matrix.os }} steps: - - name: Checkout repository + - name: Clone repository uses: actions/checkout@v4 - - - name: Install dependencies + - name: Move repository run: | - sudo apt-get update - sudo apt-get install -y automake build-essential cmake git \ - gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad \ - gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \ - gstreamer1.0-tools \ - libcurl4-openssl-dev libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev liblog4cplus-dev \ - libssl-dev pkg-config valgrind - - - name: Setup build directory + mkdir D:\producer + Move-Item -Path "D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\*" -Destination "D:\producer" + - name: Install dependencies run: | - mkdir -p build - cd build - - - name: Build kvssink unit tests - working-directory: ./build + choco install nasm strawberryperl mkvtoolnix + choco install gstreamer --version=1.22.8 + choco install gstreamer-devel --version=1.22.8 + - name: Build repository run: | - cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_TEST=ON -DCMAKE_BUILD_TYPE=Debug -DALIGNED_MEMORY_MODEL=ON - make -j$(nproc) - + $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin' + git config --system core.longpaths true + cd D:\producer + dir + .github\build_windows.bat - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -60,24 +115,31 @@ jobs: role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }} aws-region: ${{ secrets.AWS_REGION }} role-duration-seconds: 10800 - - - name: Run the unit tests - working-directory: ./build + - name: Run kvssink with dump dir + env: + GST_PLUGIN_PATH: D:\producer\build\ + KVS_DEBUG_DUMP_DATA_FILE_DIR: D:\producer\build\debug_output + working-directory: D:\producer\build\ run: | - export GST_PLUGIN_PATH=`pwd` - GST_DEBUG=4 ./tst/gstkvsplugintest - - - name: Run the unit tests with valgrind - working-directory: ./build + $env:Path += ';C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Strawberry\c\bin;C:\Program Files\NASM;D:\producer\open-source\local\lib;D:\producer\open-source\local\bin;D:\gstreamer\1.0\msvc_x86_64\bin' + + # Create the debug directory (equivalent to mkdir -p) + New-Item -ItemType Directory -Path "D:\producer\build\debug_output" -Force + + # Stream for 15 seconds (450 frames @ 30 fps) + gst-launch-1.0.exe videotestsrc is-live=true num-buffers=450 ! video/x-raw,framerate=30/1,width=640,height=480 ! videoconvert ! x264enc tune=zerolatency key-int-max=45 ! h264parse ! kvssink stream-name="demo-stream" + - name: Verify MKV dump + working-directory: D:\producer\build run: | - export GST_PLUGIN_PATH=`pwd` - valgrind --leak-check=full --show-leak-kinds=all --track-origins=yes \ - --verbose --log-file=valgrind-out.txt ./tst/gstkvsplugintest + $mkvFiles = Get-ChildItem -Path "D:\producer\build\debug_output" -Filter *.mkv - if grep -q "All heap blocks were freed -- no leaks are possible" valgrind-out.txt; then - echo "No memory leaks detected" - else - echo "Memory leaks detected. Review the valgrind output:" - cat valgrind-out.txt + if ($mkvFiles.Count -eq 0) { + Write-Error "No MKV files found in D:\producer\build\debug_output" exit 1 - fi + } + + # Run mkvinfo on each MKV file + foreach ($file in $mkvFiles) { + Write-Output "Verifying $($file.FullName) with mkvinfo:" + mkvinfo.exe "$($file.FullName)" + } \ No newline at end of file diff --git a/.github/workflows/raspberry-pi.yaml b/.github/workflows/raspberry-pi.yaml index 6d3c934d..0569de21 100644 --- a/.github/workflows/raspberry-pi.yaml +++ b/.github/workflows/raspberry-pi.yaml @@ -1,93 +1,93 @@ -name: Build and test on Virtualized Raspberry Pi OS - -on: - push: - branches: [ master, develop ] - pull_request: - branches: [ master, develop ] - -jobs: - build: - runs-on: ubuntu-latest - timeout-minutes: 30 - permissions: - id-token: write - contents: read - strategy: - matrix: - include: - # Debian 11 - - os: bullseye - image: ghcr.io/dtcooper/raspberrypi-os:python3.12-bullseye - # Debian 12 - - os: bookworm - image: ghcr.io/dtcooper/raspberrypi-os:python3.12-bookworm - fail-fast: false - - name: Build on ${{ matrix.os }} - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up QEMU - uses: docker/setup-qemu-action@v3 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@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 and Test - env: - AWS_KVS_LOG_LEVEL: 2 - run: | - docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace \ - -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \ - -e AWS_SESSION_TOKEN -e AWS_REGION -e AWS_KVS_LOG_LEVEL \ - --platform linux/arm64 \ - ${{ matrix.image }} \ - /bin/bash -c ' - set -ex - apt-get update - apt-get install -y automake build-essential cmake git \ - gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad \ - gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \ - gstreamer1.0-tools gstreamer1.0-omx-generic \ - libcurl4-openssl-dev libgstreamer1.0-dev \ - libgstreamer-plugins-base1.0-dev liblog4cplus-dev \ - libssl-dev pkg-config - - mkdir -p build - cd build - - cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_DEPENDENCIES=OFF -DALIGNED_MEMORY_MODEL=ON - make -j$(nproc) - - export GST_PLUGIN_PATH=$(pwd) - - set +e # Disable exit on error for the timeout command - timeout --preserve-status --signal=SIGINT --kill-after=15s 30s \ - gst-launch-1.0 -v videotestsrc is-live=true \ - ! video/x-raw,framerate=10/1,width=640,height=480 \ - ! clockoverlay time-format="%a %B %d, %Y %I:%M:%S %p" \ - ! x264enc bframes=0 key-int-max=10 tune=zerolatency \ - ! h264parse \ - ! kvssink stream-name="cpp-producer-rpi-${{ matrix.os }}" - EXIT_CODE=$? - set -e # Re-enable exit on error - - # 0: Process exited after interrupt with code 0 - # 1: Process exited with error code 1 - # 137: Process killed by SIGKILL (if the --kill-after timeout is reached) - echo "Command exited with code: $EXIT_CODE" - if [ $EXIT_CODE -ne 0 ]; then - echo "Command did not exit gracefully after interrupt." - exit 1 - fi - ' +#name: Build and test on Virtualized Raspberry Pi OS +# +#on: +# push: +# branches: [ master, develop ] +# pull_request: +# branches: [ master, develop ] +# +#jobs: +# build: +# runs-on: ubuntu-22.04 +# timeout-minutes: 30 +# permissions: +# id-token: write +# contents: read +# strategy: +# matrix: +# include: +# # Debian 11 +# - os: bullseye +# image: ghcr.io/dtcooper/raspberrypi-os:python3.12-bullseye +# # Debian 12 +# - os: bookworm +# image: ghcr.io/dtcooper/raspberrypi-os:python3.12-bookworm +# fail-fast: false +# +# name: Build on ${{ matrix.os }} +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# +# - name: Set up QEMU +# uses: docker/setup-qemu-action@v3 +# +# - name: Set up Docker Buildx +# uses: docker/setup-buildx-action@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 and Test +# env: +# AWS_KVS_LOG_LEVEL: 2 +# run: | +# docker run --rm -v ${{ github.workspace }}:/workspace -w /workspace \ +# -e AWS_ACCESS_KEY_ID -e AWS_SECRET_ACCESS_KEY \ +# -e AWS_SESSION_TOKEN -e AWS_REGION -e AWS_KVS_LOG_LEVEL \ +# --platform linux/arm64 \ +# ${{ matrix.image }} \ +# /bin/bash -c ' +# set -ex +# apt-get update +# apt-get install -y automake build-essential cmake git \ +# gstreamer1.0-plugins-base-apps gstreamer1.0-plugins-bad \ +# gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly \ +# gstreamer1.0-tools gstreamer1.0-omx-generic \ +# libcurl4-openssl-dev libgstreamer1.0-dev \ +# libgstreamer-plugins-base1.0-dev liblog4cplus-dev \ +# libssl-dev pkg-config +# +# mkdir -p build +# cd build +# +# cmake .. -DBUILD_GSTREAMER_PLUGIN=ON -DBUILD_DEPENDENCIES=OFF -DALIGNED_MEMORY_MODEL=ON +# make -j$(nproc) +# +# export GST_PLUGIN_PATH=$(pwd) +# +# set +e # Disable exit on error for the timeout command +# timeout --preserve-status --signal=SIGINT --kill-after=15s 30s \ +# gst-launch-1.0 -v videotestsrc is-live=true \ +# ! video/x-raw,framerate=10/1,width=640,height=480 \ +# ! clockoverlay time-format="%a %B %d, %Y %I:%M:%S %p" \ +# ! x264enc bframes=0 key-int-max=10 tune=zerolatency \ +# ! h264parse \ +# ! kvssink stream-name="cpp-producer-rpi-${{ matrix.os }}" +# EXIT_CODE=$? +# set -e # Re-enable exit on error +# +# # 0: Process exited after interrupt with code 0 +# # 1: Process exited with error code 1 +# # 137: Process killed by SIGKILL (if the --kill-after timeout is reached) +# echo "Command exited with code: $EXIT_CODE" +# if [ $EXIT_CODE -ne 0 ]; then +# echo "Command did not exit gracefully after interrupt." +# exit 1 +# fi +# ' diff --git a/kvs_log_configuration b/kvs_log_configuration index 2e3531a1..8cc7dd5b 100644 --- a/kvs_log_configuration +++ b/kvs_log_configuration @@ -1,4 +1,4 @@ -log4cplus.rootLogger=DEBUG, KvsConsoleAppender, KvsFileAppender +log4cplus.rootLogger=TRACE, KvsConsoleAppender, KvsFileAppender #log4cplus.logger.MemoryCheck=TRACE, KvsConsoleAppender