Skip to content

Commit 28f3904

Browse files
committed
chore: Retry freebsd tests 2 times.
Also, use `cmake --build` instead of manually calling `gmake`. This allows us to maybe later use `ninja` instead of `gmake` without changing this build invocation. Also, increase timeout to 120 seconds. FreeBSD tests are slow.
1 parent 47e77d1 commit 28f3904

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

.github/scripts/cmake-freebsd

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ cd .. # /work
1010

1111
# === Get VM ready to build the code ===
1212

13-
gunzip "$IMAGE_NAME.gz"
13+
# Unpack image only if it's compressed.
14+
if [ -f "$IMAGE_NAME.gz" ]; then
15+
gunzip "$IMAGE_NAME.gz"
16+
fi
1417

1518
mv c-toxcore /
1619

@@ -43,13 +46,13 @@ RUN "cmake -B_build -Hc-toxcore \
4346
-DMUST_BUILD_TOXAV=ON \
4447
-DNON_HERMETIC_TESTS=ON \
4548
-DSTRICT_ABI=ON \
46-
-DTEST_TIMEOUT_SECONDS=90 \
49+
-DTEST_TIMEOUT_SECONDS=120 \
4750
-DUSE_IPV6=OFF \
4851
-DAUTOTEST=ON"
4952

5053
# We created the VM with the same number of cores as the host, so the host-ran `nproc` here is fine.
51-
RUN 'gmake "-j$NPROC" -k install -C_build'
52-
RUN 'gmake "-j$NPROC" test ARGS="-j50" -C_build || true'
54+
RUN 'cmake --build _build --parallel "$NPROC" --target install -- -k'
55+
RUN 'cd _build && ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:2 --timeout 120 || true'
5356

5457
# Gracefully shut down the VM.
5558
stop_vm

0 commit comments

Comments
 (0)