Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2019-09-23 16:42:10 +0300
committerAlexander Köplinger <alex.koeplinger@outlook.com>2019-09-23 16:42:36 +0300
commit6ad929c317f988c07765b61c45ad61168a6de276 (patch)
tree4f3b2de037efb6706b973f32086b5590df3902f3 /scripts/ci
parent1a8cc981607c6e7380257df807d62fbc35b877e5 (diff)
[ci] Build iOS/Mac Mono sdks archive using Xcode 11
This was requested by the xamarin-macios team.
Diffstat (limited to 'scripts/ci')
-rw-r--r--scripts/ci/pipeline/sdks-archive.groovy46
-rwxr-xr-xscripts/ci/run-jenkins.sh10
2 files changed, 34 insertions, 22 deletions
diff --git a/scripts/ci/pipeline/sdks-archive.groovy b/scripts/ci/pipeline/sdks-archive.groovy
index 997a0cfdc1b..43b0e53f061 100644
--- a/scripts/ci/pipeline/sdks-archive.groovy
+++ b/scripts/ci/pipeline/sdks-archive.groovy
@@ -1,8 +1,6 @@
isPr = (env.ghprbPullId && !env.ghprbPullId.empty ? true : false)
monoBranch = (isPr ? "pr" : env.BRANCH_NAME)
jobName = env.JOB_NAME.split('/').first()
-xcode11 = (jobName == "archive-mono-xcode11" ? true : false)
-azureContainerName = (xcode11 ? "mono-sdks-xcode11" : "mono-sdks")
if (monoBranch == 'master') {
properties([ /* compressBuildLog() */ // compression is incompatible with JEP-210 right now
@@ -18,7 +16,6 @@ if (monoBranch == 'master') {
parallel (
"Android Darwin (Debug)": {
- if (xcode11) return
throttle(['provisions-android-toolchain']) {
node ("osx-devices") {
archive ("android", "debug", "Darwin")
@@ -26,7 +23,6 @@ parallel (
}
},
"Android Darwin (Release)": {
- if (xcode11) return
throttle(['provisions-android-toolchain']) {
node ("osx-devices") {
archive ("android", "release", "Darwin")
@@ -34,7 +30,6 @@ parallel (
}
},
"Android Windows (Release)": {
- if (xcode11) return
throttle(['provisions-android-toolchain']) {
node ("w64") {
archive ("android", "release", "Windows")
@@ -42,7 +37,6 @@ parallel (
}
},
"Android Linux (Debug)": {
- if (xcode11) return
throttle(['provisions-android-toolchain']) {
node ("debian-10-amd64-exclusive") {
archive ("android", "debug", "Linux", "debian-10-amd64multiarchi386-preview", "g++-mingw-w64 gcc-mingw-w64 lib32stdc++6 lib32z1 libz-mingw-w64-dev linux-libc-dev:i386 zlib1g-dev zlib1g-dev:i386 zulu-8 rsync python3-pip", "/mnt/scratch")
@@ -50,24 +44,23 @@ parallel (
}
},
"Android Linux (Release)": {
- if (xcode11) return
throttle(['provisions-android-toolchain']) {
node ("debian-10-amd64-exclusive") {
archive ("android", "release", "Linux", "debian-10-amd64multiarchi386-preview", "g++-mingw-w64 gcc-mingw-w64 lib32stdc++6 lib32z1 libz-mingw-w64-dev linux-libc-dev:i386 zlib1g-dev zlib1g-dev:i386 zulu-8 rsync python3-pip", "/mnt/scratch")
}
}
},
- "iOS": {
+ "iOS (Xcode 11)": {
throttle(['provisions-ios-toolchain']) {
- node (xcode11 ? "xcode11" : "osx-devices") {
- archive ("ios", "release", "Darwin")
+ node ("xcode11") {
+ archive ("ios", "release", "Darwin", "", "", "xcode11")
}
}
},
- "Mac": {
+ "Mac (Xcode 11)": {
throttle(['provisions-mac-toolchain']) {
- node (xcode11 ? "xcode11" : "osx-devices") {
- archive ("mac", "release", "Darwin")
+ node ("xcode11") {
+ archive ("mac", "release", "Darwin", "", "", "xcode11")
}
}
},
@@ -81,10 +74,14 @@ parallel (
}
)
-def archive (product, configuration, platform, chrootname = "", chrootadditionalpackages = "", chrootBindMounts = "") {
+def archive (product, configuration, platform, chrootname = "", chrootadditionalpackages = "", chrootBindMounts = "", xcodeVersion = "") {
def packageFileName = null
def packageFileSha1 = null
def commitHash = null
+ def commitContext = (xcodeVersion == "" ? "Archive-${product}-${configuration}-${platform}" : "Archive-${product}-${configuration}-${platform}-${xcodeVersion}")
+ def azureArtifactUrl = null
+ def azureContainerName = "mono-sdks"
+ def azureVirtualPath = null
def utils = null
ws ("workspace/${jobName}/${monoBranch}/${product}/${configuration}") {
@@ -112,7 +109,7 @@ def archive (product, configuration, platform, chrootname = "", chrootadditional
}
try {
stage('Build') {
- utils.reportGitHubStatus (isPr ? env.ghprbActualCommit : commitHash, "Archive-${product}-${configuration}-${platform}${xcode11 ? '-xcode11' : ''}", env.BUILD_URL, 'PENDING', 'Building...')
+ utils.reportGitHubStatus (isPr ? env.ghprbActualCommit : commitHash, commitContext, env.BUILD_URL, 'PENDING', 'Building...')
// build the Archive
timeout (time: 300, unit: 'MINUTES') {
@@ -120,14 +117,14 @@ def archive (product, configuration, platform, chrootname = "", chrootadditional
def brewpackages = "autoconf automake ccache cmake coreutils gdk-pixbuf gettext glib gnu-sed gnu-tar intltool ios-deploy jpeg libffi libidn2 libpng libtiff libtool libunistring ninja openssl p7zip pcre pkg-config scons wget xz mingw-w64 make xamarin/xamarin-android-windeps/mingw-zlib"
sh "brew tap xamarin/xamarin-android-windeps"
sh "brew install ${brewpackages} || brew upgrade ${brewpackages}"
- sh "CI_TAGS=sdks-${product},no-tests,${configuration}${xcode11 ? ',xcode11' : ''} scripts/ci/run-jenkins.sh"
+ sh "CI_TAGS=sdks-${product},no-tests,${configuration},${xcodeVersion} scripts/ci/run-jenkins.sh"
} else if (platform == "Linux") {
chroot chrootName: chrootname,
command: "CI_TAGS=sdks-${product},no-tests,${configuration} ANDROID_TOOLCHAIN_DIR=/mnt/scratch/android-toolchain ANDROID_TOOLCHAIN_CACHE_DIR=/mnt/scratch/android-archives scripts/ci/run-jenkins.sh",
bindMounts: chrootBindMounts,
additionalPackages: "xvfb xauth mono-devel git python wget bc build-essential libtool autoconf automake gettext iputils-ping cmake lsof libkrb5-dev curl p7zip-full ninja-build zip unzip gcc-multilib g++-multilib mingw-w64 binutils-mingw-w64 ${chrootadditionalpackages}"
} else if (platform == "Windows") {
- sh "PATH=\"/usr/bin:/usr/local/bin:$PATH\" CI_TAGS=sdks-${product},win-amd64,no-tests,${configuration} scripts/ci/run-jenkins.sh"
+ sh "PATH=\"/usr/bin:/usr/local/bin:$PATH\" CI_TAGS=sdks-${product},win-amd64,no-tests,${configuration},${xcodeVersion} scripts/ci/run-jenkins.sh"
} else {
throw new Exception("Unknown platform \"${platform}\"")
}
@@ -138,12 +135,21 @@ def archive (product, configuration, platform, chrootname = "", chrootadditional
// compute SHA1 of the Archive
packageFileSha1 = sha1 (packageFileName)
writeFile (file: "${packageFileName}.sha1", text: "${packageFileSha1}")
+
+ // include xcode version in virtual path if necessary
+ if (xcodeVersion == "") {
+ azureVirtualPath = ""
+ azureArtifactUrl = "https://xamjenkinsartifact.azureedge.net/${azureContainerName}/${packageFileName}"
+ } else {
+ azureVirtualPath = "${xcodeVersion}-" + readFile ("xcode_version.txt")
+ azureArtifactUrl = "https://xamjenkinsartifact.azureedge.net/${azureContainerName}/${azureVirtualPath}/${packageFileName}"
+ }
}
stage('Upload Archive to Azure') {
azureUpload(storageCredentialId: "fbd29020e8166fbede5518e038544343",
storageType: "blobstorage",
containerName: azureContainerName,
- virtualPath: "",
+ virtualPath: azureVirtualPath,
filesPath: "${packageFileName},${packageFileName}.sha1",
allowAnonymousAccess: true,
pubAccessible: true,
@@ -153,10 +159,10 @@ def archive (product, configuration, platform, chrootname = "", chrootadditional
sh 'git clean -xdff'
- utils.reportGitHubStatus (isPr ? env.ghprbActualCommit : commitHash, "Archive-${product}-${configuration}-${platform}${xcode11 ? '-xcode11' : ''}", "https://xamjenkinsartifact.azureedge.net/${azureContainerName}/${packageFileName}", 'SUCCESS', packageFileName)
+ utils.reportGitHubStatus (isPr ? env.ghprbActualCommit : commitHash, commitContext, azureArtifactUrl, 'SUCCESS', packageFileName)
}
catch (Exception e) {
- utils.reportGitHubStatus (isPr ? env.ghprbActualCommit : commitHash, "Archive-${product}-${configuration}-${platform}${xcode11 ? '-xcode11' : ''}", env.BUILD_URL, 'FAILURE', "Build failed.")
+ utils.reportGitHubStatus (isPr ? env.ghprbActualCommit : commitHash, commitContext, env.BUILD_URL, 'FAILURE', "Build failed.")
throw e
}
}
diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh
index cce907389d8..d376b333db8 100755
--- a/scripts/ci/run-jenkins.sh
+++ b/scripts/ci/run-jenkins.sh
@@ -174,7 +174,7 @@ fi
if [[ ${CI_TAGS} == *'sdks-ios'* ]];
then
- # configuration on our bots: https://github.com/mono/mono/pull/11691#issuecomment-439178459
+ # configuration on our bots
if [[ ${CI_TAGS} == *'xcode11'* ]]; then
export XCODE_DIR=/Applications/Xcode11.app/Contents/Developer
export MACOS_VERSION=10.15
@@ -191,6 +191,9 @@ if [[ ${CI_TAGS} == *'sdks-ios'* ]];
export WATCHOS64_32_VERSION=5.1
fi
+ # retrieve selected Xcode version
+ /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' ${XCODE_DIR}/Contents/version.plist > xcode_version.txt
+
# make sure we embed the correct path into the PDBs
export MONOTOUCH_MCS_FLAGS=-pathmap:${MONO_REPO_ROOT}/=/Library/Frameworks/Xamarin.iOS.framework/Versions/Current/src/Xamarin.iOS/
@@ -233,7 +236,7 @@ fi
if [[ ${CI_TAGS} == *'sdks-mac'* ]];
then
- # configuration on our bots: https://github.com/mono/mono/pull/11691#issuecomment-439178459
+ # configuration on our bots
if [[ ${CI_TAGS} == *'xcode11'* ]]; then
export XCODE_DIR=/Applications/Xcode11.app/Contents/Developer
export MACOS_VERSION=10.15
@@ -242,6 +245,9 @@ then
export MACOS_VERSION=10.14
fi
+ # retrieve selected Xcode version
+ /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' ${XCODE_DIR}/Contents/version.plist > xcode_version.txt
+
# make sure we embed the correct path into the PDBs
export XAMMAC_MCS_FLAGS=-pathmap:${MONO_REPO_ROOT}/=/Library/Frameworks/Xamarin.Mac.framework/Versions/Current/src/Xamarin.Mac/