Skip to content

Commit ea94dea

Browse files
Enable parallel testing in Linux CI and container image build
1 parent b8d69a9 commit ea94dea

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/linux.bash

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ case "$DISTRO" in
3838
)
3939

4040
ln -vs /usr/bin/cmake3 /usr/local/bin/cmake
41+
ln -vs /usr/bin/ctest3 /usr/local/bin/ctest
4142
ln -vs /usr/bin/ninja-build /usr/local/bin/ninja
4243
CMAKE_OPTS+=(-DBOOST_{INCLUDEDIR=/boost_1_69_0,LIBRARYDIR=/boost_1_69_0/stage/lib})
4344
export LD_LIBRARY_PATH=/boost_1_69_0/stage/lib
@@ -154,6 +155,6 @@ cd /icinga2/build
154155

155156
ninja -v
156157

157-
ninja test
158+
ctest -j$(nproc) --output-on-failure
158159
ninja install
159160
icinga2 daemon -C

Containerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ RUN --mount=type=bind,source=.,target=/icinga2,readonly \
129129
-DICINGA2_WITH_COMPAT=OFF \
130130
-DICINGA2_WITH_LIVESTATUS=OFF && \
131131
make -j$([ "$MAKE_JOBS" = auto ] && nproc || echo "$MAKE_JOBS") && \
132-
if [ "${ICINGA2_BUILD_TESTING}" = ON ]; then CTEST_OUTPUT_ON_FAILURE=1 make test; fi && \
132+
if [ "${ICINGA2_BUILD_TESTING}" = ON ]; then \
133+
ctest -j$([ "$MAKE_JOBS" = auto ] && nproc || echo "$MAKE_JOBS") --output-on-failure; \
134+
fi && \
133135
make install DESTDIR=/icinga2-install
134136

135137
RUN rm -rf /icinga2-install/etc/icinga2/features-enabled/mainlog.conf \

0 commit comments

Comments
 (0)