Merge remote-tracking branch 'origin/main' into darc-main-fc6e47e2-7b69-4464-b65f-8f67ca26b4e8

This commit is contained in:
Rolf Bjarne Kvinge 2022-03-28 13:51:54 +02:00
Родитель e652068e5e 00d9e1ba1a
Коммит 4364bb4d16
10 изменённых файлов: 89 добавлений и 38 удалений

35
.github/fabricbot.json поставляемый Normal file
Просмотреть файл

@ -0,0 +1,35 @@
[
{
"taskType": "trigger",
"capabilityId": "IssueResponder",
"subCapability": "IssuesOnlyResponder",
"version": "1.0",
"config": {
"conditions": {
"operator": "and",
"operands": [
{
"name": "labelAdded",
"parameters": {
"label": "need-info"
}
}
]
},
"eventType": "issue",
"eventNames": [
"issues",
"project_card"
],
"taskName": "Add comment when 'need-info' is applied to issue",
"actions": [
{
"name": "addReply",
"parameters": {
"comment": "Hi @${issueAuthor}. We have added the \"need-info\" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time."
}
}
]
}
}
]

Просмотреть файл

@ -402,5 +402,5 @@ package-test-libraries.zip:
$(Q) @$(MAKE) all -C test-libraries
$(Q) mkdir -p $@.tmpdir
$(Q) $(CP) -a test-libraries/* $@.tmpdir
$(Q_GEN) cd $@.tmpdir && zip -9r $(abspath $@) .
$(Q_GEN) cd $@.tmpdir && zip -9r --symlinks $(abspath $@) .
$(Q) rm -rf $@.tmpdir

Просмотреть файл

@ -320,18 +320,6 @@ namespace Xamarin.Tests
public static string RootPath {
get {
if (IsVsts) {
var workingDir = Environment.GetEnvironmentVariable ("SYSTEM_DEFAULTWORKINGDIRECTORY");
var git = Path.Combine (workingDir, ".git");
if (Directory.Exists (git)) {
return workingDir;
} else {
var xamarin = Path.Combine (workingDir, "xamarin-macios");
if (!Directory.Exists (xamarin))
throw new Exception ($"Could not find the xamarin-macios repo given the test working directory {workingDir}");
return xamarin;
}
} else {
var dir = TestAssemblyDirectory;
var path = Path.Combine (dir, ".git");
while (!Directory.Exists (path) && path.Length > 3) {
@ -346,7 +334,6 @@ namespace Xamarin.Tests
return path;
}
}
}
public static bool TryGetRootPath (out string rootPath)
{

Просмотреть файл

@ -535,19 +535,15 @@ namespace Xamarin.Tests {
// Debug
[TestCase (ApplePlatform.iOS, "ios-arm64;ios-arm", CodeSignature.All, "Debug")]
[TestCase (ApplePlatform.iOS, "iossimulator-x64", CodeSignature.Frameworks, "Debug")]
#if !NET //ignore due to https://github.com/xamarin/maccore/issues/2548
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64", CodeSignature.All, "Debug")]
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64;maccatalyst-arm64", CodeSignature.All, "Debug")]
[TestCase (ApplePlatform.MacOSX, "osx-x64", CodeSignature.None, "Debug")]
[TestCase (ApplePlatform.MacOSX, "osx-x64;osx-arm64", CodeSignature.None, "Debug")]
#endif
[TestCase (ApplePlatform.MacOSX, "osx-x64", CodeSignature.Frameworks, "Debug")]
[TestCase (ApplePlatform.MacOSX, "osx-x64;osx-arm64", CodeSignature.Frameworks, "Debug")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64", CodeSignature.All, "Debug")]
// Release
[TestCase (ApplePlatform.iOS, "ios-arm64;ios-arm", CodeSignature.All, "Release")]
#if !NET // ignore due to https://github.com/xamarin/maccore/issues/2548
[TestCase (ApplePlatform.MacCatalyst, "maccatalyst-x64;maccatalyst-arm64", CodeSignature.All, "Release")]
[TestCase (ApplePlatform.MacOSX, "osx-x64", CodeSignature.None, "Release")]
#endif
[TestCase (ApplePlatform.MacOSX, "osx-x64", CodeSignature.Frameworks, "Release")]
[TestCase (ApplePlatform.TVOS, "tvos-arm64", CodeSignature.All, "Release")]
public void Build (ApplePlatform platform, string runtimeIdentifiers, CodeSignature signature, string configuration)
{

Просмотреть файл

@ -164,8 +164,8 @@ namespace Xharness {
IEnumerable<string> GetModifiedFilesLocally (int pullRequest)
{
var base_commit = $"origin/pr/{pullRequest}/merge^";
var head_commit = $"origin/pr/{pullRequest}/merge";
var base_commit = $"origin/pull/{pullRequest}/merge^";
var head_commit = $"origin/pull/{pullRequest}/merge";
harness.Log ("Fetching modified files for commit range {0}..{1}", base_commit, head_commit);

Просмотреть файл

@ -1701,8 +1701,10 @@ namespace Xamarin.Bundler {
return !Profile.IsSdkAssembly (Path.GetFileNameWithoutExtension (assembly));
case ApplePlatform.TVOS:
case ApplePlatform.WatchOS:
case ApplePlatform.MacCatalyst:
return false;
case ApplePlatform.MacCatalyst:
// https://github.com/xamarin/xamarin-macios/issues/14437
return true;
default:
throw ErrorHelper.CreateError (71, Errors.MX0071, Platform, ProductName);
}

Просмотреть файл

@ -52,7 +52,13 @@ steps:
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- pwsh: |
git reset --hard HEAD^2
git config remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pull/*'
git fetch origin
$branch="$(Build.SourceBranch)".Replace("merge", "head")
$branch=$branch.Replace("refs", "origin")
Write-Host "Checking out branch $branch"
git checkout $branch
git branch -a
displayName: "Undo Github merge"
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-macios

Просмотреть файл

@ -43,5 +43,5 @@ steps:
- powershell: |
Write-Host "##vso[task.setvariable variable=TEST_SUMMARY_PATH]$Env:SYSTEM_DEFAULTWORKINGDIRECTORY\Reports\TestSummary-${{ parameters.testPrefix }}\TestSummary.md"
Write-Host "##vso[task.setvariable variable=HTML_REPORT_PATH]$Env:SYSTEM_DEFAULTWORKINGDIRECTORY\HtmlReport-${{ parameters.testPrefix }}"
displayName: Pusblish artifact paths
displayName: Publish artifact paths
name: artifacts # not to be confused with the displayName, this is used to later use the name of the step to access the output variables from an other job

Просмотреть файл

@ -54,7 +54,13 @@ steps:
- ${{ if eq(variables['Build.Reason'], 'PullRequest') }}:
- pwsh: |
git reset --hard HEAD^2
git config remote.origin.fetch '+refs/pull/*:refs/remotes/origin/pull/*'
git fetch origin
$branch="$(Build.SourceBranch)".Replace("merge", "head")
$branch=$branch.Replace("refs", "origin")
Write-Host "Checking out branch $branch"
git checkout $branch
git branch -a
displayName: "Undo Github merge"
workingDirectory: $(System.DefaultWorkingDirectory)/xamarin-macios

Просмотреть файл

@ -227,7 +227,7 @@ steps:
make -C builds downloads -j || true
make -C builds .stamp-mono-ios-sdk-destdir -j || true
RC=0
MONO_ENV_OPTIONS=--trace=E:all make -C tests ${{ parameters.makeTarget }} || RC=$?
make -C tests ${{ parameters.makeTarget }} || RC=$?
if [ $RC -eq 0 ]; then
echo "##vso[task.setvariable variable=TESTS_JOBSTATUS;isOutput=true]Succeeded"
else
@ -281,6 +281,25 @@ steps:
continueOnError: true
condition: succeededOrFailed()
# Upload all the binlogs
# Copy all the binlogs to a separate directory, keeping directory structure.
- script: |
set -x
mkdir -p $(Build.ArtifactStagingDirectory)/all-binlogs
rsync -av --prune-empty-dirs --include '*/' --include '*.binlog' --exclude '*' $(Build.SourcesDirectory)/xamarin-macios $(Build.ArtifactStagingDirectory)/all-binlogs
displayName: Copy all binlogs
continueOnError: true
condition: succeededOrFailed()
# Publish all the binlogs we collected in the previous step
- task: PublishPipelineArtifact@1
displayName: 'Publish Artifact: All binlogs'
inputs:
targetPath: $(Build.ArtifactStagingDirectory)/all-binlogs
artifactName: all-binlogs-test-$(Build.BuildId)
continueOnError: true
condition: succeededOrFailed()
# Be nice and clean behind you
- pwsh: |
cd $Env:SYSTEM_DEFAULTWORKINGDIRECTORY/xamarin-macios/tools/devops/automation/scripts/