-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfile
64 lines (63 loc) · 2.31 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
59
60
61
62
63
64
pipeline {
parameters {
choice(name: 'ARCHITECTURE_FILTER', choices: ['all', 'amd64', 'i386'], description: 'Run on specific architecture')
}
agent none
stages {
stage('BuildAndTest') {
matrix {
agent {
label "${ARCHITECTURE} && bsd"
}
when { anyOf {
expression { params.ARCHITECTURE_FILTER == 'all' }
expression { params.ARCHITECTURE_FILTER == env.ARCHITECTURE }
} }
axes {
axis {
name 'ARCHITECTURE'
values 'amd64', 'i386'
}
}
stages {
stage('Prepare') {
environment {
MAKEOBJDIRPREFIX = "${env.WORKSPACE}/obj"
}
steps {
echo "Prepare for ${ARCHITECTURE}"
sh "mkdir -p ${MAKEOBJDIRPREFIX}"
sh 'make clean'
}
}
stage('buildworld') {
environment {
MAKEOBJDIRPREFIX = "${env.WORKSPACE}/obj"
}
steps {
catchError(buildResult: 'SUCCESS', stageResult: 'FAILURE') {
echo "Do buildworld for ${ARCHITECTURE}"
sh 'make -j5 buildworld'
}
}
}
stage('buildkernel') {
environment {
MAKEOBJDIRPREFIX = "${env.WORKSPACE}/obj"
}
steps {
echo "Do buildkernel for ${ARCHITECTURE}"
sh 'make -j5 buildkernel'
}
}
stage('tests') {
steps {
echo "Do tests for ${ARCHITECTURE}"
sh 'kyua test -k tests/Kyuafile'
}
}
}
}
}
}
}