-
Notifications
You must be signed in to change notification settings - Fork 2
/
Jenkinsfile
90 lines (81 loc) · 2.23 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Tell Jenkins how to build projects from this repository
pipeline {
agent {
label 'performance'
}
parameters {
string(
defaultValue: 'RETE',
description: 'Comma separated list of engines to test (with a single space after each comma).',
name: 'BENCHMARK_ENGINES'
)
string(
defaultValue: 'transitiveSubstatesWithCheck3',
description: 'Comma separated list of queries to test (with a single space after each comma). If empty, all queries are taken into account. Use the value "all" if you want to apply all patterns in one run.',
name: 'BENCHMARK_QUERIES'
)
string(
defaultValue: '',
description: 'Comma separated list of queries to exclude from the benchmark (with a single space after each comma)',
name: 'BENCHMARK_QUERIES_EXCLUDE'
)
string(
defaultValue: '300000',
description: 'Comma separated list of model sizes to test (with a single space after each comma).',
name: 'BENCHMARK_SIZES'
)
string(
defaultValue: '1',
description: 'Number of runs',
name: 'BENCHMARK_RUNS'
)
}
// Keep only the last 15 builds
options {
buildDiscarder(logRotator(numToKeepStr: '5'))
}
tools {
jdk 'OpenJDK 8'
}
stages {
stage('Build') {
steps {
sh '''
# WORKSPACE_BENCHMARK is used as on client-side 3rd applications (e.g. git on Windows)
# overrides the $WORKSPACE variable during their execution
export WORKSPACE_BENCHMARK=$WORKSPACE
rm -rf benhmark/results
rm -rf benhmark/diagrams
cd com.incquerylabs.magicdraw.benchmark
rm -rf results
rm -rf build/dependency-cache
./gradlew clean
./gradlew installDist
'''
}
}
stage('Benchmark') {
steps {
wrap([$class: 'Xvnc']) {
sh '''
export MODEL_LOCATION=/home/jenkins/models-tmt
./com.incquerylabs.magicdraw.benchmark/run.sh
'''
}
}
}
stage('Report') {
steps {
sh './benchmark/dep-mondo-sam.sh'
sh './benchmark/convert_results.sh'
sh 'python3 ./benchmark/merge_csv.py'
sh './benchmark/report.sh'
}
}
}
post {
always {
archiveArtifacts 'com.incquerylabs.magicdraw.benchmark/results/**, benchmark/**'
}
}
}