-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildServer.html
253 lines (233 loc) · 9.14 KB
/
buildServer.html
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
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<html>
<style>
body {
background : skyblue ;
}
h1,h3 {
margin : 3px;
margin-left : 0px;
color : #ee4646;
}
th {
background : blue;
color : yellow;
text-align : right;
border : 2px solid white;
padding : 4px;
padding-left: 20px;
}
.go {
background : lightgreen;
border : 4px solid black;
color : blue;
text-align : center;
}
a {
color : black;
line-height : 0px ;
text-decoration : none;
}
a:hover { background-color : cyan ; }
</style>
<script>
// global variables
var checked = { macosx:0 , linux:0 , cygwin:0 , mingw:0 , '2005':0 // platforms
, shared:0 , native:0 , expat:0 , zlib:0 , xmp:0 // libraries
, release:0, '64':0 , configure:0 , tests:0 // build and test
};
var selected = { head: 0 , trunk:0 };
var inputs = false;
var options = false;
function reset() { // set defaults
// first time, initialize the globals
if ( !inputs ) {
inputs = document.getElementsByTagName('input');
options = document.getElementsByTagName('option');
document.getElementById("build").onclick=build
document.getElementById("reset").onclick=reset
}
for ( var i = 0 ; i < inputs.length ; i++ ) {
var input = inputs[i];
input.checked=input.name in checked ;
}
for ( var i = 0 ; i < options.length ; i++ ) {
var option = options[i];
option.selected=option.value in selected ;
}
e();
}
function build() { // user pressed "build"
var E = e();
var OK = E < 60 ;
if ( !OK ) OK = confirm("Build is longer that 60 minutes\nAre you sure?");
if ( OK ) {
alert("build not implemented yet");
}
}
function t(n) { // test input name checked
var result = 0 ;
for ( var i = 0 ; i < inputs.length ; i++ ) {
var input = inputs[i];
if ( input.name == n )
if ( input.checked ) result++;
}
return result;
}
function s(n) { // set input name to checked
for ( var i = 0 ; i < inputs.length ; i++ ) {
var input = inputs[i];
for ( var N = 0 ; N < n.length ; N++ )
if ( input.name == n[N] )
input.checked = true;
}
}
function e() { // estimate the build time in minutes
var E = 0; // estimate of build time
var B = 1; // number of builds
// set required libraries
if ( t('xmp' ) ) s(['expat']);
if ( t('webready') ) s(['curl','libssh','openssl']);
// estimate MSVC
var m = t('2003') + t('2005') + t('2008') + t('2010') + t('2012') + t('2013') + t('2015'); // msvc builds
var M = 4; // msvc build time
if ( t('curl' ) ) M += 5;
if ( t('libssh' ) ) M += 1;
if ( t('openssl') ) M += 15;
E += M * m;
// platforms
if ( t('macosx') || t('linux') ) E += 2;
if ( t('mingw' ) ) E += 4;
if ( t('cygwin') ) E += 3;
// tests
if ( t('tests') ) E *= 1.1;
if ( t('teste') ) E *= 1.1;
if ( t('testx') ) E *= 1.2;
if ( t('testv') ) E *= 1.1;
if ( t('testvw') ) E *= 1.1;
// types of build
B *= t('64') + t('32'); // bits
B *= t('cmake') + t('configure'); // build environment
B *= t('shared') + t('static'); // type of build
B *= t('native') + t('clang'); // compiler
B *= t('release') + t('debug'); // configuration
// overall estimate
E *= B;
// enable/disable "build"
document.getElementsByName('estimate')[0].innerHTML = Math.round(E).toString();
document.getElementsByName('build' )[0].disabled = E == 0 ;
// disable "reset"
var disabled = true ;
for ( var i = 0 ; disabled && i < inputs.length ; i++ )
if ( inputs[i].checked )
disabled = inputs[i].name in checked;
for ( var i = 0 ; disabled && i < options.length ; i++ )
if ( options[i].selected )
disabled = options[i].value in selected;
document.getElementsByName('reset' )[0].disabled = disabled;
return E;
}
</script>
<header>
<title>Exiv2 Build Server</title>
</header>
<body onload="reset()">
<table><tr>
<td><img style="padding:10px;" src="Exiv2Logo.png"></td>
<td><table>
<tr><td valign="baseline"><h1>Build Server</h1></td>
<tr><td><a target="_blank" href="http://exiv2.dyndns.org:8080">http://exiv2.dyndns.org:8080</a></td>
<tr><td valign="baseline"><h3>Website:</h3></td></tr>
<tr><td><a target="_blank" href="http://exiv2.org">http://exiv2.org</a></td>
<tr><td valign="baseline"><h3>Wiki:</h3></td></tr>
<tr><td><a target="_blank" href="http://dev.exiv2.org/projects/exiv2/wiki">http://dev.exiv2.org/projects/exiv2/wiki</a></td>
</tr></table>
</td></tr></table>
<table padding="12" border="0">
<tr><td colspan=10><hr></td></tr>
<tr>
<th>Branch:</th><td><select onclick="e()">
<option value="conversions" >Conversions</option>
<option value="jenkins" >Jenkins</option>
<option value="trunk" >Trunk</option>
<option value="videowrite" >Videowrite</option>
<option value="videorefactoring">Video-refactoring</option>
</select></td>
<th>Revision:</th>
<td><select onclick="e()">
<option value="head">HEAD</option>
<option value="revision">Revision...</option>
<option value="date">Date...</option>
</select></td>
<th>Email: </th>
<td colspan="3"><input name="email" type="text" size="40" name="email"></td>
<th colspan="2" class="go">
Estimate: <span name="estimate">8</span> minutes
<br><button type="button" id="build" name="build">Build</button>
<br><button type="button" id="reset" name="reset">Reset</button>
</th>
</tr>
<tr><td colspan=10><hr></td></tr>
<tr>
<th>Library:</th>
<td><input type="checkbox" onclick="e()" name="shared" >shared/dll</input>
<br><input type="checkbox" onclick="e()" name="static" >static</input>
</td>
<th>Bits:</th>
<td><input type="checkbox" onclick="e()" name="64" >64</input>
<br><input type="checkbox" onclick="e()" name="32" >32</input>
</td>
<th>Build<br>Environment:</th>
<td><input type="checkbox" onclick="e()" name="configure">configure</input>
<br><input type="checkbox" onclick="e()" name="cmake" >cmake</input>
</td>
<th>Kind:</th>
<td><input type="checkbox" onclick="e()" name="release" >release</input>
<br><input type="checkbox" onclick="e()" name="debug" >debug</input>
</td>
<th>Compiler:</th>
<td><input type="checkbox" onclick="e()" name="native" >platform</input>
<br><input type="checkbox" onclick="e()" name="clang" >clang </input>
</td>
</tr>
<tr><td colspan=10><hr></td></tr>
<tr>
<th>Platform:</th>
<td><input type="checkbox" onclick="e()" name="linux" >linux</input>
<br><input type="checkbox" onclick="e()" name="macosx" >macos-x</input>
<br><input type="checkbox" onclick="e()" name="cygwin" >cygwin</input>
<br><input type="checkbox" onclick="e()" name="mingw" >mingw</input>
</td>
<th>MSVC:</th>
<td><input type="checkbox" onclick="e()" name="2003" >2003</input>
<br><input type="checkbox" onclick="e()" name="2005" >2005</input>
<br><input type="checkbox" onclick="e()" name="2008" >2008</input>
<br><input type="checkbox" onclick="e()" name="2010" >2010</input>
<br><input type="checkbox" onclick="e()" name="2012" >2012</input>
<br><input type="checkbox" onclick="e()" name="2013" >2013</input>
<br><input type="checkbox" onclick="e()" name="2015" >2015</input>
</td>
<th>Link:</th>
<td><input type="checkbox" onclick="e()" name="zlib" >zlib</input>
<br><input type="checkbox" onclick="e()" name="expat" >expat</input>
<br><input type="checkbox" onclick="e()" name="curl" >curl</input>
<br><input type="checkbox" onclick="e()" name="libssh" >libssh</input>
<br><input type="checkbox" onclick="e()" name="openssl" >openssl</input>
</td>
<th>Options: </th>
<td><input type="checkbox" onclick="e()" name="xmp" >xmp</input>
<br><input type="checkbox" onclick="e()" name="webready" >webready</input>
<br><input type="checkbox" onclick="e()" name="video" >video</input>
<br><input type="checkbox" onclick="e()" name="nls" >localization</input>
</td>
<th>Tests: </th>
<td><input type="checkbox" onclick="e()" name="tests" >tests</input>
<br><input type="checkbox" onclick="e()" name="teste" >teste</input>
<br><input type="checkbox" onclick="e()" name="testx" >testx</input>
<br><input type="checkbox" onclick="e()" name="testv" >testv</input>
<br><input type="checkbox" onclick="e()" name="testvw" >testvw</input>
</td>
</tr>
<tr><td colspan=10><hr></td></tr>
</table>
</body>
</html>