]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
ci : add checks for cmake,make and ctest in ci/run.sh (#8200)
authorAlex Tuddenham <redacted>
Sun, 7 Jul 2024 14:59:14 +0000 (15:59 +0100)
committerGitHub <redacted>
Sun, 7 Jul 2024 14:59:14 +0000 (17:59 +0300)
* Added checks for cmake,make and ctest

* Removed erroneous whitespace

ci/run.sh

index 9703b77ce51db54192b0e9db2f36caf9f3c3a148..58022c7dc37e0210a327741c17dd38ab0199f94d 100755 (executable)
--- a/ci/run.sh
+++ b/ci/run.sh
@@ -103,6 +103,9 @@ function gg_run_ctest_debug {
 
     set -e
 
+    # Check cmake, make and ctest are installed
+    gg_check_build_requirements
+
     (time cmake -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
     (time make -j                                          ) 2>&1 | tee -a $OUT/${ci}-make.log
 
@@ -131,6 +134,9 @@ function gg_run_ctest_release {
 
     set -e
 
+    # Check cmake, make and ctest are installed
+    gg_check_build_requirements
+
     (time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
     (time make -j                                            ) 2>&1 | tee -a $OUT/${ci}-make.log
 
@@ -701,6 +707,20 @@ function gg_run_embd_bge_small {
     set +e
 }
 
+function gg_check_build_requirements {
+    if ! command -v cmake &> /dev/null; then
+        gg_printf 'cmake not found, please install'
+    fi
+
+    if ! command -v make &> /dev/null; then
+        gg_printf 'make not found, please install'
+    fi
+
+    if ! command -v ctest &> /dev/null; then
+        gg_printf 'ctest not found, please install'
+    fi
+}
+
 function gg_sum_embd_bge_small {
     gg_printf '### %s\n\n' "${ci}"