From 48e28b4196a94f2c19b294e9e25d650bad8050b0 Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 22 Nov 2023 18:40:10 +0000 Subject: [PATCH] chore: Retry freebsd tests 3 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. --- .github/scripts/cmake-freebsd | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/scripts/cmake-freebsd b/.github/scripts/cmake-freebsd index a7101f392e7..d720cf6a497 100755 --- a/.github/scripts/cmake-freebsd +++ b/.github/scripts/cmake-freebsd @@ -10,7 +10,10 @@ cd .. # /work # === Get VM ready to build the code === -gunzip "$IMAGE_NAME.gz" +# Unpack image only if it's compressed. +if [ -f "$IMAGE_NAME.gz" ]; then + gunzip "$IMAGE_NAME.gz" +fi mv c-toxcore / @@ -48,8 +51,8 @@ RUN "cmake -B_build -Hc-toxcore \ -DAUTOTEST=ON" # We created the VM with the same number of cores as the host, so the host-ran `nproc` here is fine. -RUN 'gmake "-j$NPROC" -k install -C_build' -RUN 'gmake "-j$NPROC" test ARGS="-j50" -C_build || true' +RUN 'cmake --build _build --parallel "$NPROC" --target install -- -k' +RUN 'cd _build && ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:3 --timeout 90 || true' # Gracefully shut down the VM. stop_vm