From 18aebe08962c1878d84c373ad85caff25ec67771 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 7 Oct 2026 20:28:02 +0200 Subject: [PATCH] GHA: fail early if `mport` did not complete the install step MidnightBSD's `mport install` is prone to return a non-zero exit code on success (hence the need to use `|| true`; also unrelated to the `grep` filtering, needed to avoid log noise for no built-in option for this). Work around by verifying success explicitly, so that a truly failed install command fails in the 'install prereqs' step, instead of raising a confusing error (e.g. "cmake: not found") in the step after. Follow-up to b7f4e55c8fc5a0a65f1bdb748e51782cd051aa57 #2120 Follow-up to e4f700e9343d483c11df2a2ed722da619f2e61cb #1948 Closes #2663 --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 43b7a5f8..e5169fee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1247,6 +1247,11 @@ jobs: sudo pkg install -y ${MATRIX_INSTALL} elif [ "${MATRIX_OS}" = 'midnightbsd' ]; then sudo mport install ${MATRIX_INSTALL} | grep -v -E '(Downloading.+%|^/usr/local)' || true + if [ "${MATRIX_BUILD}" = 'CM' ]; then + command -v cmake >/dev/null 2>&1 + else + command -v make >/dev/null 2>&1 + fi elif [ "${MATRIX_OS}" = 'netbsd' ]; then sudo pkgin -y install ${MATRIX_INSTALL} elif [ "${MATRIX_OS}" = 'openbsd' ]; then