forked from microsoft/xunit-performance
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnetci.groovy
61 lines (49 loc) · 1.83 KB
/
netci.groovy
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
// Import the utility functionality.
import jobs.generation.Utilities;
// **************************
// Define code coverage build
// **************************
def project = 'Microsoft/xunit-performance'
// Define build string
def debugBuildString = '''call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat" && CIBuild /debug'''
def releaseBuildString = '''call "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\Tools\\VsDevCmd.bat" && CIBuild /release'''
// Generate the builds for debug and release
def windowsDebugJob = job(Utilities.getFullJobName(project, 'debug', false)) {
label('windows')
steps {
batchFile(debugBuildString)
}
}
def windowsReleaseJob = job(Utilities.getFullJobName(project, 'release', false)) {
label('windows')
steps {
batchFile(releaseBuildString)
}
}
def windowsDebugPRJob = job(Utilities.getFullJobName(project, 'debug', true)) {
label('windows')
steps {
batchFile(debugBuildString)
}
}
Utilities.addGithubPRTrigger(windowsDebugPRJob, 'Debug Build')
def windowsReleasePRJob = job(Utilities.getFullJobName(project, 'release', true)) {
label('windows')
steps {
batchFile(releaseBuildString)
}
}
Utilities.addGithubPRTrigger(windowsReleasePRJob, 'Release Build')
[windowsDebugJob, windowsReleaseJob].each { commitJob ->
Utilities.addScm(commitJob, project)
Utilities.addStandardOptions(commitJob)
Utilities.addStandardNonPRParameters(commitJob)
Utilities.addGithubPushTrigger(commitJob)
Utilities.addArchival(commitJob, 'msbuild.log', '', true, false)
}
[windowsDebugPRJob, windowsReleasePRJob].each { PRJob ->
Utilities.addPRTestSCM(PRJob, project)
Utilities.addStandardOptions(PRJob)
Utilities.addStandardPRParameters(PRJob, project)
Utilities.addArchival(PRJob, 'msbuild.log', '', true, false)
}