diff options
Diffstat (limited to 'Jenkinsfile')
-rw-r--r-- | Jenkinsfile | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..2c67bd9 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,36 @@ +node { + stage('Checkout') { + checkout scm + } + + stage('Build') { + if(fileExists('Makefile')) + sh 'make distclean' + sh ''' + qmake + make -j4 + ''' + } + + stage('Build test') { + if(fileExists('tests/unit/Makefile')) + sh ''' + cd tests/unit + make distclean + ''' + sh ''' + cd tests/unit + qmake + make -j4 + ''' + } + + stage('Run tests') { + sh ''' + cd tests/unit + xvfb-run ./unittest --gtest_output=xml:gtestreport.xml + ''' + junit 'tests/unit/*.xml' + } +} + |