forked from dotnet/machinelearning
-
Notifications
You must be signed in to change notification settings - Fork 0
/
netci.groovy
45 lines (36 loc) · 1.47 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
// Import the utility functionality.
import jobs.generation.ArchivalSettings;
import jobs.generation.Utilities;
def project = GithubProject
def branch = GithubBranchName
['OSX10.13'].each { os ->
['Debug', 'Release'].each { config ->
[true, false].each { isPR ->
// Calculate job name
def jobName = os.toLowerCase() + '_' + config.toLowerCase()
def machineAffinity = 'latest-or-auto'
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
steps {
shell("./build.sh -$config")
shell("./build.sh -$config -runtests")
shell("./build.sh -buildPackages")
}
}
Utilities.setMachineAffinity(newJob, os, machineAffinity)
Utilities.standardJobSetup(newJob, project, isPR, "*/${branch}")
if (isPR) {
Utilities.addGithubPRTriggerForBranch(newJob, branch, "$os $config")
}
else {
Utilities.addGithubPushTrigger(newJob)
}
Utilities.addMSTestResults(newJob, 'bin/**/*.trx')
def archiveSettings = new ArchivalSettings()
archiveSettings.addFiles('bin/**/*')
archiveSettings.excludeFiles('bin/obj/**')
archiveSettings.setFailIfNothingArchived()
archiveSettings.setArchiveOnFailure()
Utilities.addArchival(newJob, archiveSettings)
}
}
}