Simplify jenkins file and enable integration test

This commit is contained in:
Alexey Sokolov
2016-09-17 18:23:54 +01:00
parent b56ab9106d
commit 2532aca967
Vendored
+15 -25
View File
@@ -1,39 +1,29 @@
#!groovy
node('freebsd') {
// freebsd 10.3 + pkg install git openjdk cmake icu pkgconf swig30 python3
// freebsd 10.3 + pkg install git openjdk cmake icu pkgconf swig30 python3 boost-libs gettext-tools qt5-buildtools qt5-network qt5-qmake
timestamps {
try {
timeout(time: 30, unit: 'MINUTES') {
def srcdir = pwd()
def tmpdir = pwd([tmp: true])
stage('Checkout') {
step([$class: 'WsCleanup'])
checkout scm
sh 'git submodule update --init --recursive'
}
timeout(time: 30, unit: 'MINUTES') {
def srcdir = pwd()
def tmpdir = pwd([tmp: true])
stage('Checkout') {
step([$class: 'WsCleanup'])
checkout scm
sh 'git submodule update --init --recursive'
}
dir("$tmpdir/build") {
stage('Build') {
dir("$tmpdir/build") {
sh "cmake $srcdir -DWANT_PERL=ON -DWANT_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$tmpdir/install-prefix"
sh 'make VERBOSE=1 all'
}
sh "cmake $srcdir -DWANT_PERL=ON -DWANT_PYTHON=ON -DCMAKE_INSTALL_PREFIX=$tmpdir/install-prefix"
sh 'make VERBOSE=1 all'
}
stage('Unit test') {
dir("$tmpdir/build") {
sh 'make unittest'
}
sh 'make unittest'
}
stage('Integration test') {
dir("$tmpdir/build") {
sh 'make install'
// TODO: run make inttest
}
sh 'make install'
sh 'make inttest'
}
}
currentBuild.result = 'SUCCESS'
} catch (err) {
echo "Error: ${err}"
currentBuild.result = 'FAILURE'
}
}
}