Merge main into net7.0. (#16268)
This commit is contained in:
Коммит
d73f2f8fea
|
@ -20,7 +20,7 @@ jobs:
|
|||
uses: actions/github-script@v6.3.1
|
||||
with:
|
||||
script: |
|
||||
var artifacts = await github.actions.listWorkflowRunArtifacts({
|
||||
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
run_id: ${{github.event.workflow_run.id }},
|
||||
|
@ -28,7 +28,7 @@ jobs:
|
|||
var matchArtifact = artifacts.data.artifacts.filter((artifact) => {
|
||||
return artifact.name == "autoformat"
|
||||
})[0];
|
||||
var download = await github.actions.downloadArtifact({
|
||||
var download = await github.rest.actions.downloadArtifact({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
artifact_id: matchArtifact.id,
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
name: Update single-platform release tests branches
|
||||
|
||||
on:
|
||||
# allow triggering this action manually
|
||||
workflow_dispatch:
|
||||
# run every saturday (at noon UTC), so the builds occur during the weekend during lower CI load
|
||||
schedule:
|
||||
- cron: '0 12 * * 6'
|
||||
|
||||
jobs:
|
||||
updateSinglePlatformBranches:
|
||||
name: Merge main into single-platform release test branches
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: 'Update branches'
|
||||
run: |
|
||||
set -ex
|
||||
for platform in iOS tvOS MacCatalyst macOS; do
|
||||
git checkout -b release/release-test-only-dotnet-$platform origin/release/release-test-only-dotnet-$platform
|
||||
git merge origin/main
|
||||
git push
|
||||
done
|
8
Makefile
8
Makefile
|
@ -110,9 +110,11 @@ package release:
|
|||
$(Q) $(MAKE) -C $(TOP)/release release
|
||||
# copy .pkg, .zip and *updateinfo to the packages directory to be uploaded to storage
|
||||
$(Q) mkdir -p ../package
|
||||
$(Q) $(CP) $(TOP)/release/*.pkg ../package
|
||||
$(Q) $(CP) $(TOP)/release/*.zip ../package
|
||||
$(Q) $(CP) $(TOP)/release/*updateinfo ../package
|
||||
$(Q) echo "Output from 'make release':"
|
||||
$(Q) ls -la $(TOP)/release | sed 's/^/ /'
|
||||
$(Q) if test -n "$$(shopt -s nullglob; echo $(TOP)/release/*.pkg)"; then $(CP) $(TOP)/release/*.pkg ../package; fi
|
||||
$(Q) if test -n "$$(shopt -s nullglob; echo $(TOP)/release/*.zip)"; then $(CP) $(TOP)/release/*.zip ../package; fi
|
||||
$(Q) if test -n "$$(shopt -s nullglob; echo $(TOP)/release/*updateinfo)"; then $(CP) $(TOP)/release/*updateinfo ../package; fi
|
||||
$(Q) echo "Packages:"
|
||||
$(Q) ls -la ../package | sed 's/^/ /'
|
||||
|
||||
|
|
|
@ -10,6 +10,12 @@
|
|||
<clear />
|
||||
<!--Begin: Package sources managed by Dependency Flow automation. Do not edit the sources below.-->
|
||||
<!-- Begin: Package sources from dotnet-emsdk -->
|
||||
<add key="darc-pub-dotnet-emsdk-c3fc739" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-emsdk-c3fc739-5" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-5/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-emsdk-c3fc739-4" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-4/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-emsdk-c3fc739-3" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-3/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-emsdk-c3fc739-2" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-2/nuget/v3/index.json" />
|
||||
<add key="darc-pub-dotnet-emsdk-c3fc739-1" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-c3fc739c-1/nuget/v3/index.json" />
|
||||
<!-- End: Package sources from dotnet-emsdk -->
|
||||
<!-- Begin: Package sources from dotnet-aspnetcore -->
|
||||
<!-- End: Package sources from dotnet-aspnetcore -->
|
||||
|
|
|
@ -2726,5 +2726,14 @@ namespace Xamarin.Localization.MSBuild {
|
|||
return ResourceManager.GetString("W7100", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Unexpected extension '{0}' for native reference '{1}' in manifest '{2}'..
|
||||
/// </summary>
|
||||
public static string W7105 {
|
||||
get {
|
||||
return ResourceManager.GetString("W7105", resourceCulture);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1450,4 +1450,13 @@
|
|||
* 'Remove', 'Boolean', 'String', 'StringArray'
|
||||
</comment>
|
||||
</data>
|
||||
|
||||
<data name="W7105" xml:space="preserve">
|
||||
<value>Unexpected extension '{0}' for native reference '{1}' in manifest '{2}'.</value>
|
||||
<comment>
|
||||
{0}: file extension
|
||||
{1}: path to a file
|
||||
{2}: path to a file
|
||||
</comment>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -167,7 +167,12 @@ namespace Xamarin.MacDev.Tasks {
|
|||
t = new TaskItem (Path.Combine (resources, name));
|
||||
t.SetMetadata ("Kind", "Dynamic");
|
||||
break;
|
||||
case ".a": // static library
|
||||
t = new TaskItem (Path.Combine (resources, name));
|
||||
t.SetMetadata ("Kind", "Static");
|
||||
break;
|
||||
default:
|
||||
Log.LogWarning (MSBStrings.W7105 /* Unexpected extension '{0}' for native reference '{1}' in manifest '{2}'. */, Path.GetExtension (name), name, manifest);
|
||||
t = r;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ using NativeHandle = System.IntPtr;
|
|||
|
||||
namespace Foundation {
|
||||
|
||||
public partial class NSArray {
|
||||
public partial class NSArray : IEnumerable<NSObject> {
|
||||
|
||||
//
|
||||
// Creates an array with the elements; If the value passed is null, it
|
||||
|
@ -429,5 +429,28 @@ namespace Foundation {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public TKey[] ToArray<TKey> () where TKey: class, INativeObject
|
||||
{
|
||||
var rv = new TKey [GetCount (Handle)];
|
||||
for (var i = 0; i < rv.Length; i++)
|
||||
rv [i] = GetItem<TKey> ((nuint) i);
|
||||
return rv;
|
||||
}
|
||||
|
||||
public NSObject[] ToArray ()
|
||||
{
|
||||
return ToArray<NSObject> ();
|
||||
}
|
||||
|
||||
IEnumerator<NSObject> IEnumerable<NSObject>.GetEnumerator ()
|
||||
{
|
||||
return new NSFastEnumerator<NSObject> (this);
|
||||
}
|
||||
|
||||
IEnumerator IEnumerable.GetEnumerator ()
|
||||
{
|
||||
return new NSFastEnumerator<NSObject> (this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -89,5 +89,10 @@ namespace Foundation {
|
|||
return GetItem<TKey> ((nuint)idx);
|
||||
}
|
||||
}
|
||||
|
||||
public new TKey[] ToArray ()
|
||||
{
|
||||
return base.ToArray<TKey> ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
//
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Foundation;
|
||||
using ObjCRuntime;
|
||||
using Security;
|
||||
|
@ -123,5 +124,37 @@ namespace MonoTouchFixtures.Foundation {
|
|||
Assert.That (a.Handle, Is.Not.EqualTo (IntPtr.Zero), "Handle");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToArray ()
|
||||
{
|
||||
using (var a = NSArray.FromStrings (new string [1] { "abc" })) {
|
||||
var arr = a.ToArray ();
|
||||
Assert.AreEqual (1, arr.Length, "Length");
|
||||
Assert.AreEqual ("abc", arr [0].ToString (), "Value");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToArray_T ()
|
||||
{
|
||||
using (var a = NSArray.FromStrings (new string [1] { "abc" })) {
|
||||
var arr = a.ToArray<NSString> ();
|
||||
Assert.AreEqual (1, arr.Length, "Length");
|
||||
Assert.AreEqual ("abc", arr [0].ToString (), "Value");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Enumerator ()
|
||||
{
|
||||
using (var a = NSArray.FromStrings (new string [1] { "abc" })) {
|
||||
foreach (var item in a)
|
||||
Assert.AreEqual ("abc", item.ToString (), "Value");
|
||||
var list = a.ToList ();
|
||||
Assert.AreEqual (1, list.Count (), "Length");
|
||||
Assert.AreEqual ("abc", list [0].ToString (), "Value");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,5 +93,29 @@ namespace MonoTouchFixtures.Foundation {
|
|||
Assert.AreSame (str3, arr [2], "NSArray indexer");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToArray ()
|
||||
{
|
||||
using (var a = NSArray<NSString>.FromNSObjects ((NSString) "abc")) {
|
||||
var arr = a.ToArray ();
|
||||
NSString element = arr [0];
|
||||
Assert.AreEqual (1, arr.Length, "Length");
|
||||
Assert.AreEqual ("abc", arr [0].ToString (), "Value");
|
||||
Assert.AreEqual ("abc", (string) element, "Value element");
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void ToArray_T ()
|
||||
{
|
||||
using (var a = NSArray<NSString>.FromNSObjects ((NSString) "abc")) {
|
||||
var arr = a.ToArray ();
|
||||
NSString element = arr [0];
|
||||
Assert.AreEqual (1, arr.Length, "Length");
|
||||
Assert.AreEqual ("abc", arr [0].ToString (), "Value");
|
||||
Assert.AreEqual ("abc", (string) element, "Value element");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,6 +17,11 @@ dotnet format whitespace "$SRC_DIR/msbuild/Xamarin.MacDev.Tasks/Xamarin.MacDev.T
|
|||
dotnet format whitespace "$SRC_DIR/msbuild/Xamarin.iOS.Tasks.Windows/Xamarin.iOS.Tasks.Windows.csproj"
|
||||
dotnet format whitespace "$SRC_DIR/msbuild/Xamarin.iOS.Tasks/Xamarin.iOS.Tasks.csproj"
|
||||
dotnet format whitespace "$SRC_DIR/tools/dotnet-linker/dotnet-linker.csproj"
|
||||
dotnet format whitespace "$SRC_DIR/tests/xtro-sharpie/xtro-sharpie.csproj"
|
||||
dotnet format whitespace "$SRC_DIR/tests/xtro-sharpie/u2ignore/u2ignore.csproj"
|
||||
dotnet format whitespace "$SRC_DIR/tests/xtro-sharpie/u2todo/u2todo.csproj"
|
||||
dotnet format whitespace "$SRC_DIR/tests/xtro-sharpie/xtro-report/xtro-report.csproj"
|
||||
dotnet format whitespace "$SRC_DIR/tests/xtro-sharpie/xtro-sanity/xtro-sanity.csproj"
|
||||
|
||||
# dotnet format "$SRC_DIR/[...]"
|
||||
# add more projects here...
|
||||
|
|
|
@ -92,6 +92,59 @@ parameters:
|
|||
type: stepList
|
||||
default: []
|
||||
|
||||
- name: packages
|
||||
type: object
|
||||
default: [
|
||||
{
|
||||
job: prepare_packages,
|
||||
displayName: 'Prepare packages',
|
||||
packages: [
|
||||
{
|
||||
job: 'microsoft_ios_sign_notarize',
|
||||
name: 'Microsoft.iOS',
|
||||
pattern: 'Microsoft.iOS.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_IOS",
|
||||
},
|
||||
{
|
||||
job: 'microsoft_tvos_sign_notarize',
|
||||
name: 'Microsoft.tvOS',
|
||||
pattern: 'Microsoft.tvOS.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_TVOS",
|
||||
},
|
||||
{
|
||||
job: 'microsoft_mac_sign_notarize',
|
||||
name: 'Microsoft.macOS',
|
||||
pattern: 'Microsoft.macOS.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_MACOS",
|
||||
},
|
||||
{
|
||||
job: 'microsoft_maccatalyst_sign_notarize',
|
||||
name: 'Microsoft.MacCatalyst',
|
||||
pattern: 'Microsoft.MacCatalyst.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_MACCATALYST",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
job: prepare_packages_legacy,
|
||||
displayName: 'Prepare legacy packages',
|
||||
packages: [
|
||||
{
|
||||
job: 'xamarin_ios_sign_notarize',
|
||||
name: 'Xamarin.iOS',
|
||||
pattern: 'xamarin.ios-*',
|
||||
conditionVariable: "INCLUDE_LEGACY_IOS",
|
||||
},
|
||||
{
|
||||
job: 'xamarin_mac_sing_notarie',
|
||||
name: 'Xamarin.Mac',
|
||||
pattern: 'xamarin.mac-*',
|
||||
conditionVariable: "INCLUDE_LEGACY_MAC",
|
||||
},
|
||||
],
|
||||
}
|
||||
]
|
||||
|
||||
stages:
|
||||
|
||||
- ${{ if eq(parameters.runGovernanceTests, true) }}:
|
||||
|
@ -150,8 +203,9 @@ stages:
|
|||
skipESRP: ${{ parameters.skipESRP }}
|
||||
pool: ${{ parameters.pool }}
|
||||
|
||||
- stage: prepare_packages
|
||||
displayName: 'Prepare packages'
|
||||
- ${{ each pkg_obj in parameters.packages }}:
|
||||
- stage: ${{ pkg_obj.job }}
|
||||
displayName: ${{ pkg_obj.displayName }}
|
||||
dependsOn:
|
||||
- build_packages
|
||||
jobs:
|
||||
|
@ -162,6 +216,43 @@ stages:
|
|||
keyringPass: $(pass--lab--mac--builder--keychain)
|
||||
enableDotnet: ${{ parameters.enableDotnet }}
|
||||
skipESRP: ${{ parameters.skipESRP }}
|
||||
packages: ${{ pkg_obj.packages }}
|
||||
|
||||
- ${{ if eq(parameters.enableDotnet, true) }}:
|
||||
- stage: sign_notarize_dotnet
|
||||
displayName: 'Sign & Notarize Dotnet'
|
||||
dependsOn:
|
||||
- build_packages
|
||||
jobs:
|
||||
- template: ./sign-and-notarized/dotnet-signing.yml
|
||||
parameters:
|
||||
isPR: ${{ parameters.isPR }}
|
||||
|
||||
# .NET Release Prep and VS Insertion Stages, only execute them when the build comes from an official branch and is not a schedule build from OneLoc
|
||||
# setting the stage at this level makes the graph of the UI look better, else the lines overlap and is not clear.
|
||||
- ${{ if and(ne(variables['Build.Reason'], 'Schedule'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/net7.0'), eq(parameters.forceInsertion, true))) }}:
|
||||
- template: ./release/vs-insertion-prep.yml
|
||||
parameters:
|
||||
dependsOn:
|
||||
- sign_notarize_dotnet
|
||||
isPR: ${{ parameters.isPR }}
|
||||
|
||||
- stage: funnel
|
||||
displayName: 'Collect signed artifacts'
|
||||
dependsOn:
|
||||
- build_packages
|
||||
- ${{ if eq(parameters.enableDotnet, true) }}:
|
||||
- sign_notarize_dotnet
|
||||
- ${{ each pkg_obj in parameters.packages }}:
|
||||
- ${{ pkg_obj.job }}
|
||||
jobs:
|
||||
- template: ./sign-and-notarized/funnel.yml
|
||||
parameters:
|
||||
isPR: ${{ parameters.isPR }}
|
||||
packages: # flatten the pkgs for the parameter
|
||||
- ${{ each pkg_obj in parameters.packages }}:
|
||||
- ${{ each pkg in pkg_obj.packages }}:
|
||||
- ${{ pkg }}
|
||||
|
||||
- ${{ if eq(parameters.enableAPIDiff, true) }}:
|
||||
- stage: generate_api_diff
|
||||
|
@ -179,12 +270,6 @@ stages:
|
|||
enableDotnet: ${{ parameters.enableDotnet }}
|
||||
pool: ${{ parameters.pool }}
|
||||
|
||||
# .NET Release Prep and VS Insertion Stages, only execute them when the build comes from an official branch and is not a schedule build from OneLoc
|
||||
- ${{ if and(ne(variables['Build.Reason'], 'Schedule'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), startsWith(variables['Build.SourceBranch'], 'refs/heads/release/'), eq(variables['Build.SourceBranch'], 'refs/heads/net7.0'), eq(parameters.forceInsertion, true))) }}:
|
||||
- template: ./release/vs-insertion-prep.yml
|
||||
parameters:
|
||||
isPR: ${{ parameters.isPR }}
|
||||
|
||||
# Test stages
|
||||
|
||||
# always run simulator tests
|
||||
|
|
|
@ -4,8 +4,8 @@ parameters:
|
|||
default: true
|
||||
|
||||
- name: dependsOn
|
||||
type: string
|
||||
default: prepare_packages
|
||||
type: object
|
||||
default: []
|
||||
|
||||
- name: isPR
|
||||
type: boolean
|
||||
|
@ -14,13 +14,13 @@ stages:
|
|||
- stage: prepare_release
|
||||
displayName: Prepare Release
|
||||
dependsOn: ${{ parameters.dependsOn }}
|
||||
condition: and(or(eq(dependencies.${{ parameters.dependsOn }}.result, 'Succeeded'), eq(dependencies.${{ parameters.dependsOn }}.result, 'SucceededWithIssues')), eq(${{ parameters.isPR }}, false), eq(${{ parameters.enableDotnet }}, true))
|
||||
condition: and(eq(${{ parameters.isPR }}, false), eq(${{ parameters.enableDotnet }}, true))
|
||||
|
||||
jobs:
|
||||
# Check - "xamarin-macios (Prepare Release Sign NuGets)"
|
||||
- template: sign-artifacts/jobs/v2.yml@templates
|
||||
parameters:
|
||||
artifactName: package
|
||||
artifactName: dotnet-signed
|
||||
signType: Real
|
||||
usePipelineArtifactTasks: true
|
||||
|
||||
|
@ -30,7 +30,7 @@ stages:
|
|||
yamlResourceName: templates
|
||||
dependsOn: signing
|
||||
artifactName: nuget-signed
|
||||
propsArtifactName: package
|
||||
propsArtifactName: dotnet-signed
|
||||
signType: Real
|
||||
useDateTimeVersion: true
|
||||
|
||||
|
|
|
@ -7,6 +7,25 @@ parameters:
|
|||
- name: isPR
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
- job: configure
|
||||
displayName: 'Configure build'
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
|
||||
steps:
|
||||
- template: ../common/configure.yml
|
||||
|
||||
- job: sign_notarize_dotnet
|
||||
dependsOn:
|
||||
- configure
|
||||
displayName: 'Sign & Notarize Dotnet'
|
||||
timeoutInMinutes: 1000
|
||||
pool:
|
||||
vmImage: internal-macos-11
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
steps:
|
||||
|
||||
- template: setup.yml
|
||||
|
|
|
@ -3,6 +3,41 @@ parameters:
|
|||
- name: packages
|
||||
type: object
|
||||
|
||||
- name: enableDotnet
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
- name: isPR
|
||||
type: boolean
|
||||
|
||||
|
||||
jobs:
|
||||
- job: configure
|
||||
displayName: 'Configure build'
|
||||
pool:
|
||||
vmImage: windows-latest
|
||||
|
||||
variables:
|
||||
isMain: $[eq(variables['Build.SourceBranch'], 'refs/heads/main')]
|
||||
isScheduled: $[eq(variables['Build.Reason'], 'Schedule')]
|
||||
|
||||
steps:
|
||||
- template: ../common/configure.yml
|
||||
|
||||
- job: funnel_job
|
||||
dependsOn:
|
||||
- configure
|
||||
displayName: 'Collect signed artifacts'
|
||||
condition: and(not(failed()), not(canceled())) # default is succeded(), but that fails if there are any skipped jobs, so change the condition to !failed && !cancelled
|
||||
timeoutInMinutes: 1000
|
||||
pool:
|
||||
vmImage: internal-macos-11
|
||||
workspace:
|
||||
clean: all
|
||||
variables:
|
||||
${{ each pkg in parameters.packages }}:
|
||||
${{ pkg.conditionVariable }}: $[ dependencies.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'] ]
|
||||
|
||||
steps:
|
||||
|
||||
# DO NOT USE THE checkout.yml template. The reason is that the template changes the hash which results in a problem with the artifacts scripts
|
||||
|
@ -78,3 +113,50 @@ steps:
|
|||
targetPath: $(Build.SourcesDirectory)/package
|
||||
artifactName: package
|
||||
continueOnError: true
|
||||
|
||||
# This job uploads the pkgs generated by the build step in the azure blob storage. This has to be done in a different job
|
||||
# because the azure blob storate tools DO NOT work on mac OS meaning that we need a bot running Windows. build uploads the contents
|
||||
# to the pipeline artefacts and we download and upload to azure in this job.
|
||||
- job: upload_azure_blob
|
||||
displayName: 'Upload packages to Azure & SBOM'
|
||||
timeoutInMinutes: 1000
|
||||
dependsOn:
|
||||
- funnel_job
|
||||
condition: and(not(failed()), not(canceled())) # default is succeded(), but that fails if there are any skipped jobs, so change the condition to !failed && !cancelled
|
||||
|
||||
variables:
|
||||
Parameters.outputStorageUri: ''
|
||||
NUGETS_PUBLISHED: $[ stageDependencies.sign_notarize_dotnet.sign_notarize_dotnet.outputs['nugetPublishing.NUGETS_PUBLISHED'] ] # not a typo, stage and job have the same name
|
||||
SKIP_NUGETS: $[ dependencies.configure.outputs['labels.skip-nugets'] ]
|
||||
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- template: upload-azure.yml
|
||||
parameters:
|
||||
enableDotnet: ${{ parameters.enableDotnet }}
|
||||
sbomFilter: '*.nupkg;*.pkg;*.msi'
|
||||
|
||||
# Job that runs on a vm that downloads the artifacts information and adds a github comment pointing to the results of the build.
|
||||
- job: artifacts_github_comment
|
||||
displayName: 'Publish GitHub Comment - Artifacts'
|
||||
timeoutInMinutes: 1000
|
||||
dependsOn:
|
||||
- configure
|
||||
- upload_azure_blob
|
||||
condition: succeededOrFailed()
|
||||
variables:
|
||||
PR_ID: $[ dependencies.configure.outputs['labels.pr-number'] ]
|
||||
BUILD_PACKAGE: $[ dependencies.configure.outputs['labels.build-package'] ]
|
||||
TESTS_BOT: $[ stageDependencies.build_packages.build.outputs['build.TESTS_BOT'] ] # we build in a diff bot than the ones used for the comments
|
||||
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- template: artifact-github-comment.yml
|
||||
parameters:
|
||||
isPR: ${{ parameters.isPR }}
|
||||
|
|
|
@ -20,44 +20,7 @@ parameters:
|
|||
|
||||
- name: packages
|
||||
type: object
|
||||
default: [
|
||||
{
|
||||
job: 'xamarin_ios_sign_notarize',
|
||||
name: 'Xamarin.iOS',
|
||||
pattern: 'xamarin.ios-*',
|
||||
conditionVariable: "INCLUDE_LEGACY_IOS",
|
||||
},
|
||||
{
|
||||
job: 'xamarin_mac_sing_notarie',
|
||||
name: 'Xamarin.Mac',
|
||||
pattern: 'xamarin.mac-*',
|
||||
conditionVariable: "INCLUDE_LEGACY_MAC",
|
||||
},
|
||||
{
|
||||
job: 'microsoft_ios_sign_notarize',
|
||||
name: 'Microsoft.iOS',
|
||||
pattern: 'Microsoft.iOS.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_IOS",
|
||||
},
|
||||
{
|
||||
job: 'microsoft_tvos_sign_notarize',
|
||||
name: 'Microsoft.tvOS',
|
||||
pattern: 'Microsoft.tvOS.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_TVOS",
|
||||
},
|
||||
{
|
||||
job: 'microsoft_mac_sign_notarize',
|
||||
name: 'Microsoft.macOS',
|
||||
pattern: 'Microsoft.macOS.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_MACOS",
|
||||
},
|
||||
{
|
||||
job: 'microsoft_maccatalyst_sign_notarize',
|
||||
name: 'Microsoft.MacCatalyst',
|
||||
pattern: 'Microsoft.MacCatalyst.Bundle*.pkg',
|
||||
conditionVariable: "INCLUDE_DOTNET_MACCATALYST",
|
||||
},
|
||||
]
|
||||
default: []
|
||||
|
||||
jobs:
|
||||
- job: configure
|
||||
|
@ -93,90 +56,3 @@ jobs:
|
|||
skipESRP: ${{ parameters.skipESRP }}
|
||||
packageName: ${{ pkg.name }}
|
||||
packagePattern: ${{ pkg.pattern }}
|
||||
|
||||
- ${{ if eq(parameters.enableDotnet, true) }}:
|
||||
- job: sign_notarize_dotnet
|
||||
dependsOn:
|
||||
- configure
|
||||
displayName: 'Sign & Notarize Dotnet'
|
||||
timeoutInMinutes: 1000
|
||||
pool:
|
||||
vmImage: internal-macos-11
|
||||
workspace:
|
||||
clean: all
|
||||
|
||||
steps:
|
||||
- template: dotnet-signing.yml
|
||||
parameters:
|
||||
isPR: ${{ parameters.isPR }}
|
||||
|
||||
- job: funnel_job
|
||||
dependsOn:
|
||||
- configure
|
||||
- ${{ if eq(parameters.enableDotnet, true) }}:
|
||||
- sign_notarize_dotnet
|
||||
- ${{ each pkg in parameters.packages }}:
|
||||
- ${{ pkg.job }}
|
||||
displayName: 'Collect signed artifacts'
|
||||
condition: and(not(failed()), not(canceled())) # default is succeded(), but that fails if there are any skipped jobs, so change the condition to !failed && !cancelled
|
||||
timeoutInMinutes: 1000
|
||||
pool:
|
||||
vmImage: internal-macos-11
|
||||
workspace:
|
||||
clean: all
|
||||
variables:
|
||||
${{ each pkg in parameters.packages }}:
|
||||
${{ pkg.conditionVariable }}: $[ dependencies.configure.outputs['configure_platforms.${{ pkg.conditionVariable }}'] ]
|
||||
|
||||
steps:
|
||||
- template: funnel.yml
|
||||
parameters:
|
||||
packages: ${{ parameters.packages }}
|
||||
|
||||
|
||||
# This job uploads the pkgs generated by the build step in the azure blob storage. This has to be done in a different job
|
||||
# because the azure blob storate tools DO NOT work on mac OS meaning that we need a bot running Windows. build uploads the contents
|
||||
# to the pipeline artefacts and we download and upload to azure in this job.
|
||||
- job: upload_azure_blob
|
||||
displayName: 'Upload packages to Azure & SBOM'
|
||||
timeoutInMinutes: 1000
|
||||
dependsOn:
|
||||
- funnel_job
|
||||
condition: and(not(failed()), not(canceled())) # default is succeded(), but that fails if there are any skipped jobs, so change the condition to !failed && !cancelled
|
||||
|
||||
variables:
|
||||
Parameters.outputStorageUri: ''
|
||||
NUGETS_PUBLISHED: $[ dependencies.sign_notarize.outputs['nugetPublishing.NUGETS_PUBLISHED'] ]
|
||||
SKIP_NUGETS: $[ dependencies.configure.outputs['labels.skip-nugets'] ]
|
||||
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- template: upload-azure.yml
|
||||
parameters:
|
||||
enableDotnet: ${{ parameters.enableDotnet }}
|
||||
sbomFilter: '*.nupkg;*.pkg;*.msi'
|
||||
|
||||
# Job that runs on a vm that downloads the artifacts information and adds a github comment pointing to the results of the build.
|
||||
- job: artifacts_github_comment
|
||||
displayName: 'Publish GitHub Comment - Artifacts'
|
||||
timeoutInMinutes: 1000
|
||||
dependsOn:
|
||||
- configure
|
||||
- upload_azure_blob
|
||||
condition: succeededOrFailed()
|
||||
variables:
|
||||
PR_ID: $[ dependencies.configure.outputs['labels.pr-number'] ]
|
||||
BUILD_PACKAGE: $[ dependencies.configure.outputs['labels.build-package'] ]
|
||||
TESTS_BOT: $[ stageDependencies.build_packages.build.outputs['build.TESTS_BOT'] ] # we build in a diff bot than the ones used for the comments
|
||||
GIT_HASH: $[ stageDependencies.build_packages.build.outputs['fix_commit.GIT_HASH'] ]
|
||||
pool:
|
||||
vmImage: 'windows-latest'
|
||||
workspace:
|
||||
clean: all
|
||||
steps:
|
||||
- template: artifact-github-comment.yml
|
||||
parameters:
|
||||
isPR: ${{ parameters.isPR }}
|
||||
|
|
Загрузка…
Ссылка в новой задаче