Skip to content

Commit

Permalink
[d16-7] Merge Xcode11.5 Support and include provisionator changes (#8645
Browse files Browse the repository at this point in the history
  • Loading branch information
dalexsoto authored May 21, 2020
1 parent ab8a0fc commit 1614d56
Show file tree
Hide file tree
Showing 13 changed files with 151 additions and 74 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,5 @@ tests/bcl-test/mscorlib*.csproj
tests/bcl-test/SystemCoreXunit*.csproj
tests/bcl-test/SystemXunit.csproj
global.json

.idea
device-tests-provisioning.csx
8 changes: 4 additions & 4 deletions Make.config
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ IOS_PACKAGE_VERSION_BUILD=$(IOS_COMMIT_DISTANCE)
IOS_PACKAGE_UPDATE_ID=$(shell printf "2%02d%02d%02d%03d" $(IOS_PACKAGE_VERSION_MAJOR) $(IOS_PACKAGE_VERSION_MINOR) $(IOS_PACKAGE_VERSION_REV) $(IOS_PACKAGE_VERSION_BUILD))

# 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 Expand Up @@ -98,7 +98,7 @@ MIN_OSX_VERSION_FOR_IOS=10.11
MIN_OSX_VERSION_FOR_MAC=10.11

# 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)
IOS_SDK_VERSION=13.4
IOS_SDK_VERSION=13.5
# When bumping OSX_SDK_VERSION also update the macOS version where we execute on bots in jenkins/Jenkinsfile (in the 'node' element)
OSX_SDK_VERSION=10.15
WATCH_SDK_VERSION=6.2
Expand Down
4 changes: 2 additions & 2 deletions Make.versions
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@
# line changed in git).
#

IOS_PACKAGE_VERSION=13.20.0.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=6.20.0.$(MAC_COMMIT_DISTANCE)
IOS_PACKAGE_VERSION=13.20.1.$(IOS_COMMIT_DISTANCE)
MAC_PACKAGE_VERSION=6.20.1.$(MAC_COMMIT_DISTANCE)
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 := 92a06f73033c07fe97735c1fa10e2fa0a9222c79
NEEDED_MACCORE_VERSION := ef861db73e7c0f74131d08d5afa64841d6b00e0b
NEEDED_MACCORE_BRANCH := d16-7

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 @@ -49,14 +49,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
10 changes: 10 additions & 0 deletions tools/devops/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
TOP=../..
include $(TOP)/Make.config

device-tests-provisioning.csx: device-tests-provisioning.csx.in Makefile $(TOP)/Make.config
$(Q_GEN) sed \
-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' \
$< > $@;
20 changes: 11 additions & 9 deletions tools/devops/device-tests-common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,19 @@ jobs:
env:
LOGIN_KEYCHAIN_PASSWORD: $(OSX_KEYCHAIN_PASS)
- bash: |
set -x
set -e
- bash: make -C $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/ device-tests-provisioning.csx
displayName: 'Generate Provisionator csx file'

./xamarin-macios/system-dependencies.sh --ignore-all --provision-xcode --provision-xamarin-studio --provision-mono --provision-7z
displayName: 'Provision dependencies'
timeoutInMinutes: 240
- bash: rm -rf "/Users/xamarinqa/azdo/_work/_tool/provisionator"
displayName: 'Nuke Provisionator Tool Cache'
condition: ${{ parameters.clearProviCache }}

- bash: ./xamarin-macios/tools/devops/install-xi-pkg.sh
displayName: 'Install XI PKG'
timeoutInMinutes: 15
- task: xamops.azdevex.provisionator-task.provisionator@1
displayName: 'Provision dependencies'
inputs:
provisioning_script: $(System.DefaultWorkingDirectory)/xamarin-macios/tools/devops/device-tests-provisioning.csx
provisioning_extra_args: '-vvvv'
timeoutInMinutes: 250

- bash: |
set -x
Expand Down
47 changes: 47 additions & 0 deletions tools/devops/device-tests-provisioning.csx.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#r "_provisionator/provisionator.dll"

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

using static Xamarin.Provisioning.ProvisioningScript;

// 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@");
Item ("@VS_PACKAGE@");
Item ("@XI_PACKAGE@");

BrewPackage ("p7zip");

void BrewPackage (string name)
{
// Assumes brew is already installed.
// 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.");
}
3 changes: 3 additions & 0 deletions tools/devops/device-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ resources:
ref: refs/heads/device-tests-yaml # should this be on a branch and not on master???
endpoint: xamarin

variables:
- group: xamops-azdev-secrets

jobs:
- template: device-tests-common.yml # all the smart stuff happens in the template, just needed to set the params
parameters:
Expand Down
56 changes: 0 additions & 56 deletions tools/devops/install-xi-pkg.sh

This file was deleted.

1 comment on commit 1614d56

@xamarin-release-manager
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.