-
Notifications
You must be signed in to change notification settings - Fork 8
/
Jenkinsfile
58 lines (57 loc) · 1.13 KB
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!groovy
pipeline {
agent none
stages {
stage('Prepare') {
agent {
label 'docker'
}
steps {
// Jenkins will automatically check out the source
sh 'git submodule update --init'
sh '''
rm -rf aseba
git clone https://github.com/aseba-community/aseba.git --depth=1 --single-branch
'''
// Fixme: Stashed source includes .git otherwise submodule update fails
stash includes: 'molole/**,cmake-microchip/**,aseba/**', name: 'externals'
}
}
stage('Compile') {
agent {
dockerfile true
}
steps {
unstash 'externals'
// no dir('build') due to JENKINS-33510
sh '''
mkdir -p build && cd build
cmake -DASEBA_DIR=$PWD/../aseba ..
make
'''
stash includes: 'build/**', name: 'build'
}
}
stage('Test') {
agent { dockerfile true }
steps {
unstash 'externals'
unstash 'build'
// no dir('build') due to JENKINS-33510
sh '''
mkdir -p build && cd build
LANG=C ctest
'''
}
}
stage('Archive') {
agent any
steps {
unstash 'build'
dir('build') {
archiveArtifacts 'aseba-target-thymio2*'
}
}
}
}
}