This repository has been archived by the owner on May 15, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
JenkinsfileBCrypt
206 lines (189 loc) · 6.38 KB
/
JenkinsfileBCrypt
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
pipeline {
agent any
options {
timeout(time: 1, unit: 'HOURS')
disableConcurrentBuilds()
}
triggers {
cron 'H H/6 * * *'
}
stages {
stage('Prepare Testdata') {
steps {
echo 'Prepare results folders'
sh '''
mkdir -p results/Haxe-3
mkdir -p results/Haxe-4
mkdir -p results/Haxe-nightly
'''
}
}
stage('Prepare build folders') {
steps {
echo 'Preparing build folders for Haxe 3'
sh '''
cd versions/Haxe-3
ln -sfn ../../benchmarkBCrypt.sh benchmark.sh
ln -sfn ../../installAndCompileHxcpp.sh .
ln -sfn ../../build
ln -sfn ../../buildAllBCrypt.hxml buildAll.hxml
ln -sfn ../../buildConvertCsv.hxml
ln -sfn ../../haxe3_libraries/ haxe_libraries
ln -sfn ../../haxelib.json .
ln -sfn ../../data data
ln -sfn /home/benchmarkdata/crypto-benchmark/BCrypt/Haxe-3 results
ln -sfn ../../src
'''
echo 'Preparing build folders for Haxe 4'
sh '''
cd versions/Haxe-4
ln -sfn ../../benchmarkBCrypt.sh benchmark.sh
ln -sfn ../../installAndCompileHxcpp.sh .
ln -sfn ../../build
ln -sfn ../../buildAllBCrypt.hxml buildAll.hxml
ln -sfn ../../buildConvertCsv.hxml
ln -sfn ../../haxe_libraries/ haxe_libraries
ln -sfn ../../haxelib.json .
ln -sfn ../../data data
ln -sfn /home/benchmarkdata/crypto-benchmark/BCrypt/Haxe-4 results
ln -sfn ../../src
'''
echo 'Preparing build folders for Haxe nightly'
sh '''
cd versions/Haxe-nightly
ln -sfn ../../benchmarkBCrypt.sh benchmark.sh
ln -sfn ../../installAndCompileHxcpp.sh .
ln -sfn ../../build
ln -sfn ../../buildAllBCrypt.hxml buildAll.hxml
ln -sfn ../../buildConvertCsv.hxml
ln -sfn ../../haxe_libraries/ haxe_libraries
ln -sfn ../../haxelib.json .
ln -sfn ../../data data
ln -sfn /home/benchmarkdata/crypto-benchmark/BCrypt/Haxe-nightly results
ln -sfn ../../src
'''
}
}
stage('Update lix dependencies') {
steps {
echo 'Update lix dependencies for Haxe 3'
sh '''
cd versions/Haxe-3
lix download
lix install github:HaxeFoundation/hxcpp
lix install github:HaxeFoundation/crypto
'''
echo 'Update lix dependencies for Haxe 4'
sh '''
cd versions/Haxe-4
lix download
lix install github:HaxeFoundation/hxcpp
lix install github:HaxeFoundation/crypto
'''
echo 'Update lix dependencies for Haxe nightly'
sh '''
cd versions/Haxe-nightly
lix download haxe nightly
lix use haxe nightly
lix download
lix install github:HaxeFoundation/hxcpp
lix install github:HaxeFoundation/crypto
'''
echo 'Compile hxcpp build tool'
sh '''
echo "y" | lix run hxcpp run 2> /dev/null || true
'''
}
}
stage('Build Haxe 3') {
steps {
echo 'Build targets for Haxe 3'
sh '''
cd versions/Haxe-3
./build.sh
'''
}
}
stage('Build Haxe 4') {
steps {
echo 'Build targets for Haxe 4'
sh '''
cd versions/Haxe-4
./build.sh
'''
}
}
stage('Build Haxe nightly') {
steps {
echo 'Build targets for Haxe nightly'
sh '''
cd versions/Haxe-nightly
./build.sh
'''
}
}
stage('Run Haxe 3 benchmarks') {
steps {
echo 'Run benchmarks for Haxe 3'
sh '''
cd versions/Haxe-3
readonly VER=`haxe -version`
echo "Running Haxe $VER benchmark"
./installAndCompileHxcpp.sh
./benchmark.sh | tee results.csv
'''
}
}
stage('Run Haxe 4 benchmarks') {
steps {
echo 'Run benchmarks for Haxe 4'
sh '''
cd versions/Haxe-4
readonly VER=`haxe -version`
echo "Running Haxe $VER benchmark"
./installAndCompileHxcpp.sh
./benchmark.sh | tee results.csv
'''
}
}
stage('Run Haxe nightly benchmarks') {
steps {
echo 'Run benchmarks for Haxe nightly'
sh '''
cd versions/Haxe-nightly
readonly VER=`haxe -version`
echo "Running Haxe $VER benchmark"
./installAndCompileHxcpp.sh
./benchmark.sh | tee results.csv
'''
}
}
stage('Convert results for Haxe 3') {
steps {
echo 'Convert results for Haxe 3'
sh '''
cd versions/Haxe-3
haxe buildConvertCsv.hxml
'''
}
}
stage('Convert results for Haxe 4') {
steps {
echo 'Convert results for Haxe 4'
sh '''
cd versions/Haxe-4
haxe buildConvertCsv.hxml
'''
}
}
stage('Convert results for Haxe nightly') {
steps {
echo 'Convert results for Haxe nightly'
sh '''
cd versions/Haxe-nightly
haxe buildConvertCsv.hxml
'''
}
}
}
}