2024-05-02 10:14:59 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
|
|
|
|
# Author: Sven Vogel
|
|
|
|
# Created: 02.05.2024
|
|
|
|
# Description: Builds the project and runs tests
|
|
|
|
# Returns 0 on success and 1 when something went wrong
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| BUILDING all TARGETS |"
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
|
2024-05-18 10:25:13 +00:00
|
|
|
cmake .
|
|
|
|
|
2024-05-02 10:14:59 +00:00
|
|
|
make -B
|
|
|
|
if [ ! $? -eq 0 ]; then
|
|
|
|
echo "===> failed to build targets"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-05-25 11:52:59 +00:00
|
|
|
sh -c ./run-lib-build.sh
|
|
|
|
|
2024-05-02 10:14:59 +00:00
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| RUNNING CODE CHECK |"
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
|
|
|
|
make check
|
|
|
|
if [ ! $? -eq 0 ]; then
|
|
|
|
echo "===> failed code check..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| RUNNING TESTS |"
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
|
|
|
|
ctest -VV --output-on-failure --schedule-random -j 4
|
|
|
|
if [ ! $? -eq 0 ]; then
|
|
|
|
echo "===> failed tests..."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "+--------------------------------------+"
|
|
|
|
echo "| COMPLETED CHECK + TESTS SUCCESSFULLY |"
|
2024-05-27 17:53:22 +00:00
|
|
|
echo "+--------------------------------------+"
|