Skip to content

Commit

Permalink
Duplicate event fix for master (#838)
Browse files Browse the repository at this point in the history
* Update for develop (#740)

* Minor syntax fix

.. is required for fetching files from parent dir ... without .. it throws error

* Update README and travis.yml to acknowledge develop

* Fix typo in readme

* add free missing (#746)

Co-authored-by: David D <david.desbiens@tentaq.com>

* Update readme (#744)

* Fix typo in readme

* Update Readme

Debug section: add solution to cmake error "could not find JNI"

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

* Add instruction to set offline mode (#741)

Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>

Co-authored-by: Ketul shah <ketulshah1993@gmail.com>
Co-authored-by: Jeremy Gunawan <jggunawa@amazon.com>
Co-authored-by: waikup83 <waikup@hotmail.com>
Co-authored-by: David D <david.desbiens@tentaq.com>
Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>

* updated cmake verison from 2.8 to 3.6.3

* Fix bug that leads to losing initial frames

* Update to top of producer C commit

* Untie stream-name and thing-name (#785)

* untie stream-name and thing-name

* fixup spacing

Co-authored-by: tom schuring <tschuring@mtdata.com.au>

* update docs for iot-thing-name usage

* Expose file logging jni develop (#770)

* expose addFileLoggerPlatformCallbacksProvider in Java with JNI

* updated addFileLoggerPlatformCallbacksProvider to parse file path

* added a callback from JNI to a Java function for logging

* updated logPrintFunc calback

* missed client_handle initialization in constructor

* added comments

* white space change to trigger travis

* Images feature and sample support

* GitHub actions setup (#815)

* github actions setup; disable travis for develop

* fix syntax error:

* fix syntax error

* fix linux builds

* fix linux builds

* fix linux builds

* add missing packages

* add keys to env vars

* check env vars

* check env vars

* fix builds

* fix builds on ga

* test mac clang on ga

* test mac clang on ga

* test mac clang on ga

* test mac clang on ga

* test mac clang on ga

* unsetting the token

* unsetting the token

* test macos clang

* test macos clang

* stop travis builds on each push

* use oidc

* fix windows build

* fix test instruction

* comment failing builds on travis and ga

* update gcc and macos versions

* update cmake

* update cmake

* use latest os, update log levels, uncomment travis

* update failing build

* update failing build

* trigger travis

* trigger travis

* Revert "trigger travis"

This reverts commit d511f15.

* update msvc path, add windows to ga, remove from travis

* trigger travis

* trigger travis w/o passing builds

* add cpath and ldflags for mac build

* Revert "add cpath and ldflags for mac build"

This reverts commit fafad7b.

* test ubsan build

* fix cmake instruction for mac-gcc

* remove travis file

* remove travis checks

* Update Producer-c to new master

* Updated to the ACTUAL master...

* Fix OIDC for GitHub Actions (#824)

* use oidc right before tests

* run ga builds for branch

* fix test path

* update branches

* set creds expiration time

* testing re-order tags changes

* Updated Producer, now putEventMetadata returns with an error if the first cluster has not been started

* updated kvs_gstreamer_sample.cpp to also use the event metadata feature on every key frame

* Add ARM build to GA, log4cplus host name fix for cross compilation (#831)

* setup arm cross compilation

* update the package list

* fix  in

* specify host in log4cplus

* specify host in log4cplus

* specify host in log4cplus

* run all builds with new host config in log4cplus

* build with gstreamer and dependencies

* build with gstreamer and dependencies

* build with gstreamer and dependencies and openssl

* build with gstreamer and openssl

* specify build and host

* specify build and host

* specify build host and target

* specify same build and host

* specify build and host in all cmake files

* use a different compiler

* use a different compiler

* echo compiler

* set CC and CXX correctly

* set CC and CXX correctly

* set openssl platform

* set openssl platform

* set openssl platform

* expose host name for log4cplus

* change log4cplus host name

* fix cmake syntax error

* fix cmke log4plus condition

* fix cmake log4plus condition

* fix cmake log4plus condition

* change var name cmake

* change var name in ci

* update cmake instruction in ci

* check conditions for log4cplus in cmake

* check conditions for log4cplus in cmake

* use set instead of option in cmake

* check messages

* fix ci cmake instruction

* fix ci cmake instruction

* add definition

* use env var

* use env var

* use build args

* update readme

* remove host-name from qemu arm build

* update readme for cross-compile instructions

* add aarch64; move log config file

* remove qemu

* fix config file path (#835)

* Duplicate fix, sample cleanup

* Test was 'sometimes' triggering. Needed more frames to ensure its success

Co-authored-by: Ketul shah <ketulshah1993@gmail.com>
Co-authored-by: Jeremy Gunawan <jggunawa@amazon.com>
Co-authored-by: waikup83 <waikup@hotmail.com>
Co-authored-by: David D <david.desbiens@tentaq.com>
Co-authored-by: Hassan Sahibzada <hsahibza@amazon.com>
Co-authored-by: Divya Sampath Kumar <disa6302@colorado.edu>
Co-authored-by: Niyati Maheshwari <niyatim23@gmail.com>
Co-authored-by: clogwog <tomschuring@gmail.com>
Co-authored-by: tom schuring <tschuring@mtdata.com.au>
  • Loading branch information
10 people committed Mar 27, 2022
1 parent 0121f2d commit 2b343c9
Show file tree
Hide file tree
Showing 31 changed files with 644 additions and 167 deletions.
2 changes: 1 addition & 1 deletion .github/build_windows.bat
@@ -1,4 +1,4 @@
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
mkdir build
cd build
cmd.exe /c cmake -G "NMake Makefiles" ..
Expand Down
362 changes: 362 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,362 @@
name: Producer CPP SDK CI

on:
push:
branches:
- develop
- master
pull_request:
branches:
- develop
- master

jobs:
mac-os-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@v2
- name: Install dependencies
run: |
brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus gst-libav
- name: Build repository
run: |
mkdir build && cd build
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE'
make
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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-10.15
permissions:
id-token: write
contents: read
env:
CC: gcc
CXX: g++
AWS_KVS_LOG_LEVEL: 2
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus gst-libav
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DBUILD_TEST=TRUE
make
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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-18.04
env:
AWS_KVS_LOG_LEVEL: 2
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install dependencies
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
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
make
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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 20m ./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-18.04
permissions:
id-token: write
contents: read
env:
CC: clang
CXX: clang++
AWS_KVS_LOG_LEVEL: 2
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install dependencies
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
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
make
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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 20m ./tst/producerTest
undefined-behavior-sanitizer:
runs-on: ubuntu-18.04
permissions:
id-token: write
contents: read
env:
CC: clang
CXX: clang++
AWS_KVS_LOG_LEVEL: 2
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install dependencies
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
- name: Build repository
run: |
mkdir build && cd build
cmake .. -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
make
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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 20m ./tst/producerTest
# memory-sanitizer:
# runs-on: ubuntu-18.04
# permissions:
# id-token: write
# contents: read
# env:
# CC: clang
# CXX: clang++
# AWS_KVS_LOG_LEVEL: 2
# steps:
# - name: Clone repository
# uses: actions/checkout@v2
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# 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-18.04
# permissions:
# id-token: write
# contents: read
# env:
# CC: clang
# CXX: clang++
# AWS_KVS_LOG_LEVEL: 2
# steps:
# - name: Clone repository
# uses: actions/checkout@v2
# - name: Configure AWS Credentials
# uses: aws-actions/configure-aws-credentials@v1
# 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

linux-gcc-4_4:
runs-on: ubuntu-latest
env:
AWS_KVS_LOG_LEVEL: 2
CC: gcc-4.4
permissions:
id-token: write
contents: read
steps:
- name: Clone repository
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
sudo apt-get -q update
sudo apt-get -y install gcc-4.4
sudo apt-get -y install gdb
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
make
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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 20m ./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@v2
- name: Install dependencies
run: |
choco install nasm strawberryperl
choco install gstreamer --version=1.16.2
choco install gstreamer-devel --version=1.16.2
- 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-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\lib;D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\bin'
git config --system core.longpaths true
.github/build_windows.bat
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
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-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\lib;D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\open-source\local\bin'
& "D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\build\tst\producerTest.exe"
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 update
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@v2
- 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
make
file libKinesisVideoProducer.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 update
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@v2
- 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
make
file libKinesisVideoProducer.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 update
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@v2
- 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
make
file libKinesisVideoProducer.so

0 comments on commit 2b343c9

Please sign in to comment.