Skip to content

Commit 4090ea5

Browse files
authored
ci : add checks for cmake,make and ctest in ci/run.sh (#8200)
* Added checks for cmake,make and ctest * Removed erroneous whitespace
1 parent f1948f1 commit 4090ea5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

ci/run.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ function gg_run_ctest_debug {
103103

104104
set -e
105105

106+
# Check cmake, make and ctest are installed
107+
gg_check_build_requirements
108+
106109
(time cmake -DCMAKE_BUILD_TYPE=Debug ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
107110
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
108111

@@ -131,6 +134,9 @@ function gg_run_ctest_release {
131134

132135
set -e
133136

137+
# Check cmake, make and ctest are installed
138+
gg_check_build_requirements
139+
134140
(time cmake -DCMAKE_BUILD_TYPE=Release ${CMAKE_EXTRA} .. ) 2>&1 | tee -a $OUT/${ci}-cmake.log
135141
(time make -j ) 2>&1 | tee -a $OUT/${ci}-make.log
136142

@@ -701,6 +707,20 @@ function gg_run_embd_bge_small {
701707
set +e
702708
}
703709

710+
function gg_check_build_requirements {
711+
if ! command -v cmake &> /dev/null; then
712+
gg_printf 'cmake not found, please install'
713+
fi
714+
715+
if ! command -v make &> /dev/null; then
716+
gg_printf 'make not found, please install'
717+
fi
718+
719+
if ! command -v ctest &> /dev/null; then
720+
gg_printf 'ctest not found, please install'
721+
fi
722+
}
723+
704724
function gg_sum_embd_bge_small {
705725
gg_printf '### %s\n\n' "${ci}"
706726

0 commit comments

Comments
 (0)