-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
97 lines (85 loc) · 2.64 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
91
92
93
94
95
96
/*
def axisBench = ["cilk","rust"] // etc...
def tasks = [:]
// Come on, a "scripting" language w/out foreach iterators?
for(int i=0; i< axisBench.size(); i++) {
// Weird, string interpolation, but strangely LIMITED?:
def axisBenchValue = axisBench[i]
tasks["${axisBenchValue}"] =
// node(axisBenchValue)
{
println "Running test ${axisBenchValue}"
// sh "echo Running test ${axisBenchValue}"
}
}
*/
def jobs = ["haskell", "cilk", "rust", "racket", "manticore", "java-forkjoin", "charm", "chapel", "x10", "pthread"]
def parallelStagesMap = jobs.collectEntries {
["${it}" : generateStage(it)]
}
def generateStage(job) {
return {
stage("stage: ${job}") {
echo "This is ${job}."
sh script: "./thread_sweep.sh ${job}"
}
}
}
pipeline {
agent {
// A node RN & IW manually installed Docker on:
dockerfile /* true */ {
// filename 'Dockerfile.build'
// dir 'build'
label 'hive'
// additionalBuildArgs '--build-arg version=1.0.2'
}
}
stages {
stage('Build') {
steps {
//sh 'cat /etc/issue'
//sh 'make build'
sh 'pwd'
sh 'ls ./bin'
// archiveArtifacts artifacts: 'bin/*', fingerprint: true
}
}
stage ("parallel") {
options {
timeout(time: 60, unit: 'MINUTES')
}
steps {
catchError {
script {
parallel parallelStagesMap
}
}
}
}
// stage("Matrix") {
// parallel tasks
// }
stage('Publish') {
steps {
// sh 'make run-all'
sh 'echo After running tests...'
sh 'ls ./reports/*/'
sh './gather_json.sh'
sh 'bash ./make_plot.sh'
sh "tree reports -H '.' -L 2 --noreport --charset utf-8 > reports/index.html"
archiveArtifacts artifacts: 'reports/**/*', fingerprint: true
// publishHTML([
// allowMissing: false,
// alwaysLinkToLastBuild: false,
// keepAll: false,
// includes: 'reports/**/*',
// reportDir: 'reports',
// reportFiles: 'index.html',
// reportName: 'HTML Report',
// reportTitles: 'Forkbench Results'
// ])
}
}
}
}