summaryrefslogtreecommitdiffstats
path: root/BuildTools/Scripts
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2019-12-29 01:44:39 +0000
committerassiduous <assiduous@diligentgraphics.com>2019-12-29 01:44:39 +0000
commitd4314c96b30dbd61188dad08cf407c8dd9c10732 (patch)
tree810af41e4d28c80ba6dc7b6946387c70f03e3bc3 /BuildTools/Scripts
parenttravis: fixed cd to test folder (diff)
downloadDiligentCore-d4314c96b30dbd61188dad08cf407c8dd9c10732.tar.gz
DiligentCore-d4314c96b30dbd61188dad08cf407c8dd9c10732.zip
travis: fixed scripts to hopefully properly return error code to the shell this time
Diffstat (limited to 'BuildTools/Scripts')
-rwxr-xr-xBuildTools/Scripts/travis/before_install.sh6
-rwxr-xr-xBuildTools/Scripts/travis/build.sh8
-rwxr-xr-xBuildTools/Scripts/travis/build_install.sh8
3 files changed, 13 insertions, 9 deletions
diff --git a/BuildTools/Scripts/travis/before_install.sh b/BuildTools/Scripts/travis/before_install.sh
index d5623aaf..270b582f 100755
--- a/BuildTools/Scripts/travis/before_install.sh
+++ b/BuildTools/Scripts/travis/before_install.sh
@@ -2,7 +2,7 @@ CMAKE_VERSION="3.15.4"
VULKAN_SDK_VER="1.1.101.0"
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
- wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
+ wget --no-check-certificate https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz &&
tar -xzf cmake-${CMAKE_VERSION}-Darwin-x86_64.tar.gz
export PATH=$PWD/cmake-${CMAKE_VERSION}-Darwin-x86_64/CMake.app/Contents/bin:$PATH
cmake --version
@@ -26,8 +26,8 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
# Download a recent cmake
mkdir $HOME/usr
export PATH="$HOME/usr/bin:$PATH"
- wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh
- chmod +x cmake-${CMAKE_VERSION}-Linux-x86_64.sh
+ wget https://github.com/Kitware/CMake/releases/download/v${CMAKE_VERSION}/cmake-${CMAKE_VERSION}-Linux-x86_64.sh &&
+ chmod +x cmake-${CMAKE_VERSION}-Linux-x86_64.sh &&
./cmake-${CMAKE_VERSION}-Linux-x86_64.sh --prefix=$HOME/usr --exclude-subdir --skip-license
cmake --version
sudo apt-get update
diff --git a/BuildTools/Scripts/travis/build.sh b/BuildTools/Scripts/travis/build.sh
index 391100ac..f0097a29 100755
--- a/BuildTools/Scripts/travis/build.sh
+++ b/BuildTools/Scripts/travis/build.sh
@@ -2,15 +2,17 @@ mkdir build
cd build
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
- cmake .. -G "Unix Makefiles" $1 -DCMAKE_BUILD_TYPE=${CONFIG}
+ cmake .. -G "Unix Makefiles" $1 -DCMAKE_BUILD_TYPE=${CONFIG} &&
cmake --build .
+ # We must return now because otherwise the following if... command will reset the error code
+ return
fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$IOS" = "true" ]; then
- cmake .. -DCMAKE_TOOLCHAIN_FILE=../DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=SIMULATOR64 $1 -G "Xcode"
+ cmake .. -DCMAKE_TOOLCHAIN_FILE=../DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=SIMULATOR64 $1 -G "Xcode" || return
else
- cmake .. $1 -G "Xcode"
+ cmake .. $1 -G "Xcode" || return
fi
xcodebuild -configuration ${CONFIG} | xcpretty && return ${PIPESTATUS[0]}
fi
diff --git a/BuildTools/Scripts/travis/build_install.sh b/BuildTools/Scripts/travis/build_install.sh
index b2105d25..15ff397e 100755
--- a/BuildTools/Scripts/travis/build_install.sh
+++ b/BuildTools/Scripts/travis/build_install.sh
@@ -2,15 +2,17 @@ mkdir build
cd build
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
- cmake .. -G "Unix Makefiles" $1 -DCMAKE_BUILD_TYPE=${CONFIG} -DCMAKE_INSTALL_PREFIX=install
+ cmake .. -G "Unix Makefiles" $1 -DCMAKE_BUILD_TYPE=${CONFIG} -DCMAKE_INSTALL_PREFIX=install &&
cmake --build . --target install
+ # We must return now because otherwise the following if... command will reset the error code
+ return
fi
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
if [ "$IOS" = "true" ]; then
- cmake .. $1 -DCMAKE_TOOLCHAIN_FILE=../DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=OS64 -DIOS_ARCH=arm64 -DVULKAN_SDK="$VULKAN_SDK" -DCMAKE_INSTALL_PREFIX=install -G "Xcode"
+ cmake .. $1 -DCMAKE_TOOLCHAIN_FILE=../DiligentCore/ios.toolchain.cmake -DIOS_PLATFORM=OS64 -DIOS_ARCH=arm64 -DVULKAN_SDK="$VULKAN_SDK" -DCMAKE_INSTALL_PREFIX=install -G "Xcode" || return
else
- cmake .. $1 -DCMAKE_INSTALL_PREFIX=install -G "Xcode"
+ cmake .. $1 -DCMAKE_INSTALL_PREFIX=install -G "Xcode" || return
fi
cmake --build . --target install --config ${CONFIG} | xcpretty && return ${PIPESTATUS[0]}
fi