@@ -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 :
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
0 commit comments