diff --git a/script/auto_format.sh b/script/auto_format.sh index 8f844a58..f9ffd7b4 100755 --- a/script/auto_format.sh +++ b/script/auto_format.sh @@ -1,2 +1,5 @@ #!/usr/bin/env bash + +set -e + (find api_search -name "*.cpp" && find include -name "*.hpp" && find examples -name "*.cpp" && find test -name "*.cpp") | xargs clang-format -i {} diff --git a/script/ci.sh b/script/ci.sh index bc704244..a5934ac8 100755 --- a/script/ci.sh +++ b/script/ci.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + # Central script called by the CI # Usage: # ci.sh {run_build|run_tests} @@ -17,7 +19,7 @@ if [[ "$OSTYPE" == "msys" || "$OSTYPE" == "cygwin" ]]; then # Windows path handling is a never ending source of ... INSTALL_PREFIX="$USERPROFILE\\.local" INSTALL_PREFIX=$(cygpath -u "$INSTALL_PREFIX") # Make CMake happy when using git bash under windows - export CMAKE_PREFIX_PATH=$INSTALL_PREFIX;$CMAKE_PREFIX_PATH # Notice the ";" instead of ":" + export CMAKE_PREFIX_PATH="${INSTALL_PREFIX}${CMAKE_PREFIX_PATH:+;${CMAKE_PREFIX_PATH}}" # Notice the ";" instead of ":" else INSTALL_PREFIX="$HOME/.local" export CMAKE_PREFIX_PATH=$INSTALL_PREFIX:$CMAKE_PREFIX_PATH @@ -26,7 +28,7 @@ fi # Function to install doctest _install_doctest() { cd "$REPO_DIR" - git clone --depth=1 --branch=v2.4.11 https://github.com/doctest/doctest + git clone --depth=1 --branch=v2.4.12 https://github.com/doctest/doctest cd doctest && mkdir -p build && cd build cmake .. -DDOCTEST_WITH_TESTS=OFF -DDOCTEST_WITH_MAIN_IN_STATIC_LIB=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX cmake --build . --config Release --target install diff --git a/script/ci_setup_linux.sh b/script/ci_setup_linux.sh index cb500a01..8e37e6cb 100755 --- a/script/ci_setup_linux.sh +++ b/script/ci_setup_linux.sh @@ -1,4 +1,6 @@ #!/bin/bash +set -e + apt-get update apt-get install -y git