Skip to content

Commit 2b343c9

Browse files
jdelaplaketul93sirknightjwaikup83David D
authored
Duplicate event fix for master (#838)
* 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 <[email protected]> * 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 <[email protected]> * Add instruction to set offline mode (#741) Co-authored-by: Hassan Sahibzada <[email protected]> Co-authored-by: Ketul shah <[email protected]> Co-authored-by: Jeremy Gunawan <[email protected]> Co-authored-by: waikup83 <[email protected]> Co-authored-by: David D <[email protected]> Co-authored-by: Hassan Sahibzada <[email protected]> Co-authored-by: Divya Sampath Kumar <[email protected]> * 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 <[email protected]> * 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 <[email protected]> Co-authored-by: Jeremy Gunawan <[email protected]> Co-authored-by: waikup83 <[email protected]> Co-authored-by: David D <[email protected]> Co-authored-by: Hassan Sahibzada <[email protected]> Co-authored-by: Divya Sampath Kumar <[email protected]> Co-authored-by: Niyati Maheshwari <[email protected]> Co-authored-by: clogwog <[email protected]> Co-authored-by: tom schuring <[email protected]>
1 parent 0121f2d commit 2b343c9

31 files changed

+644
-167
lines changed

.github/build_windows.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
1+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
22
mkdir build
33
cd build
44
cmd.exe /c cmake -G "NMake Makefiles" ..

.github/workflows/ci.yml

Lines changed: 362 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,362 @@
1+
name: Producer CPP SDK CI
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- master
8+
pull_request:
9+
branches:
10+
- develop
11+
- master
12+
13+
jobs:
14+
mac-os-build-clang:
15+
runs-on: macos-latest
16+
env:
17+
AWS_KVS_LOG_LEVEL: 2
18+
permissions:
19+
id-token: write
20+
contents: read
21+
steps:
22+
- name: Clone repository
23+
uses: actions/checkout@v2
24+
- name: Install dependencies
25+
run: |
26+
brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus gst-libav
27+
- name: Build repository
28+
run: |
29+
mkdir build && cd build
30+
sh -c 'cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE;cmake .. -DBUILD_TEST=TRUE -DCOMPILER_WARNINGS=TRUE'
31+
make
32+
- name: Configure AWS Credentials
33+
uses: aws-actions/configure-aws-credentials@v1
34+
with:
35+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
36+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
37+
aws-region: ${{ secrets.AWS_REGION }}
38+
role-duration-seconds: 10800
39+
- name: Run tests
40+
run: |
41+
cd build
42+
./tst/producerTest
43+
44+
mac-os-build-gcc:
45+
runs-on: macos-10.15
46+
permissions:
47+
id-token: write
48+
contents: read
49+
env:
50+
CC: gcc
51+
CXX: g++
52+
AWS_KVS_LOG_LEVEL: 2
53+
steps:
54+
- name: Clone repository
55+
uses: actions/checkout@v2
56+
- name: Install dependencies
57+
run: |
58+
brew install pkg-config openssl cmake gstreamer gst-plugins-base gst-plugins-good gst-plugins-bad gst-plugins-ugly log4cplus gst-libav
59+
- name: Build repository
60+
run: |
61+
mkdir build && cd build
62+
cmake .. -DBUILD_TEST=TRUE
63+
make
64+
- name: Configure AWS Credentials
65+
uses: aws-actions/configure-aws-credentials@v1
66+
with:
67+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
68+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
69+
aws-region: ${{ secrets.AWS_REGION }}
70+
role-duration-seconds: 10800
71+
- name: Run tests
72+
run: |
73+
cd build
74+
./tst/producerTest
75+
76+
linux-gcc-code-coverage:
77+
runs-on: ubuntu-18.04
78+
env:
79+
AWS_KVS_LOG_LEVEL: 2
80+
permissions:
81+
id-token: write
82+
contents: read
83+
steps:
84+
- name: Clone repository
85+
uses: actions/checkout@v2
86+
- name: Install dependencies
87+
run: |
88+
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
89+
- name: Build repository
90+
run: |
91+
mkdir build && cd build
92+
cmake .. -DCODE_COVERAGE=TRUE -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
93+
make
94+
- name: Configure AWS Credentials
95+
uses: aws-actions/configure-aws-credentials@v1
96+
with:
97+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
98+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
99+
aws-region: ${{ secrets.AWS_REGION }}
100+
role-duration-seconds: 10800
101+
- name: Run tests
102+
run: |
103+
cd build
104+
ulimit -c unlimited -S
105+
timeout --signal=SIGABRT 20m ./tst/producerTest
106+
- name: Code coverage
107+
run: |
108+
cd build
109+
for test_file in $(find CMakeFiles/KinesisVideoProducer.dir gstkvssink.dir KinesisVideoProducerJNI.dir -name '*.gcno'); do gcov $test_file; done
110+
bash <(curl -s https://codecov.io/bash)
111+
112+
address-sanitizer:
113+
runs-on: ubuntu-18.04
114+
permissions:
115+
id-token: write
116+
contents: read
117+
env:
118+
CC: clang
119+
CXX: clang++
120+
AWS_KVS_LOG_LEVEL: 2
121+
steps:
122+
- name: Clone repository
123+
uses: actions/checkout@v2
124+
- name: Install dependencies
125+
run: |
126+
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
127+
- name: Build repository
128+
run: |
129+
mkdir build && cd build
130+
cmake .. -DBUILD_TEST=TRUE -DADDRESS_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
131+
make
132+
- name: Configure AWS Credentials
133+
uses: aws-actions/configure-aws-credentials@v1
134+
with:
135+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
136+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
137+
aws-region: ${{ secrets.AWS_REGION }}
138+
role-duration-seconds: 10800
139+
- name: Run tests
140+
run: |
141+
cd build
142+
ulimit -c unlimited -S
143+
timeout --signal=SIGABRT 20m ./tst/producerTest
144+
145+
undefined-behavior-sanitizer:
146+
runs-on: ubuntu-18.04
147+
permissions:
148+
id-token: write
149+
contents: read
150+
env:
151+
CC: clang
152+
CXX: clang++
153+
AWS_KVS_LOG_LEVEL: 2
154+
steps:
155+
- name: Clone repository
156+
uses: actions/checkout@v2
157+
- name: Install dependencies
158+
run: |
159+
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
160+
- name: Build repository
161+
run: |
162+
mkdir build && cd build
163+
cmake .. -DBUILD_TEST=TRUE -DUNDEFINED_BEHAVIOR_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
164+
make
165+
- name: Configure AWS Credentials
166+
uses: aws-actions/configure-aws-credentials@v1
167+
with:
168+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
169+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
170+
aws-region: ${{ secrets.AWS_REGION }}
171+
role-duration-seconds: 10800
172+
- name: Run tests
173+
run: |
174+
cd build
175+
ulimit -c unlimited -S
176+
timeout --signal=SIGABRT 20m ./tst/producerTest
177+
178+
# memory-sanitizer:
179+
# runs-on: ubuntu-18.04
180+
# permissions:
181+
# id-token: write
182+
# contents: read
183+
# env:
184+
# CC: clang
185+
# CXX: clang++
186+
# AWS_KVS_LOG_LEVEL: 2
187+
# steps:
188+
# - name: Clone repository
189+
# uses: actions/checkout@v2
190+
# - name: Configure AWS Credentials
191+
# uses: aws-actions/configure-aws-credentials@v1
192+
# with:
193+
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
194+
# role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
195+
# aws-region: ${{ secrets.AWS_REGION }}
196+
# - name: Build repository
197+
# run: |
198+
# mkdir build && cd build
199+
# cmake .. -DBUILD_TEST=TRUE -DMEMORY_SANITIZER=TRUE -DBUILD_COMMON_LWS=TRUE
200+
# make
201+
# ulimit -c unlimited -S
202+
# timeout --signal=SIGABRT 150m ./tst/producerTest --gtest_break_on_failure
203+
# thread-sanitizer:
204+
# runs-on: ubuntu-18.04
205+
# permissions:
206+
# id-token: write
207+
# contents: read
208+
# env:
209+
# CC: clang
210+
# CXX: clang++
211+
# AWS_KVS_LOG_LEVEL: 2
212+
# steps:
213+
# - name: Clone repository
214+
# uses: actions/checkout@v2
215+
# - name: Configure AWS Credentials
216+
# uses: aws-actions/configure-aws-credentials@v1
217+
# with:
218+
# role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
219+
# role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
220+
# aws-region: ${{ secrets.AWS_REGION }}
221+
# - name: Build repository
222+
# run: |
223+
# 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
224+
# mkdir build && cd build
225+
# cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
226+
# make
227+
# ulimit -c unlimited -S
228+
# timeout --signal=SIGABRT 20m ./tst/producerTest
229+
230+
linux-gcc-4_4:
231+
runs-on: ubuntu-latest
232+
env:
233+
AWS_KVS_LOG_LEVEL: 2
234+
CC: gcc-4.4
235+
permissions:
236+
id-token: write
237+
contents: read
238+
steps:
239+
- name: Clone repository
240+
uses: actions/checkout@v2
241+
- name: Install dependencies
242+
run: |
243+
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
244+
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty main'
245+
sudo add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ trusty universe'
246+
sudo apt-get -q update
247+
sudo apt-get -y install gcc-4.4
248+
sudo apt-get -y install gdb
249+
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
250+
- name: Build repository
251+
run: |
252+
mkdir build && cd build
253+
cmake .. -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
254+
make
255+
- name: Configure AWS Credentials
256+
uses: aws-actions/configure-aws-credentials@v1
257+
with:
258+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
259+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
260+
aws-region: ${{ secrets.AWS_REGION }}
261+
role-duration-seconds: 10800
262+
- name: Run tests
263+
run: |
264+
cd build
265+
ulimit -c unlimited -S
266+
timeout --signal=SIGABRT 20m ./tst/producerTest
267+
268+
windows-msvc:
269+
runs-on: windows-2022
270+
env:
271+
AWS_KVS_LOG_LEVEL: 7
272+
permissions:
273+
id-token: write
274+
contents: read
275+
steps:
276+
- name: Clone repository
277+
uses: actions/checkout@v2
278+
- name: Install dependencies
279+
run: |
280+
choco install nasm strawberryperl
281+
choco install gstreamer --version=1.16.2
282+
choco install gstreamer-devel --version=1.16.2
283+
- name: Build repository
284+
run: |
285+
$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'
286+
git config --system core.longpaths true
287+
.github/build_windows.bat
288+
- name: Configure AWS Credentials
289+
uses: aws-actions/configure-aws-credentials@v1
290+
with:
291+
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
292+
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
293+
aws-region: ${{ secrets.AWS_REGION }}
294+
role-duration-seconds: 10800
295+
- name: Run tests
296+
run: |
297+
$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'
298+
& "D:\a\amazon-kinesis-video-streams-producer-sdk-cpp\amazon-kinesis-video-streams-producer-sdk-cpp\build\tst\producerTest.exe"
299+
300+
arm64-cross-compilation:
301+
runs-on: ubuntu-latest
302+
env:
303+
CC: aarch64-linux-gnu-gcc
304+
CXX: aarch64-linux-gnu-g++
305+
steps:
306+
- name: Install dependencies
307+
run: |
308+
sudo apt update
309+
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
310+
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
311+
- name: Clone repository
312+
uses: actions/checkout@v2
313+
- name: Build Repository
314+
run: |
315+
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
316+
mkdir build && cd build
317+
cmake .. -DBUILD_TEST=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic64 -DBUILD_LOG4CPLUS_HOST=arm-linux
318+
make
319+
file libKinesisVideoProducer.so
320+
321+
linux-aarch64-cross-compilation:
322+
runs-on: ubuntu-latest
323+
env:
324+
CC: aarch64-linux-gnu-gcc
325+
CXX: aarch64-linux-gnu-g++
326+
steps:
327+
- name: Install dependencies
328+
run: |
329+
sudo apt update
330+
sudo apt-get -y install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu
331+
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
332+
- name: Clone repository
333+
uses: actions/checkout@v2
334+
- name: Build Repository
335+
run: |
336+
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
337+
mkdir build && cd build
338+
cmake .. -DBUILD_TEST=TRUE -DBUILD_OPENSSL_PLATFORM=linux-aarch64 -DBUILD_LOG4CPLUS_HOST=arm-linux
339+
make
340+
file libKinesisVideoProducer.so
341+
342+
arm32-cross-compilation:
343+
runs-on: ubuntu-latest
344+
env:
345+
CC: arm-linux-gnueabi-gcc
346+
CXX: arm-linux-gnueabi-g++
347+
steps:
348+
- name: Install dependencies
349+
run: |
350+
sudo apt update
351+
sudo apt-get -y install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi binutils-arm-linux-gnueabi
352+
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
353+
- name: Clone repository
354+
uses: actions/checkout@v2
355+
- name: Build Repository
356+
run: |
357+
sudo sh -c 'echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6'
358+
mkdir build && cd build
359+
cmake .. -DBUILD_TEST=TRUE -DBUILD_OPENSSL_PLATFORM=linux-generic32 -DBUILD_LOG4CPLUS_HOST=arm-linux
360+
make
361+
file libKinesisVideoProducer.so
362+

0 commit comments

Comments
 (0)