From d8d9887228653e85ed924740444e667d7b1a7bca Mon Sep 17 00:00:00 2001 From: Niklas Wenzel Date: Fri, 7 Aug 2026 06:50:48 +0200 Subject: [PATCH] ci: abort if build requirements are missing (#26368) 1. Abort CI if build requirements are missing. 2. Add check to make sure Git LFS has been configured. 3. Add trailing newlines to log messages. --- ci/run.sh | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/ci/run.sh b/ci/run.sh index 68a95ec323..8506bb4089 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -643,39 +643,52 @@ function gg_sum_rerank_tiny { function gg_check_build_requirements { if ! command -v git &> /dev/null; then - gg_printf 'git not found, please install' + gg_printf 'git not found, please install\n' + exit 1 fi if ! command -v git-lfs &> /dev/null; then - gg_printf 'git-lfs not found, please install' + gg_printf 'git-lfs not found, please install\n' + exit 1 + fi + + if ! git config --get filter.lfs.clean &> /dev/null; then + gg_printf 'git-lfs not initialized, please run `git lfs install`\n' + exit 1 fi if ! command -v wget &> /dev/null; then - gg_printf 'wget not found, please install' + gg_printf 'wget not found, please install\n' + exit 1 fi if ! command -v python3 &> /dev/null; then - gg_printf 'python3 not found, please install' + gg_printf 'python3 not found, please install\n' + exit 1 fi if ! command -v pip3 &> /dev/null; then - gg_printf 'pip3 not found, please install' + gg_printf 'pip3 not found, please install\n' + exit 1 fi if ! python3 -m ensurepip --help &> /dev/null; then - gg_printf 'ensurepip not found, please install python3-venv package' + gg_printf 'ensurepip not found, please install python3-venv package\n' + exit 1 fi if ! command -v cmake &> /dev/null; then - gg_printf 'cmake not found, please install' + gg_printf 'cmake not found, please install\n' + exit 1 fi if ! command -v ccache &> /dev/null; then - gg_printf 'ccache not found, please consider installing for faster builds' + gg_printf 'ccache not found, please consider installing for faster builds\n' fi if ! command -v ctest &> /dev/null; then - gg_printf 'ctest not found, please install' + gg_printf 'ctest not found, please install\n' + exit 1 fi }