Skip to content

Commit

Permalink
[master] Merge Xcode11.5 Support and include provisionator changes
Browse files Browse the repository at this point in the history
New commits in xamarin/maccore:

* xamarin/maccore@4bfce64847 Update README.md
* xamarin/maccore@24682998f7 [devops] Enhance Xcode renaming script (xamarin#2206)
* xamarin/maccore@e03f16b862 [Localization][Mlaunch] Fix watchos timeout issue (xamarin#2196)

Diff: https://github.com/xamarin/maccore/compare/ad1696d6f33badd34f930e4ce1be9185b5a36dd7..4bfce648475f8db1d93b8a9f51a69ad0b8b55930
  • Loading branch information
dalexsoto committed May 21, 2020
1 parent 2c43f9c commit 2cd53a7
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 12 deletions.
6 changes: 3 additions & 3 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,9 @@ WATCHOS_NUGET_VERSION_NO_METADATA=$(WATCHOS_NUGET_VERSION)-$(NUGET_PRERELEASE_ID
WATCHOS_NUGET_VERSION_FULL=$(WATCHOS_NUGET_VERSION_NO_METADATA)+$(NUGET_BUILD_METADATA)

# Xcode version should have both a major and a minor version (even if the minor version is 0)
XCODE_VERSION=11.4
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.4.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode114.app/Contents/Developer
XCODE_VERSION=11.5
XCODE_URL=http://xamarin-storage/bot-provisioning/xcodes/Xcode_11.5.xip
XCODE_DEVELOPER_ROOT=/Applications/Xcode_11.5.0.app/Contents/Developer
XCODE_PRODUCT_BUILD_VERSION:=$(shell /usr/libexec/PlistBuddy -c 'Print :ProductBuildVersion' $(XCODE_DEVELOPER_ROOT)/../version.plist)

# Mono version embedded in XI/XM (NEEDED_MONO_VERSION/BRANCH) are specified in mk/mono.mk
Expand Down
6 changes: 3 additions & 3 deletions Make.versions
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
# line changed in git).
#

IOS_PACKAGE_VERSION=13.21.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=6.21.0.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=13.21.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=6.21.1.$(MAC_COMMIT_DISTANCE)

#
# ** NuGet package version numbers **
Expand All @@ -66,7 +66,7 @@ MAC_PACKAGE_VERSION=6.21.0.$(MAC_COMMIT_DISTANCE)
# WARNING: Do **not** use versions higher than the available Xcode SDK or else we will have issues with mtouch (See https://github.com/xamarin/xamarin-macios/issues/7705)
# When bumping the major macOS version in MACOS_NUGET_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element)

IOS_NUGET_VERSION=13.4.100
IOS_NUGET_VERSION=13.5.100
TVOS_NUGET_VERSION=13.4.100
WATCHOS_NUGET_VERSION=6.2.100
MACOS_NUGET_VERSION=10.15.100
1 change: 1 addition & 0 deletions Versions-ios.plist.in
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<string>13.2</string>
<string>13.3</string>
<string>13.4</string>
<string>13.5</string>
</array>
<key>tvOS</key>
<array>
Expand Down
2 changes: 1 addition & 1 deletion mk/xamarin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MONO_BRANCH := $(shell cd $(MONO_PATH) 2> /dev/null && git symbolic-ref --sho
endif

ifdef ENABLE_XAMARIN
NEEDED_MACCORE_VERSION := ad1696d6f33badd34f930e4ce1be9185b5a36dd7
NEEDED_MACCORE_VERSION := 4bfce648475f8db1d93b8a9f51a69ad0b8b55930
NEEDED_MACCORE_BRANCH := master

MACCORE_DIRECTORY := maccore
Expand Down
2 changes: 2 additions & 0 deletions src/intents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1471,6 +1471,8 @@ public enum INMediaItemType : long {
Music,
[Watch (6,0), iOS (13,0)]
AlgorithmicRadioStation,
[Watch (6,2,1), iOS (13,4,1)]
News,
}

[Watch (5,0), NoMac, iOS (12,0)]
Expand Down
4 changes: 3 additions & 1 deletion tests/introspection/ApiAvailabilityTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,16 @@ public ApiAvailabilityTest ()
};
#elif __WATCHOS__
Minimum = new Version (2,0);
// Need to special case watchOS 'Maximum' version for OS minor subversions (can't change Constants.SdkVersion)
Maximum = new Version (6,2,5);
Filter = (AvailabilityBaseAttribute arg) => {
return (arg.AvailabilityKind != AvailabilityKind.Introduced) || (arg.Platform != PlatformName.WatchOS);
};
#else
Minimum = new Version (10,9);
// Need to special case macOS 'Maximum' version for OS minor subversions (can't change Constants.SdkVersion)
// Please comment the code below if needed
Maximum = new Version (10,15,4);
Maximum = new Version (10,15,5);
Filter = (AvailabilityBaseAttribute arg) => {
return (arg.AvailabilityKind != AvailabilityKind.Introduced) || (arg.Platform != PlatformName.MacOSX);
};
Expand Down
65 changes: 65 additions & 0 deletions tests/xtro-sharpie/iOS-ExposureNotification.ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
!missing-enum! ENAuthorizationStatus not bound
!missing-enum! ENErrorCode not bound
!missing-enum! ENStatus not bound
!missing-field! ENErrorDomain not bound
!missing-selector! +ENManager::authorizationStatus not bound
!missing-selector! ENExposureConfiguration::attenuationLevelValues not bound
!missing-selector! ENExposureConfiguration::attenuationWeight not bound
!missing-selector! ENExposureConfiguration::daysSinceLastExposureLevelValues not bound
!missing-selector! ENExposureConfiguration::daysSinceLastExposureWeight not bound
!missing-selector! ENExposureConfiguration::durationLevelValues not bound
!missing-selector! ENExposureConfiguration::durationWeight not bound
!missing-selector! ENExposureConfiguration::metadata not bound
!missing-selector! ENExposureConfiguration::minimumRiskScore not bound
!missing-selector! ENExposureConfiguration::setAttenuationLevelValues: not bound
!missing-selector! ENExposureConfiguration::setAttenuationWeight: not bound
!missing-selector! ENExposureConfiguration::setDaysSinceLastExposureLevelValues: not bound
!missing-selector! ENExposureConfiguration::setDaysSinceLastExposureWeight: not bound
!missing-selector! ENExposureConfiguration::setDurationLevelValues: not bound
!missing-selector! ENExposureConfiguration::setDurationWeight: not bound
!missing-selector! ENExposureConfiguration::setMetadata: not bound
!missing-selector! ENExposureConfiguration::setMinimumRiskScore: not bound
!missing-selector! ENExposureConfiguration::setTransmissionRiskLevelValues: not bound
!missing-selector! ENExposureConfiguration::setTransmissionRiskWeight: not bound
!missing-selector! ENExposureConfiguration::transmissionRiskLevelValues not bound
!missing-selector! ENExposureConfiguration::transmissionRiskWeight not bound
!missing-selector! ENExposureDetectionSummary::attenuationDurations not bound
!missing-selector! ENExposureDetectionSummary::daysSinceLastExposure not bound
!missing-selector! ENExposureDetectionSummary::matchedKeyCount not bound
!missing-selector! ENExposureDetectionSummary::maximumRiskScore not bound
!missing-selector! ENExposureDetectionSummary::metadata not bound
!missing-selector! ENExposureDetectionSummary::setAttenuationDurations: not bound
!missing-selector! ENExposureInfo::attenuationDurations not bound
!missing-selector! ENExposureInfo::attenuationValue not bound
!missing-selector! ENExposureInfo::date not bound
!missing-selector! ENExposureInfo::duration not bound
!missing-selector! ENExposureInfo::metadata not bound
!missing-selector! ENExposureInfo::setAttenuationDurations: not bound
!missing-selector! ENExposureInfo::totalRiskScore not bound
!missing-selector! ENExposureInfo::transmissionRiskLevel not bound
!missing-selector! ENManager::activateWithCompletionHandler: not bound
!missing-selector! ENManager::detectExposuresWithConfiguration:diagnosisKeyURLs:completionHandler: not bound
!missing-selector! ENManager::dispatchQueue not bound
!missing-selector! ENManager::exposureNotificationEnabled not bound
!missing-selector! ENManager::exposureNotificationStatus not bound
!missing-selector! ENManager::getDiagnosisKeysWithCompletionHandler: not bound
!missing-selector! ENManager::getExposureInfoFromSummary:userExplanation:completionHandler: not bound
!missing-selector! ENManager::getTestDiagnosisKeysWithCompletionHandler: not bound
!missing-selector! ENManager::invalidate not bound
!missing-selector! ENManager::invalidationHandler not bound
!missing-selector! ENManager::setDispatchQueue: not bound
!missing-selector! ENManager::setExposureNotificationEnabled:completionHandler: not bound
!missing-selector! ENManager::setInvalidationHandler: not bound
!missing-selector! ENTemporaryExposureKey::keyData not bound
!missing-selector! ENTemporaryExposureKey::rollingPeriod not bound
!missing-selector! ENTemporaryExposureKey::rollingStartNumber not bound
!missing-selector! ENTemporaryExposureKey::setKeyData: not bound
!missing-selector! ENTemporaryExposureKey::setRollingPeriod: not bound
!missing-selector! ENTemporaryExposureKey::setRollingStartNumber: not bound
!missing-selector! ENTemporaryExposureKey::setTransmissionRiskLevel: not bound
!missing-selector! ENTemporaryExposureKey::transmissionRiskLevel not bound
!missing-type! ENExposureConfiguration not bound
!missing-type! ENExposureDetectionSummary not bound
!missing-type! ENExposureInfo not bound
!missing-type! ENManager not bound
!missing-type! ENTemporaryExposureKey not bound
3 changes: 1 addition & 2 deletions tools/devops/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ include $(TOP)/Make.config

device-tests-provisioning.csx: device-tests-provisioning.csx.in Makefile $(TOP)/Make.config
$(Q_GEN) sed \
-e 's#@XCODE_VERSION@#$(XCODE_VERSION)#g' \
-e 's#@XCODE_DEVELOPER_ROOT@#$(XCODE_DEVELOPER_ROOT)#g' \
-e 's#@XCODE_XIP_NAME@#$(notdir $(XCODE_URL))#g' \
-e 's#@XI_PACKAGE@#$(XI_PACKAGE)#g' \
-e 's#@MONO_PACKAGE@#$(MIN_MONO_URL)#g' \
-e 's#@VS_PACKAGE@#$(MIN_VISUAL_STUDIO_URL)#g' \
Expand Down
28 changes: 26 additions & 2 deletions tools/devops/device-tests-provisioning.csx.in
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
#r "_provisionator/provisionator.dll"

using System.IO;
using System.Reflection;
using System.Linq;

using static Xamarin.Provisioning.ProvisioningScript;

var xcodePath = Path.GetDirectoryName (Path.GetDirectoryName ("@XCODE_DEVELOPER_ROOT@"));
Xcode ("@XCODE_VERSION@").XcodeSelect (allowUntrusted: true, allowSymlink: true, symlinkTarget: xcodePath);
// Provision Xcode using the xip name declared in Make.config
var xcodeItem = GetXcodeItem ("@XCODE_XIP_NAME@");
Item (xcodeItem).XcodeSelect (allowUntrusted: true);

// provisionator knows how to deal with this items
Item ("@MONO_PACKAGE@");
Expand All @@ -21,3 +23,25 @@ void BrewPackage (string name)
// All Macs provisioned by Xamarin, VSEng, or DDFUN should have brew by default!
Item (name).Action (i => Exec ("brew", "install", i.Name));
}

XreItem GetXcodeItem (string xipFileName)
{
var items = (XreItem []) Enum.GetValues (typeof (XreItem));
var xreItemType = typeof (XreItem);
var itemAttrType = typeof (Xamarin.Provisioning.Model.ItemAttribute);

foreach (var item in items) {
var attr = xreItemType
.GetField (item.ToString ())
.GetCustomAttributes (itemAttrType, false)
?.Cast<Xamarin.Provisioning.Model.ItemAttribute> ()
.FirstOrDefault (a => a.Uri.EndsWith (xipFileName, StringComparison.Ordinal));

if (attr == null)
continue;

return item;
}

throw new Xamarin.Provisioning.ProvisioningException ($"'{xipFileName}' not found in 'XreItem' members.");
}

0 comments on commit 2cd53a7

Please sign in to comment.