Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion scripts/ci/linux64/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@
# set -ev
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}

# fail the job when a build fails, with an error annotation naming what failed
build_or_fail(){
if ! make "$@"; then
echo "::error title=Build failed::make $* failed in ${PWD#$ROOT/}"
exit 1
fi
}

# if [ "$OPT" == "qbs" ]; then
# exit 0
# else
Expand All @@ -21,7 +29,7 @@ for group in *; do
cp ../../../scripts/templates/linux/Makefile .
cp ../../../scripts/templates/linux/config.make .
sleep 0.3
make -j2 Debug
build_or_fail -j2 Debug
sleep 0.3
cd bin
binname=$(basename ${test})
Expand Down
10 changes: 9 additions & 1 deletion scripts/ci/msys2/run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
#!/bin/bash
# set -ev
ROOT=$(pwd -P)

# fail the job when a build fails, with an error annotation naming what failed
build_or_fail(){
if ! make "$@"; then
echo "::error title=Build failed::make $* failed in ${PWD#$ROOT/}"
exit 1
fi
}
# source $ROOT/scripts/ci/ccache.sh

echo "##[group]**** Running unit tests ****"
Expand All @@ -16,7 +24,7 @@ for group in *; do
cd $test
cp ../../../scripts/templates/msys2/Makefile .
cp ../../../scripts/templates/msys2/config.make .
make -j2 Debug
build_or_fail -j2 Debug
cd bin
binname=$(basename ${test})
#gdb -batch -ex "run" -ex "bt" -ex "q \$_exitcode" ./${binname}_debug
Expand Down
14 changes: 11 additions & 3 deletions scripts/ci/osx/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@
#set -ev
ROOT=${TRAVIS_BUILD_DIR:-"$( cd "$(dirname "$0")/../../.." ; pwd -P )"}

# fail the job when a build fails, with an error annotation naming what failed
build_or_fail(){
if ! make "$@"; then
echo "::error title=Build failed::make $* failed in ${PWD#$ROOT/}"
exit 1
fi
}

trap 'for f in ~/Library/Logs/DiagnosticReports/*; do cat $f; done' 11

echo "##[group]**** Building emptyExample ****"
cd $ROOT
cp scripts/templates/osx/Makefile examples/templates/emptyExample/
cp scripts/templates/osx/config.make examples/templates/emptyExample/
cd examples/templates/emptyExample/
make -j2 Debug
build_or_fail -j2 Debug
echo "##[endgroup]"

echo "##[group]**** Building allAddonsExample ****"
cd $ROOT
cp scripts/templates/osx/Makefile examples/templates/allAddonsExample/
cp scripts/templates/osx/config.make examples/templates/allAddonsExample/
cd examples/templates/allAddonsExample/
make -j2 Debug
build_or_fail -j2 Debug
echo "##[endgroup]"

echo "##[group]**** Running unit tests ****"
Expand All @@ -33,7 +41,7 @@ for group in *; do
cd $test
cp ../../../scripts/templates/osx/Makefile .
cp ../../../scripts/templates/osx/config.make .
make -j2 Debug
build_or_fail -j2 Debug
make RunDebug
errorcode=$?
if [[ $errorcode -ne 0 ]]; then
Expand Down
Loading