Add build timeout (#317)

This commit is contained in:
Emil Axelsson
2017-05-24 15:52:14 +02:00
committed by GitHub
parent 752081d31b
commit 788d5f4b04
Vendored
+44 -38
View File
@@ -25,50 +25,56 @@ echo flags
stage('Build') {
parallel linux: {
node('linux') {
checkout scm
sh 'git submodule update --init --recursive'
sh '''
mkdir -p build
cd build
cmake .. ''' +
flags + ''' ..
make
'''
timeout(time: 30, unit: 'MINUTES') {
node('linux') {
checkout scm
sh 'git submodule update --init --recursive'
sh '''
mkdir -p build
cd build
cmake .. ''' +
flags + ''' ..
make
'''
}
}
},
windows: {
node('windows') {
checkout scm
bat '''
git submodule update --init --recursive
if not exist "build" mkdir "build"
cd build
cmake -G "Visual Studio 14 2015 Win64" .. ''' +
flags + ''' ..
msbuild.exe OpenSpace.sln /m:8 /p:Configuration=Debug
'''
timeout(time: 30, unit: 'MINUTES') {
node('windows') {
checkout scm
bat '''
git submodule update --init --recursive
if not exist "build" mkdir "build"
cd build
cmake -G "Visual Studio 14 2015 Win64" .. ''' +
flags + ''' ..
msbuild.exe OpenSpace.sln /m:8 /p:Configuration=Debug
'''
}
}
},
osx: {
node('osx') {
checkout scm
sh 'git submodule update --init --recursive'
sh '''
export PATH=${PATH}:/usr/local/bin:/Applications/CMake.app/Contents/bin
export CMAKE_BUILD_TOOL=/Applications/CMake.app/Contents/bin/CMake
srcDir=$PWD
if [ ! -d ${srcDir} ]; then
mkdir ${srcDir}
fi
if [ ! -d ${srcDir}/build ]; then
mkdir ${srcDir}/build
fi
cd ${srcDir}/build
/Applications/CMake.app/Contents/bin/cmake -G Xcode -D NASM=/usr/local/Cellar/nasm/2.11.08/bin/nasm ${srcDir} .. ''' +
flags + '''
xcodebuild
'''
timeout(time: 30, unit: 'MINUTES') {
node('osx') {
checkout scm
sh 'git submodule update --init --recursive'
sh '''
export PATH=${PATH}:/usr/local/bin:/Applications/CMake.app/Contents/bin
export CMAKE_BUILD_TOOL=/Applications/CMake.app/Contents/bin/CMake
srcDir=$PWD
if [ ! -d ${srcDir} ]; then
mkdir ${srcDir}
fi
if [ ! -d ${srcDir}/build ]; then
mkdir ${srcDir}/build
fi
cd ${srcDir}/build
/Applications/CMake.app/Contents/bin/cmake -G Xcode -D NASM=/usr/local/Cellar/nasm/2.11.08/bin/nasm ${srcDir} .. ''' +
flags + '''
xcodebuild
'''
}
}
}
}