dotnet-installer/netci.groovy
Sridhar Periyasamy 1db27b7ae3 Enable building dotnet-CLI for centos.
I had to patch up a redhat dnx package which supports NETStandard.Library package. It is currently uploaded to dotnet-cli blob storage. This hack will no longer be required when we move to xplat nuget to do 'dotnet restore'. Apart from this there are three issues that are tracked for centos.
- compile-native not yet supported - https://github.com/dotnet/cli/issues/453
- dnu restore crashes intermittently on centos. I need to investigate this a little bit more and file issues on dnx or coreclr. This will make our CI builds very flaky.
- Dotnet restore does not restore native shims when using “centos.7-x64” - https://github.com/dotnet/corefx/issues/5066
2015-12-18 11:32:20 -08:00

77 lines
No EOL
2.4 KiB
Groovy

// Copyright (c) .NET Foundation and contributors. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
// Import the utility functionality.
import jobs.generation.Utilities;
def project = GithubProject
def osList = ['Ubuntu', 'OSX', 'Windows_NT', 'CentOS7.1']
def machineLabelMap = ['Ubuntu':'ubuntu-doc',
'OSX':'mac',
'Windows_NT':'windows',
'CentOS7.1' : 'centos-71']
def static getBuildJobName(def configuration, def os) {
return configuration.toLowerCase() + '_' + os.toLowerCase()
}
[true, false].each { isPR ->
['Debug', 'Release'].each { configuration ->
osList.each { os ->
// Calculate names
def lowerConfiguration = configuration.toLowerCase()
// Calculate job name
def jobName = getBuildJobName(configuration, os)
def buildCommand = '';
def postBuildCommand = '';
// Calculate the build command
if (os == 'Windows_NT') {
buildCommand = ".\\scripts\\ci_build.cmd ${lowerConfiguration}"
}
else {
buildCommand = "./scripts/ci_build.sh ${lowerConfiguration}"
}
def newJob = job(Utilities.getFullJobName(project, jobName, isPR)) {
// Set the label.
label(machineLabelMap[os])
steps {
if (os == 'Windows_NT') {
// Batch
batchFile(buildCommand)
}
else {
// Shell
shell(buildCommand)
// Post Build Cleanup
publishers {
postBuildScripts {
steps {
shell(postBuildCommand)
}
onlyIfBuildSucceeds(false)
}
}
}
}
}
Utilities.standardJobSetup(newJob, project, isPR)
if (isPR) {
Utilities.addGithubPRTrigger(newJob, "${os} ${configuration} Build")
}
else {
Utilities.addGithubPushTrigger(newJob)
}
}
}
}