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,17 +70,25 @@ 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
91+ if : ${{ matrix.parallel-build == 'ON' }}
7692 run : |
7793 cd build
7894 ./tst/producerTest
@@ -242,6 +258,15 @@ jobs:
242258
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
0 commit comments