maui/eng/pipelines/handlers.yml

376 строки
14 KiB
YAML
Исходник Обычный вид История

trigger:
branches:
include:
- main
2021-04-24 20:06:28 +03:00
- release/*
2021-05-05 20:56:05 +03:00
- loc
2021-03-11 19:23:29 +03:00
tags:
include:
- '*'
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
pr:
branches:
include:
- main
2021-04-24 21:19:50 +03:00
- release/*
paths:
include:
- '*'
exclude:
- .github/*
- docs/*
- CODE-OF-CONDUCT.md
- CONTRIBUTING.md
- LICENSE.TXT
- PATENTS.TXT
- README.md
- SECURITY.md
- THIRD-PARTY-NOTICES.TXT
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build
branches:
include:
- main
variables:
- template: /eng/pipelines/common/variables.yml
parameters:
- name: BuildEverything
type: boolean
default: false
- name: BuildConfigurations
type: object
default:
- Debug
- Release
- name: BuildPlatforms
type: object
default:
- name: Windows
2021-06-17 14:20:48 +03:00
poolName: $(windowsNet6VmPool)
vmImage: $(windowsNet6VmImage)
bootsAndroid: $(Android.Msi)
bootsiOS: $(iOS.Msi)
artifact: net6-windows
- name: macOS
poolName: $(macOSXNet6VmPool)
vmImage: $(macOSXNet6VmImage)
bootsAndroid: $(Android.Pkg)
bootsiOS: $(iOS.Pkg)
bootsMacCatalyst: $(MacCatalyst.Pkg)
artifact: net6-macos
- name: PackPlatforms
type: object
default:
- name: Windows
2021-06-17 14:20:48 +03:00
poolName: $(windowsNet6VmPool)
vmImage: $(windowsNet6VmImage)
bootsAndroid: $(Android.Msi)
bootsiOS: $(iOS.Msi)
artifact: nuget
- name: macOS
2021-06-17 14:20:48 +03:00
poolName: $(macOSXNet6VmPool)
vmImage: $(macOSXNet6VmImage)
bootsAndroid: $(Android.Pkg)
bootsiOS: $(iOS.Pkg)
bootsMacCatalyst: $(MacCatalyst.Pkg)
artifact: nuget-macos
resources:
repositories:
- repository: xamarin-templates
type: github
name: xamarin/yaml-templates
endpoint: xamarin
ref: refs/heads/main # still defaults to master even though main is the main branch
stages:
- stage: build_net6
displayName: Build .NET 6
dependsOn: []
jobs:
- ${{ each BuildPlatform in parameters.BuildPlatforms }}:
- ${{ each BuildConfiguration in parameters.BuildConfigurations }}:
- job: build_net6_${{ BuildPlatform.name }}_${{ BuildConfiguration }}
workspace:
clean: all
displayName: ${{ BuildPlatform.name }} (${{ BuildConfiguration }})
timeoutInMinutes: 120
condition: or(
${{ parameters.BuildEverything }},
ne(variables['Build.Reason'], 'PullRequest'),
eq('${{ BuildConfiguration }}', 'Release'))
pool:
name: ${{ BuildPlatform.poolName }}
vmImage: ${{ BuildPlatform.vmImage }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
${{ if startsWith(BuildPlatform.poolName, 'VSEng-VSMac-Xamarin-Shared') }}:
demands:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- macOS.Name -equals BigSur
- macOS.Architecture -equals x64
- Agent.HasDevices -equals False
- Agent.IsPaired -equals False
steps:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- ${{ if eq(BuildPlatform.name, 'macOS') }}:
- template: agent-cleanser/v1.yml@xamarin-templates
parameters:
UninstallMono: false
UninstallXamarinMac: false
- template: common/provision.yml
parameters:
platform: ${{ BuildPlatform.name }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
poolName: ${{ BuildPlatform.poolName }}
- pwsh: ./build.ps1 --target=dotnet --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Install .NET'
- pwsh: ./build.ps1 --target=dotnet-build --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Build .NET Maui'
- pwsh: ./build.ps1 --target=dotnet-test --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Run Unit Tests'
- task: PublishTestResults@2
condition: always()
inputs:
testRunner: VSTest
testResultsFiles: '$(build.artifactstagingdirectory)/**/*.trx'
- task: PublishBuildArtifacts@1
condition: always()
displayName: Publish Artifacts (${{ BuildPlatform.artifact }})
inputs:
ArtifactName: ${{ BuildPlatform.artifact }}
- stage: pack_net6
displayName: Pack .NET 6
Make .NET 6 Packable (#13881) * Add some common nupkg properties to everything * Remove project property refactored into directory build props * Remove properties now in common dir build props * Add net6 version of project * More net6 * Only target netstandard2.0 now net4* is no longer needed as there's no more vs2017 support * Clean up strong naming a bit * Update dependencies * Package all the things for build tasks in the -t:Pack * Add more net6 project versions * Clean up whitespace * Needed moar NET6 * Name fixes * Added meta project for packaging and package script * Remove assembly copyright (now duplicates) * Add resizetizer, add params to package script * Disable strong naming for now We need to re-evaluate how we do this a bit, we should probably use the `al` tool to do it now, and I believe the StrongNamer package may not work anymore, but we can do the same thing in a custom target at a later date. * Fix path to tasks assembly * don't build ios on android specific project * Finish rename of toolbox file * - add cake * - fix cake extras * fix the copy for the IDE * Try packing on CI * versions baby! * build release * this should od it * this * oops * Move to an empty folder * Use new symbol formats * no symbols for build tasks and the head * symbol all the things * Compiler error with commented out code XD * oopsies * only build transitive * Try this * log everything * This might work * REPORTS * previews * needed * versions * duh * Update build.cake Co-authored-by: Shane Neuville <shneuvil@microsoft.com> Co-authored-by: Matthew Leibowitz <mattleibow@live.com>
2021-03-02 20:36:17 +03:00
dependsOn: []
jobs:
- ${{ each BuildPlatform in parameters.PackPlatforms }}:
- job: pack_net6_${{ BuildPlatform.name }}
workspace:
clean: all
displayName: ${{ BuildPlatform.name }}
timeoutInMinutes: 120
pool:
name: ${{ BuildPlatform.poolName }}
vmImage: ${{ BuildPlatform.vmImage }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
${{ if startsWith(BuildPlatform.poolName, 'VSEng-VSMac-Xamarin-Shared') }}:
demands:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- macOS.Name -equals BigSur
- macOS.Architecture -equals x64
- Agent.HasDevices -equals False
- Agent.IsPaired -equals False
steps:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- ${{ if eq(BuildPlatform.name, 'macOS') }}:
- template: agent-cleanser/v1.yml@xamarin-templates
parameters:
UninstallMono: false
UninstallXamarinMac: false
- template: common/provision.yml
parameters:
platform: ${{ BuildPlatform.name }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
poolName: ${{ BuildPlatform.poolName }}
- pwsh: ./build.ps1 --target=dotnet-pack --configuration="Release" --verbosity=diagnostic
displayName: 'Pack .NET Maui'
2022-01-28 19:01:57 +03:00
- ${{ if eq(BuildPlatform.name, 'Windows') }}:
- pwsh: ./build.ps1 --target=dotnet-diff --configuration="Release" --verbosity=diagnostic
displayName: 'Diff .NET Maui artifacts with NuGet'
- task: CopyFiles@2
.NET MAUI is now a "workload" (#603) TDLR: Microsoft.Maui.* NuGet packages are removed in favor of .NET Workloads. See `src/Workloads/README.md` for full details. The idea, is a project to be able to set `$(UseMaui)`: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net6.0-android</TargetFramework> <OutputType>Exe</OutputType> <UseMaui>true</UseMaui> </PropertyGroup> </Project> `$(UseMaui)` automatically brings in the following workload packs: * `Microsoft.NET.Sdk.Maui` * `Microsoft.Maui.Controls.Sdk` * `Microsoft.Maui.Resizetizer.Sdk` * `Microsoft.Maui.Core.Ref.[platform]` * `Microsoft.Maui.Core.Runtime.[platform]` * `Microsoft.Maui.Controls.Ref.[platform]` * `Microsoft.Maui.Controls.Runtime.[platform]` * `Microsoft.Maui.Dependencies` * `Microsoft.Maui.Essentials.Ref.[platform]` * `Microsoft.Maui.Essentials.Runtime.[platform]` * `Microsoft.Maui.Extensions` * `Microsoft.Maui.Templates` BlazorWebView is an addition to MAUI, project can currently opt into it by adding `.Razor` to the `Sdk` attribute. `<Project Sdk="Microsoft.NET.Sdk.Razor">` sets `$(UsingMicrosoftNETSdkRazor)`, which triggers the MAUI workload to include: * `Microsoft.AspNetCore.Components.WebView.Maui` This will automatically add these dependencies: <PackageReference Include="Microsoft.AspNetCore.Authorization" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebView" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" /> <PackageReference Include="Microsoft.JSInterop" /> If you are a .NET 6 project, but don't want to use Microsoft.Maui.Controls you could bring in partial parts of MAUI. `$(UseMauiAssets)` brings in `Microsoft.Maui.Resizetizer.Sdk`. `$(UseMauiCore)` brings in: * `Microsoft.Maui.Core.Ref.[platform]` * `Microsoft.Maui.Core.Runtime.[platform]` `$(UseMauiEssentials)` brings in: * `Microsoft.Maui.Essentials.Ref.[platform]` * `Microsoft.Maui.Essentials.Runtime.[platform]` Special files: * `AutoImport.props` - defines the default includes (or wildcards) for Maui projects will go. Note that this is imported by *all* .NET 6 project types -- *even non-mobile ones*. * `WorkloadManifest.json` - general .NET workload configuration * `WorkloadManifest.targets` - imports `Microsoft.Maui.Controls.Sdk` when `$(UseMaui)` is `true`. Note that this is imported by *all* .NET 6 project types -- *even non-mobile ones*. For further details about .NET Workloads, see these .NET design docs: * [.NET Optional SDK Workloads](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md) * [Workload Resolvers](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md) * [Workload Manifests](https://github.com/mhutch/designs/blob/b82449a228c0addb95b5a4995bb838749ea6f8cc/accepted/2020/workloads/workload-manifest.md)
2021-06-16 19:59:53 +03:00
condition: always()
displayName: 'Copy files to staging'
inputs:
Contents: |
artifacts/**/*.*nupkg
artifacts/**/*.zip
artifacts/vs-workload.props
eng/automation/SignList.xml
TargetFolder: $(build.artifactstagingdirectory)
flattenFolders: true
2021-09-23 00:17:22 +03:00
- task: CopyFiles@2
condition: always()
displayName: 'Copy metadata to staging'
2021-09-23 00:17:22 +03:00
inputs:
SourceFolder: artifacts
Contents: |
metadata/**
2022-01-28 19:01:57 +03:00
api-diff/**
2021-09-23 00:17:22 +03:00
TargetFolder: $(build.artifactstagingdirectory)
- task: CopyFiles@2
displayName: 'Copy Log Files'
condition: always()
inputs:
Contents: |
artifacts/logs/**
TargetFolder: $(build.artifactstagingdirectory)/logs
flattenFolders: true
- task: PublishBuildArtifacts@1
condition: always()
displayName: publish artifacts
inputs:
ArtifactName: ${{ BuildPlatform.artifact }}
- stage: samples_net6
displayName: Build .NET 6 Samples
.NET MAUI is now a "workload" (#603) TDLR: Microsoft.Maui.* NuGet packages are removed in favor of .NET Workloads. See `src/Workloads/README.md` for full details. The idea, is a project to be able to set `$(UseMaui)`: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net6.0-android</TargetFramework> <OutputType>Exe</OutputType> <UseMaui>true</UseMaui> </PropertyGroup> </Project> `$(UseMaui)` automatically brings in the following workload packs: * `Microsoft.NET.Sdk.Maui` * `Microsoft.Maui.Controls.Sdk` * `Microsoft.Maui.Resizetizer.Sdk` * `Microsoft.Maui.Core.Ref.[platform]` * `Microsoft.Maui.Core.Runtime.[platform]` * `Microsoft.Maui.Controls.Ref.[platform]` * `Microsoft.Maui.Controls.Runtime.[platform]` * `Microsoft.Maui.Dependencies` * `Microsoft.Maui.Essentials.Ref.[platform]` * `Microsoft.Maui.Essentials.Runtime.[platform]` * `Microsoft.Maui.Extensions` * `Microsoft.Maui.Templates` BlazorWebView is an addition to MAUI, project can currently opt into it by adding `.Razor` to the `Sdk` attribute. `<Project Sdk="Microsoft.NET.Sdk.Razor">` sets `$(UsingMicrosoftNETSdkRazor)`, which triggers the MAUI workload to include: * `Microsoft.AspNetCore.Components.WebView.Maui` This will automatically add these dependencies: <PackageReference Include="Microsoft.AspNetCore.Authorization" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebView" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" /> <PackageReference Include="Microsoft.JSInterop" /> If you are a .NET 6 project, but don't want to use Microsoft.Maui.Controls you could bring in partial parts of MAUI. `$(UseMauiAssets)` brings in `Microsoft.Maui.Resizetizer.Sdk`. `$(UseMauiCore)` brings in: * `Microsoft.Maui.Core.Ref.[platform]` * `Microsoft.Maui.Core.Runtime.[platform]` `$(UseMauiEssentials)` brings in: * `Microsoft.Maui.Essentials.Ref.[platform]` * `Microsoft.Maui.Essentials.Runtime.[platform]` Special files: * `AutoImport.props` - defines the default includes (or wildcards) for Maui projects will go. Note that this is imported by *all* .NET 6 project types -- *even non-mobile ones*. * `WorkloadManifest.json` - general .NET workload configuration * `WorkloadManifest.targets` - imports `Microsoft.Maui.Controls.Sdk` when `$(UseMaui)` is `true`. Note that this is imported by *all* .NET 6 project types -- *even non-mobile ones*. For further details about .NET Workloads, see these .NET design docs: * [.NET Optional SDK Workloads](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md) * [Workload Resolvers](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md) * [Workload Manifests](https://github.com/mhutch/designs/blob/b82449a228c0addb95b5a4995bb838749ea6f8cc/accepted/2020/workloads/workload-manifest.md)
2021-06-16 19:59:53 +03:00
dependsOn: pack_net6
jobs:
- ${{ each BuildPlatform in parameters.BuildPlatforms }}:
- ${{ each BuildConfiguration in parameters.BuildConfigurations }}:
- job: build_net6_${{ BuildPlatform.name }}_${{ BuildConfiguration }}
workspace:
clean: all
displayName: ${{ BuildPlatform.name }} (${{ BuildConfiguration }})
timeoutInMinutes: 120
condition: or(
${{ parameters.BuildEverything }},
ne(variables['Build.Reason'], 'PullRequest'),
eq('${{ BuildConfiguration }}', 'Release'))
pool:
name: ${{ BuildPlatform.poolName }}
vmImage: ${{ BuildPlatform.vmImage }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
${{ if startsWith(BuildPlatform.poolName, 'VSEng-VSMac-Xamarin-Shared') }}:
demands:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- macOS.Name -equals BigSur
- macOS.Architecture -equals x64
- Agent.HasDevices -equals False
- Agent.IsPaired -equals False
steps:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- ${{ if eq(BuildPlatform.name, 'macOS') }}:
- template: agent-cleanser/v1.yml@xamarin-templates
parameters:
UninstallMono: false
UninstallXamarinMac: false
- template: common/provision.yml
parameters:
platform: ${{ BuildPlatform.name }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
poolName: ${{ BuildPlatform.poolName }}
- task: DownloadBuildArtifacts@0
displayName: 'Download Packages'
.NET MAUI is now a "workload" (#603) TDLR: Microsoft.Maui.* NuGet packages are removed in favor of .NET Workloads. See `src/Workloads/README.md` for full details. The idea, is a project to be able to set `$(UseMaui)`: <Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net6.0-android</TargetFramework> <OutputType>Exe</OutputType> <UseMaui>true</UseMaui> </PropertyGroup> </Project> `$(UseMaui)` automatically brings in the following workload packs: * `Microsoft.NET.Sdk.Maui` * `Microsoft.Maui.Controls.Sdk` * `Microsoft.Maui.Resizetizer.Sdk` * `Microsoft.Maui.Core.Ref.[platform]` * `Microsoft.Maui.Core.Runtime.[platform]` * `Microsoft.Maui.Controls.Ref.[platform]` * `Microsoft.Maui.Controls.Runtime.[platform]` * `Microsoft.Maui.Dependencies` * `Microsoft.Maui.Essentials.Ref.[platform]` * `Microsoft.Maui.Essentials.Runtime.[platform]` * `Microsoft.Maui.Extensions` * `Microsoft.Maui.Templates` BlazorWebView is an addition to MAUI, project can currently opt into it by adding `.Razor` to the `Sdk` attribute. `<Project Sdk="Microsoft.NET.Sdk.Razor">` sets `$(UsingMicrosoftNETSdkRazor)`, which triggers the MAUI workload to include: * `Microsoft.AspNetCore.Components.WebView.Maui` This will automatically add these dependencies: <PackageReference Include="Microsoft.AspNetCore.Authorization" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebView" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebView.Maui" /> <PackageReference Include="Microsoft.JSInterop" /> If you are a .NET 6 project, but don't want to use Microsoft.Maui.Controls you could bring in partial parts of MAUI. `$(UseMauiAssets)` brings in `Microsoft.Maui.Resizetizer.Sdk`. `$(UseMauiCore)` brings in: * `Microsoft.Maui.Core.Ref.[platform]` * `Microsoft.Maui.Core.Runtime.[platform]` `$(UseMauiEssentials)` brings in: * `Microsoft.Maui.Essentials.Ref.[platform]` * `Microsoft.Maui.Essentials.Runtime.[platform]` Special files: * `AutoImport.props` - defines the default includes (or wildcards) for Maui projects will go. Note that this is imported by *all* .NET 6 project types -- *even non-mobile ones*. * `WorkloadManifest.json` - general .NET workload configuration * `WorkloadManifest.targets` - imports `Microsoft.Maui.Controls.Sdk` when `$(UseMaui)` is `true`. Note that this is imported by *all* .NET 6 project types -- *even non-mobile ones*. For further details about .NET Workloads, see these .NET design docs: * [.NET Optional SDK Workloads](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workloads.md) * [Workload Resolvers](https://github.com/dotnet/designs/blob/main/accepted/2020/workloads/workload-resolvers.md) * [Workload Manifests](https://github.com/mhutch/designs/blob/b82449a228c0addb95b5a4995bb838749ea6f8cc/accepted/2020/workloads/workload-manifest.md)
2021-06-16 19:59:53 +03:00
inputs:
artifactName: nuget
itemPattern: '**/*.nupkg'
downloadPath: $(System.DefaultWorkingDirectory)/artifacts
- pwsh: Move-Item -Path artifacts\nuget\*.nupkg -Destination artifacts -Force
displayName: Move the downloaded artifacts
- pwsh: ./build.ps1 --target=dotnet-local-workloads --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Install .NET (Local Workloads)'
- pwsh: ./build.ps1 --target=dotnet-samples --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Build .NET 6 Samples'
2021-08-26 01:51:03 +03:00
- task: PublishBuildArtifacts@1
condition: always()
displayName: publish artifacts
inputs:
ArtifactName: ${{ BuildPlatform.artifact }}
- stage: templates_net6
displayName: Build .NET 6 Templates
dependsOn: pack_net6
jobs:
- ${{ each BuildPlatform in parameters.BuildPlatforms }}:
- ${{ each BuildConfiguration in parameters.BuildConfigurations }}:
- job: build_net6_${{ BuildPlatform.name }}_${{ BuildConfiguration }}
workspace:
clean: all
displayName: ${{ BuildPlatform.name }} (${{ BuildConfiguration }})
timeoutInMinutes: 120
condition: or(
${{ parameters.BuildEverything }},
ne(variables['Build.Reason'], 'PullRequest'),
eq('${{ BuildConfiguration }}', 'Release'))
pool:
name: ${{ BuildPlatform.poolName }}
vmImage: ${{ BuildPlatform.vmImage }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
${{ if startsWith(BuildPlatform.poolName, 'VSEng-VSMac-Xamarin-Shared') }}:
demands:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- macOS.Name -equals BigSur
- macOS.Architecture -equals x64
- Agent.HasDevices -equals False
- Agent.IsPaired -equals False
2021-08-26 01:51:03 +03:00
steps:
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
- ${{ if eq(BuildPlatform.name, 'macOS') }}:
- template: agent-cleanser/v1.yml@xamarin-templates
parameters:
UninstallMono: false
UninstallXamarinMac: false
2021-08-26 01:51:03 +03:00
- template: common/provision.yml
parameters:
platform: ${{ BuildPlatform.name }}
[ci] Target the Mac internal-macOS-11 hosted agent pool (#4241) * Target the internal-macOS-11 hosted agent pool * Pool name letter casing: internal-macos-11 * Update 'macOS' letter casing in BuildPlatform.name conditions * Fix spacing * Repo reference to yaml-templates * Fix: Template references: yaml-templates -> xamarin-templates * Agent.OSArchitecture is not defined as a capability on agents in the internal-macos-11 pool * Select .NET 6 * UseDotNet task title: Use .NET SDK 6 * Provision needed dependencies on hosted Mac pool Provisioning: Support for 'provisioning' parameter, which is set when macOS is true * Use alternate expansion for parameters.provisioning setting * provision: Always provision additional software on macOS * Dedicated provisioning step & script for mono * Dedicated task & script for provisioning Xamarin.Mac * Provision additional software when running against an on-prem agent pool and not a hosted pool * Fix: Provision Additional Software: Conditional syntax missing closing paren * Provision Additional Software condition: Remove superfluous space * Apply desired set of on-prem pool demands to ensure build is vectored to an x64 Big Sur machine having no devices or pairing * Only apply shared pool demands when running on an agent in the shared pool * agent-cleanser: Only cleanse off mono & Xamarin.Mac when run on a hosted agent. Then provision the versions that the pipeline needs * Fix: agent-cleanser parameters: Terminating colon missing on 'if' conditionals * Fix: Avoid including agent demands when running on a hosted pool * Reset agent Mac pool settings to use macOSXNet6VmPool and macOSXNet6VmImage variables * Simplify demands to apply only to the shared pool * Remove special handling for cleansing & reinstall of mono and Xamarin.Mac. Depend on the versions provided by the agent * TEST: Target hosted pool to ensure pipeline works there * Revert test changes: Target Mac agent pools defined on build def
2022-01-26 13:50:07 +03:00
poolName: ${{ BuildPlatform.poolName }}
2021-08-26 01:51:03 +03:00
- task: DownloadBuildArtifacts@0
displayName: 'Download Packages'
inputs:
artifactName: nuget
itemPattern: '**/*.nupkg'
downloadPath: $(System.DefaultWorkingDirectory)/artifacts
- pwsh: Move-Item -Path artifacts\nuget\*.nupkg -Destination artifacts -Force
displayName: Move the downloaded artifacts
- pwsh: ./build.ps1 --target=dotnet-local-workloads --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Install .NET (Local Workloads)'
- pwsh: ./build.ps1 --target=dotnet-templates --configuration="${{ BuildConfiguration }}" --verbosity=diagnostic
displayName: 'Build .NET 6 Templates'
- task: PublishBuildArtifacts@1
condition: always()
displayName: publish artifacts
inputs:
ArtifactName: ${{ BuildPlatform.artifact }}
2021-03-04 22:41:31 +03:00
- template: common/security_compliance.yml
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- template: common/localization-handoff.yml # Process outgoing strings [Localization Handoff]
- template: common/localization-handback.yml # Process incoming translations and Create PR to main [Localization Handback]
- template: common/merge-translations-update.yml # Validating incoming translations strings and merge PR [Localization Handback]
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: # Sign only using the private server
2021-03-04 22:41:31 +03:00
- stage: nuget_signing
2021-03-06 04:36:17 +03:00
dependsOn: pack_net6
2021-03-04 22:41:31 +03:00
displayName: Sign Nuget
jobs:
- template: sign-artifacts/jobs/v2.yml@xamarin-templates
parameters:
2021-05-08 01:58:58 +03:00
signType: Real
teamName: $(TeamName)
2021-03-04 22:41:31 +03:00
usePipelineArtifactTasks: false
targetFolder: $(Build.ArtifactStagingDirectory)/nuget/signed
signedArtifactName: nuget
signedArtifactPath: signed
displayName: Sign Phase
condition: and(succeeded(), or(eq(variables['Sign'], 'true'), or(eq(variables['Build.SourceBranch'], 'refs/heads/main'), or(startsWith(variables['Build.SourceBranch'],'refs/tags/'), startsWith(variables['Build.SourceBranch'],'refs/heads/release/') ))))
- template: nuget-msi-convert/job/v2.yml@xamarin-templates
parameters:
yamlResourceName: xamarin-templates
dependsOn: signing
artifactName: nuget
artifactPatterns: |
**/signed/*.nupkg
artifactPath: signed
propsArtifactName: nuget
signType: Real
- template: vs-insertion/stage/v1.yml@xamarin-templates
parameters:
dependsOn: nuget_signing
approvalTimeoutInMinutes: 30
symbolArtifactName: nuget
symbolArtifactPatterns: |
**/signed/*.nupkg
**/*.snupkg
**/additional-assets.zip
pushToShippingFeed: true
nupkgArtifactName: nuget
nupkgArtifactPatterns: |
**/signed/*.nupkg
msiNupkgArtifactName: vs-msi-nugets