Skip to content

Commit af48212

Browse files
authored
Merge branch 'develop' into fix-memory-leak-from-shared-pointer
2 parents f9f8282 + 3318c47 commit af48212

31 files changed

+1800
-434
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
*Issue #, if available:*
22

3-
*Description of changes:*
3+
*What was changed?*
44

5+
*Why was it changed?*
6+
7+
*How was it changed?*
8+
9+
*What testing was done for the changes?*
510

611
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

.github/workflows/ci.yml

Lines changed: 47 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,19 @@ jobs:
4040
role-duration-seconds: 10800
4141
- name: Run tests
4242
run: |
43-
cd build
43+
cd build
4444
./tst/producerTest
4545
4646
mac-os-build-gcc:
4747
runs-on: macos-13
48+
strategy:
49+
matrix:
50+
parallel-build:
51+
- ON
52+
- OFF
53+
54+
fail-fast: false
55+
4856
permissions:
4957
id-token: write
5058
contents: read
@@ -62,21 +70,29 @@ jobs:
6270
- name: Build repository
6371
run: |
6472
mkdir build && cd build
65-
cmake .. -DBUILD_TEST=TRUE -DCMAKE_INSTALL_PREFIX=.
66-
make
67-
make install
73+
cmake .. -DBUILD_TEST=TRUE -DCMAKE_INSTALL_PREFIX=. -DPARALLEL_BUILD=${{ matrix.parallel-build }}
74+
75+
if [[ "${{ matrix.parallel-build }}" == 'ON' ]]; then
76+
make
77+
make -j install
78+
else
79+
make
80+
make install
81+
fi
6882
- name: Configure AWS Credentials
83+
if: ${{ matrix.parallel-build == 'ON' }} # Only need to run the tests once
6984
uses: aws-actions/configure-aws-credentials@v1-node16
7085
with:
7186
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
7287
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
7388
aws-region: ${{ secrets.AWS_REGION }}
7489
role-duration-seconds: 10800
7590
- name: Run tests
76-
run: |
91+
if: ${{ matrix.parallel-build == 'ON' }}
92+
run: |
7793
cd build
7894
./tst/producerTest
79-
95+
8096
linux-gcc-code-coverage:
8197
runs-on: ubuntu-20.04
8298
env:
@@ -88,7 +104,7 @@ jobs:
88104
- name: Clone repository
89105
uses: actions/checkout@v3
90106
- name: Install dependencies
91-
run: |
107+
run: |
92108
sudo apt clean && sudo apt update
93109
sudo apt install -y libunwind-dev
94110
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
@@ -115,7 +131,7 @@ jobs:
115131
cd build
116132
for test_file in $(find CMakeFiles/KinesisVideoProducer.dir gstkvssink.dir KinesisVideoProducerJNI.dir -name '*.gcno'); do gcov $test_file; done
117133
bash <(curl -s https://codecov.io/bash)
118-
134+
119135
address-sanitizer:
120136
runs-on: ubuntu-20.04
121137
permissions:
@@ -189,7 +205,7 @@ jobs:
189205
timeout --signal=SIGABRT 60m ./tst/producerTest
190206
191207
# memory-sanitizer:
192-
# runs-on: ubuntu-20.04
208+
# runs-on: ubuntu-20.04
193209
# permissions:
194210
# id-token: write
195211
# contents: read
@@ -237,11 +253,20 @@ jobs:
237253
# mkdir build && cd build
238254
# cmake .. -DBUILD_TEST=TRUE -DTHREAD_SANITIZER=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE
239255
# make
240-
# ulimit -c unlimited -S
256+
# ulimit -c unlimited -S
241257
# timeout --signal=SIGABRT 20m ./tst/producerTest
242-
258+
243259
ubuntu-gcc:
244260
runs-on: ubuntu-20.04
261+
262+
strategy:
263+
matrix:
264+
parallel-build:
265+
- ON
266+
- OFF
267+
268+
fail-fast: false
269+
245270
env:
246271
AWS_KVS_LOG_LEVEL: 2
247272
CC: gcc
@@ -260,17 +285,24 @@ jobs:
260285
- name: Build repository
261286
run: |
262287
mkdir build && cd build
263-
cmake .. -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=.
264-
make
265-
make install
288+
cmake .. -DBUILD_TEST=TRUE -DBUILD_GSTREAMER_PLUGIN=TRUE -DBUILD_JNI=TRUE -DCMAKE_INSTALL_PREFIX=. -DPARALLEL_BUILD=${{ matrix.parallel-build }}
289+
290+
if [[ "${{ matrix.parallel-build }}" == 'ON' ]]; then
291+
make -j install
292+
else
293+
make install
294+
fi
295+
266296
- name: Configure AWS Credentials
297+
if: ${{ matrix.parallel-build == 'ON' }} # Only need to run the tests once
267298
uses: aws-actions/configure-aws-credentials@v1-node16
268299
with:
269300
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
270301
role-session-name: ${{ secrets.AWS_ROLE_SESSION_NAME }}
271302
aws-region: ${{ secrets.AWS_REGION }}
272303
role-duration-seconds: 10800
273304
- name: Run tests
305+
if: ${{ matrix.parallel-build == 'ON' }}
274306
run: |
275307
cd build
276308
ulimit -c unlimited -S
@@ -312,7 +344,7 @@ jobs:
312344
- name: Run tests
313345
run: |
314346
$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'
315-
& "D:\producer\build\tst\producerTest.exe"
347+
& "D:\producer\build\tst\producerTest.exe"
316348
317349
arm64-cross-compilation:
318350
runs-on: ubuntu-20.04

.github/workflows/jni.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Producer CPP JNI Builds
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:
15+
strategy:
16+
matrix:
17+
config:
18+
- name: Intel x86_64
19+
runner: macos-13
20+
- name: Apple Silicon
21+
runner: macos-15
22+
- name: Ubuntu 22.04
23+
runner: ubuntu-latest
24+
container: public.ecr.aws/ubuntu/ubuntu:22.04_stable
25+
- name: Ubuntu 20.04
26+
runner: ubuntu-latest
27+
container: public.ecr.aws/ubuntu/ubuntu:20.04_stable
28+
29+
java:
30+
- 11
31+
- 17
32+
- 21
33+
34+
fail-fast: false
35+
36+
name: JNI ${{ matrix.config.name }} (Java ${{ matrix.java }})
37+
runs-on: ${{ matrix.config.runner }}
38+
container: ${{ matrix.config.container || '' }}
39+
40+
env:
41+
DEBIAN_FRONTEND: noninteractive
42+
43+
steps:
44+
- name: Setup XCode
45+
if: ${{ runner.os == 'macOS' }}
46+
uses: maxim-lobanov/setup-xcode@v1
47+
with:
48+
xcode-version: latest-stable
49+
50+
- name: Install Dependencies (Linux only)
51+
if: runner.os == 'Linux'
52+
run: |
53+
apt-get update
54+
apt-get install -y git cmake build-essential
55+
56+
- name: Set up Java (JDK ${{ matrix.java }})
57+
uses: actions/setup-java@v4
58+
with:
59+
distribution: 'corretto'
60+
java-version: ${{ matrix.java }}
61+
62+
- name: Clone repository
63+
uses: actions/checkout@v4
64+
65+
- name: Build JNI (CMake)
66+
run: |
67+
mkdir build && cd build
68+
cmake .. -DBUILD_JNI_ONLY=ON
69+
70+
# Note: Dependencies on/off shouldn't make any difference since
71+
# the only dependency for the JNI is PIC
72+
73+
- name: Build JNI (make)
74+
working-directory: ./build
75+
run: |
76+
make -j

0 commit comments

Comments
 (0)