From d8a98cfac32f6733016443ce8a8680b9b1225466 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 05:42:37 +0200 Subject: [PATCH 01/63] Use a macOS Monterey pool --- scripts/azure-pipelines-tests.yml | 9 +++++++-- scripts/azure-pipelines-variables.yml | 10 +++++----- scripts/azure-pipelines.yml | 11 ++++++++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/scripts/azure-pipelines-tests.yml b/scripts/azure-pipelines-tests.yml index 3265a46ab06..052779d8a33 100644 --- a/scripts/azure-pipelines-tests.yml +++ b/scripts/azure-pipelines-tests.yml @@ -15,8 +15,13 @@ parameters: - name: VM_IMAGE_MAC type: object default: - name: Azure Pipelines - vmImage: macOS-10.15 + name: VSEng-VSMac-Xamarin-Shared + vmImage: VSEng-VSMac-Xamarin-Shared + demands: + - macOS.Name -equals Monterey + - macOS.Architecture -equals x64 + - Agent.HasDevices -equals False + - Agent.IsPaired -equals False - name: VM_IMAGE_LINUX type: object default: diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index 4a9e5ab0455..e549561e5bb 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -12,11 +12,11 @@ variables: MANAGED_LINUX_PACKAGES: ttf-ancient-fonts ninja-build MONO_VERSION_MACOS: '6_12_7' MONO_VERSION_LINUX: '' - XCODE_VERSION: 12.4 - DOTNET_VERSION_PREVIOUS: 3.1.416 - DOTNET_VERSION: 5.0.405 - DOTNET_VERSION_PREVIEW: '6.0.200-rtm.22107.3' - DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.200/preview.14.json' + XCODE_VERSION: 13.3 + DOTNET_VERSION_PREVIOUS: 3.1.417 + DOTNET_VERSION: 5.0.406 + DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' + DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.1.json' CONFIGURATION: 'Release' DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true THROW_ON_TEST_FAILURE: true diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index d84bb40ca23..91a8f291dd3 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -12,7 +12,7 @@ parameters: - name: buildExternals displayName: 'The specific native artifacts to use for this build.' type: number - default: 0 + default: 5836420 - name: VM_IMAGE_WINDOWS type: object default: @@ -21,8 +21,13 @@ parameters: - name: VM_IMAGE_MAC type: object default: - name: Azure Pipelines - vmImage: macOS-10.15 + name: VSEng-VSMac-Xamarin-Shared + vmImage: VSEng-VSMac-Xamarin-Shared + demands: + - macOS.Name -equals Monterey + - macOS.Architecture -equals x64 + - Agent.HasDevices -equals False + - Agent.IsPaired -equals False - name: VM_IMAGE_LINUX type: object default: From 89acfb4860c84ba2ad7020dd5e0e6a6d2f650eca Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 05:55:02 +0200 Subject: [PATCH 02/63] Use different machines for managed and unmanaged --- scripts/azure-pipelines-tests.yml | 8 ++++ scripts/azure-pipelines.yml | 8 ++++ scripts/azure-templates-stages.yml | 63 ++++++++++++++++-------------- 3 files changed, 49 insertions(+), 30 deletions(-) diff --git a/scripts/azure-pipelines-tests.yml b/scripts/azure-pipelines-tests.yml index 052779d8a33..5279b033547 100644 --- a/scripts/azure-pipelines-tests.yml +++ b/scripts/azure-pipelines-tests.yml @@ -12,6 +12,11 @@ parameters: default: name: Azure Pipelines vmImage: windows-2022 + - name: VM_IMAGE_MAC_NATIVE + type: object + default: + name: Azure Pipelines + vmImage: macOS-10.15 - name: VM_IMAGE_MAC type: object default: @@ -49,5 +54,8 @@ stages: isBuildPipeline: false buildExternals: ${{ parameters.buildExternals }} VM_IMAGE_WINDOWS: ${{ parameters.VM_IMAGE_WINDOWS }} + VM_IMAGE_WINDOWS_NATIVE: ${{ parameters.VM_IMAGE_WINDOWS }} VM_IMAGE_MAC: ${{ parameters.VM_IMAGE_MAC }} + VM_IMAGE_MAC_NATIVE: ${{ parameters.VM_IMAGE_MAC_NATIVE }} VM_IMAGE_LINUX: ${{ parameters.VM_IMAGE_LINUX }} + VM_IMAGE_LINUX_NATIVE: ${{ parameters.VM_IMAGE_LINUX }} diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 91a8f291dd3..481fb2fafd5 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -18,6 +18,11 @@ parameters: default: name: Azure Pipelines vmImage: windows-2022 + - name: VM_IMAGE_MAC_NATIVE + type: object + default: + name: Azure Pipelines + vmImage: macOS-10.15 - name: VM_IMAGE_MAC type: object default: @@ -51,5 +56,8 @@ stages: isBuildPipeline: true buildExternals: ${{ parameters.buildExternals }} VM_IMAGE_WINDOWS: ${{ parameters.VM_IMAGE_WINDOWS }} + VM_IMAGE_WINDOWS_NATIVE: ${{ parameters.VM_IMAGE_WINDOWS }} VM_IMAGE_MAC: ${{ parameters.VM_IMAGE_MAC }} + VM_IMAGE_MAC_NATIVE: ${{ parameters.VM_IMAGE_MAC_NATIVE }} VM_IMAGE_LINUX: ${{ parameters.VM_IMAGE_LINUX }} + VM_IMAGE_LINUX_NATIVE: ${{ parameters.VM_IMAGE_LINUX }} diff --git a/scripts/azure-templates-stages.yml b/scripts/azure-templates-stages.yml index aa9a41d8822..10430b8b466 100644 --- a/scripts/azure-templates-stages.yml +++ b/scripts/azure-templates-stages.yml @@ -2,8 +2,11 @@ parameters: isBuildPipeline: true buildExternals: 0 VM_IMAGE_WINDOWS: '' + VM_IMAGE_WINDOWS_NATIVE: '' VM_IMAGE_MAC: '' + VM_IMAGE_MAC_NATIVE: '' VM_IMAGE_LINUX: '' + VM_IMAGE_LINUX_NATIVE: '' stages: - stage: prepare @@ -36,7 +39,7 @@ stages: displayName: Android x86 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-android additionalArgs: --buildarch=x86 installWindowsSdk: false @@ -47,7 +50,7 @@ stages: displayName: Android x64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-android additionalArgs: --buildarch=x64 installWindowsSdk: false @@ -58,7 +61,7 @@ stages: displayName: Android arm buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-android additionalArgs: --buildarch=arm installWindowsSdk: false @@ -69,7 +72,7 @@ stages: displayName: Android arm64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-android additionalArgs: --buildarch=arm64 installWindowsSdk: false @@ -80,7 +83,7 @@ stages: displayName: Tizen buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-tizen installWindowsSdk: false artifactName: native @@ -90,7 +93,7 @@ stages: displayName: ANGLE x86 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: ANGLE additionalArgs: -Script .\native\uwp\build.cake --buildarch=x86 artifactName: native @@ -100,7 +103,7 @@ stages: displayName: ANGLE x64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: ANGLE additionalArgs: -Script .\native\uwp\build.cake --buildarch=x64 artifactName: native @@ -110,7 +113,7 @@ stages: displayName: ANGLE arm buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: ANGLE additionalArgs: -Script .\native\uwp\build.cake --buildarch=arm artifactName: native @@ -120,7 +123,7 @@ stages: displayName: ANGLE arm64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: ANGLE additionalArgs: -Script .\native\uwp\build.cake --buildarch=arm64 artifactName: native @@ -130,7 +133,7 @@ stages: displayName: UWP x86 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-uwp additionalArgs: --buildarch=x86 --skipAngle=true artifactName: native @@ -139,7 +142,7 @@ stages: name: native_uwp_x64_windows displayName: UWP x64 buildExternals: ${{ parameters.buildExternals }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-uwp additionalArgs: --buildarch=x64 --skipAngle=true artifactName: native @@ -149,7 +152,7 @@ stages: displayName: UWP arm buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-uwp additionalArgs: --buildarch=arm --skipAngle=true artifactName: native @@ -159,7 +162,7 @@ stages: displayName: UWP arm64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-uwp additionalArgs: --buildarch=arm64 --skipAngle=true artifactName: native @@ -169,7 +172,7 @@ stages: displayName: Win32 x86 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-windows additionalArgs: --buildarch=x86 artifactName: native @@ -179,7 +182,7 @@ stages: displayName: Win32 x64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-windows additionalArgs: --buildarch=x64 artifactName: native @@ -189,7 +192,7 @@ stages: displayName: Win32 arm64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-windows additionalArgs: --buildarch=arm64 artifactName: native @@ -199,7 +202,7 @@ stages: displayName: Nano Server x64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_WINDOWS}} + vmImage: ${{ parameters.VM_IMAGE_WINDOWS_NATIVE }} target: externals-nanoserver additionalArgs: --buildarch=x64 artifactName: native @@ -215,7 +218,7 @@ stages: displayName: Android x86 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-android additionalArgs: --buildarch=x86 - template: azure-templates-bootstrapper.yml # Build Native Android|x64 (macOS) @@ -224,7 +227,7 @@ stages: displayName: Android x64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-android additionalArgs: --buildarch=x64 - template: azure-templates-bootstrapper.yml # Build Native Android|arm (macOS) @@ -233,7 +236,7 @@ stages: displayName: Android arm buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-android additionalArgs: --buildarch=arm - template: azure-templates-bootstrapper.yml # Build Native Android|arm64 (macOS) @@ -242,7 +245,7 @@ stages: displayName: Android arm64 buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-android additionalArgs: --buildarch=arm64 - template: azure-templates-bootstrapper.yml # Build Native iOS (macOS) @@ -251,7 +254,7 @@ stages: displayName: iOS buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-ios artifactName: native - template: azure-templates-bootstrapper.yml # Build Native Mac Catalyst (macOS) @@ -260,7 +263,7 @@ stages: displayName: Mac Catalyst buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-maccatalyst artifactName: native - template: azure-templates-bootstrapper.yml # Build Native macOS (macOS) @@ -269,7 +272,7 @@ stages: displayName: macOS buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-macos artifactName: native - template: azure-templates-bootstrapper.yml # Build Native tvOS (macOS) @@ -278,7 +281,7 @@ stages: displayName: tvOS buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-tvos artifactName: native - template: azure-templates-bootstrapper.yml # Build Native watchOS (macOS) @@ -287,7 +290,7 @@ stages: displayName: watchOS buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-watchos artifactName: native - template: azure-templates-bootstrapper.yml # Build Native Tizen (macOS) @@ -296,7 +299,7 @@ stages: displayName: Tizen buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_MAC }} + vmImage: ${{ parameters.VM_IMAGE_MAC_NATIVE }} target: externals-tizen condition: false # TODO: TIZEN INSTALL BUGS @@ -310,7 +313,7 @@ stages: artifactName: native buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_LINUX }} + vmImage: ${{ parameters.VM_IMAGE_LINUX_NATIVE }} builds: - name: '' - name: nodeps @@ -336,7 +339,7 @@ stages: displayName: Tizen buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_LINUX }} + vmImage: ${{ parameters.VM_IMAGE_LINUX_NATIVE }} packages: $(TIZEN_LINUX_PACKAGES) target: externals-tizen @@ -349,7 +352,7 @@ stages: parameters: buildExternals: ${{ parameters.buildExternals }} isBuildPipeline: ${{ parameters.isBuildPipeline }} - vmImage: ${{ parameters.VM_IMAGE_LINUX }} + vmImage: ${{ parameters.VM_IMAGE_LINUX_NATIVE }} artifactName: native emscripten: - 2.0.5 From 8ec4cfd35d76445bfd96a0634dcc15a1aba5ad7a Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 06:54:07 +0200 Subject: [PATCH 03/63] this --- scripts/azure-templates-build.yml | 15 ++++++++++----- scripts/install-dotnet-workloads.ps1 | 8 +++----- scripts/install-dotnet.ps1 | 19 ++++++++++++++----- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 7463a5bfd42..e8936a3f653 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -54,14 +54,19 @@ jobs: sudo apt update sudo apt install -y ${{ parameters.packages }} displayName: Install additional package dependencies - condition: ne('${{ parameters.packages }}', '') + condition: and(succeeded(), ne('${{ parameters.packages }}', '')) # make sure mono/msbuild is the correct version - ${{ if and(ne(variables['MONO_VERSION_LINUX'], ''), eq(parameters.docker, ''), endsWith(parameters.name, '_linux')) }}: - bash: ./scripts/install-mono.sh $(MONO_VERSION_LINUX) displayName: Install Mono and MSBuild - ${{ if endsWith(parameters.name, '_macos') }}: - - bash: sudo $(Agent.HomeDirectory)/scripts/select-xamarin-sdk.sh $(MONO_VERSION_MACOS) + - bash: | + ls -l '/Library/Frameworks/Mono.framework/Versions' + ls -l '/Library/Frameworks/Xamarin.iOS.framework/Versions' + ls -l '/Library/Frameworks/Xamarin.Android.framework/Versions' + ls -l '/Library/Frameworks/Xamarin.Mac.framework/Versions' + sudo $(Agent.HomeDirectory)/scripts/select-xamarin-sdk.sh $(MONO_VERSION_MACOS) displayName: Switch to the latest Xamarin SDK # install extra bits for the native builds @@ -129,17 +134,17 @@ jobs: # install the bits needed for .NET 6 builds - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core - condition: ne(variables.DOTNET_VERSION_PREVIEW, '') + condition: and(succeeded(), ne(variables.DOTNET_VERSION_PREVIEW, '')) - ${{ if endsWith(parameters.name, '_windows') }}: - ${{ if eq(parameters.installPreviewVs, 'true') }}: - pwsh: .\scripts\install-vs.ps1 displayName: Install Visual Studio - ${{ if not(endsWith(parameters.name, '_linux')) }}: - pwsh: .\scripts\install-dotnet-workloads.ps1 -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" -SourceUrl "$env:DOTNET_WORKLOAD_SOURCE" -IsPreview $true - condition: ne(variables.DOTNET_VERSION_PREVIEW, '') + condition: and(succeeded(), ne(variables.DOTNET_VERSION_PREVIEW, '')) displayName: Install the preview .NET Core workloads - pwsh: .\scripts\install-dotnet-workloads.ps1 -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" -SourceUrl "$env:DOTNET_WORKLOAD_SOURCE" -IsPreview $false - condition: eq(variables.DOTNET_VERSION_PREVIEW, '') + condition: and(succeeded(), eq(variables.DOTNET_VERSION_PREVIEW, '')) displayName: Install the .NET Core workloads # display dotnet info - pwsh: dotnet --info diff --git a/scripts/install-dotnet-workloads.ps1 b/scripts/install-dotnet-workloads.ps1 index df505433977..48ec1de6916 100644 --- a/scripts/install-dotnet-workloads.ps1 +++ b/scripts/install-dotnet-workloads.ps1 @@ -1,13 +1,11 @@ Param( - [string] $InstallDir, - [string] $SourceUrl, - [boolean] $IsPreview = $true + [string] $SourceUrl, + [string] $InstallDir, + [boolean] $IsPreview = $true ) $ErrorActionPreference = 'Stop' -$env:DOTNET_ROOT="$InstallDir" - $previewFeed = 'https://api.nuget.org/v3/index.json' $previewRuntime = 'https://api.nuget.org/v3/index.json' $previewEmscripten = 'https://api.nuget.org/v3/index.json' diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index fd2697a0eb4..549cf933171 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -1,7 +1,7 @@ Param( - [string] $Version, - [string] $InstallDir, - [string] $FeedUrl = "https://dotnetbuilds.blob.core.windows.net/public" + [string] $Version, + [string] $InstallDir, + [string] $FeedUrl = "https://dotnetbuilds.blob.core.windows.net/public" ) $ErrorActionPreference = 'Stop' @@ -26,7 +26,16 @@ if ($IsMacOS) { .\dotnet-install.ps1 -Version "$Version" -InstallDir "$InstallDir" -AzureFeed "$FeedUrl" -Verbose } -Write-Host "Installed .NET Versions:" -& dotnet --list-sdks +$env:DOTNET_INSTALL_DIR=$InstallDir +$env:DOTNET_ROOT=$InstallDir +$env:DOTNET_MULTILEVEL_LOOKUP=0 + +Write-Host "##vso[task.setvariable variable=DOTNET_INSTALL_DIR;]$InstallDir"; +Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; +Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; + +Write-Host "##vso[task.setvariable variable=PATH;]$InstallDir;$env:PATH"; + +& dotnet --info exit $LASTEXITCODE From 996964b2e037b3d09fced0c380fb072afd3211b2 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 07:13:52 +0200 Subject: [PATCH 04/63] this --- scripts/azure-pipelines-tests.yml | 2 +- scripts/azure-pipelines-variables.yml | 3 ++- scripts/azure-pipelines.yml | 2 +- scripts/azure-templates-build.yml | 15 +++++++-------- scripts/select-xamarin.sh | 9 +++++++++ scripts/select-xcode.sh | 7 +++++++ 6 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 scripts/select-xamarin.sh create mode 100644 scripts/select-xcode.sh diff --git a/scripts/azure-pipelines-tests.yml b/scripts/azure-pipelines-tests.yml index 5279b033547..9991b79264c 100644 --- a/scripts/azure-pipelines-tests.yml +++ b/scripts/azure-pipelines-tests.yml @@ -16,7 +16,7 @@ parameters: type: object default: name: Azure Pipelines - vmImage: macOS-10.15 + vmImage: macos-11 - name: VM_IMAGE_MAC type: object default: diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index e549561e5bb..e80cf961c21 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -10,9 +10,10 @@ variables: BUILD_NUMBER: $[counter(format('_{0}_{1}_{2}__', variables['SKIASHARP_VERSION'], variables['Build.SourceBranch'], variables['PREVIEW_LABEL']), 1)] TIZEN_LINUX_PACKAGES: libxcb-xfixes0 libxcb-render-util0 libwebkitgtk-1.0-0 libxcb-image0 acl libsdl1.2debian libv4l-0 libxcb-randr0 libxcb-shape0 libxcb-icccm4 libsm6 gettext rpm2cpio cpio bridge-utils openvpn MANAGED_LINUX_PACKAGES: ttf-ancient-fonts ninja-build - MONO_VERSION_MACOS: '6_12_7' + MONO_VERSION_MACOS: '6_12_13' MONO_VERSION_LINUX: '' XCODE_VERSION: 13.3 + XCODE_VERSION_NATIVE: 13.2.1 DOTNET_VERSION_PREVIOUS: 3.1.417 DOTNET_VERSION: 5.0.406 DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 481fb2fafd5..313f705927e 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -22,7 +22,7 @@ parameters: type: object default: name: Azure Pipelines - vmImage: macOS-10.15 + vmImage: macos-11 - name: VM_IMAGE_MAC type: object default: diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index e8936a3f653..71fb1408e00 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -61,12 +61,7 @@ jobs: - bash: ./scripts/install-mono.sh $(MONO_VERSION_LINUX) displayName: Install Mono and MSBuild - ${{ if endsWith(parameters.name, '_macos') }}: - - bash: | - ls -l '/Library/Frameworks/Mono.framework/Versions' - ls -l '/Library/Frameworks/Xamarin.iOS.framework/Versions' - ls -l '/Library/Frameworks/Xamarin.Android.framework/Versions' - ls -l '/Library/Frameworks/Xamarin.Mac.framework/Versions' - sudo $(Agent.HomeDirectory)/scripts/select-xamarin-sdk.sh $(MONO_VERSION_MACOS) + - bash: sudo ./scripts/select-xamarin.sh $(MONO_VERSION_MACOS) displayName: Switch to the latest Xamarin SDK # install extra bits for the native builds @@ -157,8 +152,12 @@ jobs: # install the mac tools - ${{ if endsWith(parameters.name, '_macos') }}: - - bash: echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'/Applications/Xcode_$(XCODE_VERSION).app;sudo xcode-select --switch /Applications/Xcode_$(XCODE_VERSION).app/Contents/Developer - displayName: Switch to the latest Xcode + - ${{ if startsWith(parameters.name, 'native_') }}: + - bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION_NATIVE) + displayName: Switch to the latest Xcode + - ${{ if not(startsWith(parameters.name, 'native_')) }}: + - bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION) + displayName: Switch to the latest Xcode # install the linux tools - ${{ if and(eq(parameters.installEmsdk, 'true'), endsWith(parameters.name, '_linux')) }}: diff --git a/scripts/select-xamarin.sh b/scripts/select-xamarin.sh new file mode 100644 index 00000000000..efafcc1dd2a --- /dev/null +++ b/scripts/select-xamarin.sh @@ -0,0 +1,9 @@ +#!/bin/bash -e -o pipefail + +$mono_version=$1 + +if [ -d "$AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh" ]; then + $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $mono_version +else + echo "Skipping the switch because the script did not exist." +fi diff --git a/scripts/select-xcode.sh b/scripts/select-xcode.sh new file mode 100644 index 00000000000..42cb8d5bce9 --- /dev/null +++ b/scripts/select-xcode.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e -o pipefail + +$XCODE_VERSION=$1 + +echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]/Applications/Xcode_$XCODE_VERSION.app' + +xcode-select --switch '/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer' From f70889cb3aa5a856ae8a62c74bad22299dcbe401 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 05:29:39 +0000 Subject: [PATCH 05/63] chmod +x --- scripts/select-xamarin.sh | 0 scripts/select-xcode.sh | 0 2 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 scripts/select-xamarin.sh mode change 100644 => 100755 scripts/select-xcode.sh diff --git a/scripts/select-xamarin.sh b/scripts/select-xamarin.sh old mode 100644 new mode 100755 diff --git a/scripts/select-xcode.sh b/scripts/select-xcode.sh old mode 100644 new mode 100755 From 2a0212f869562d1fdcdcf5f305000cf4a588c5a7 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 07:36:42 +0200 Subject: [PATCH 06/63] oops --- scripts/select-xamarin.sh | 4 ++-- scripts/select-xcode.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/select-xamarin.sh b/scripts/select-xamarin.sh index efafcc1dd2a..05d9ecaacad 100755 --- a/scripts/select-xamarin.sh +++ b/scripts/select-xamarin.sh @@ -1,9 +1,9 @@ #!/bin/bash -e -o pipefail -$mono_version=$1 +MONO_VERSION=$1 if [ -d "$AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh" ]; then - $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $mono_version + $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $MONO_VERSION else echo "Skipping the switch because the script did not exist." fi diff --git a/scripts/select-xcode.sh b/scripts/select-xcode.sh index 42cb8d5bce9..f0cd78f378f 100755 --- a/scripts/select-xcode.sh +++ b/scripts/select-xcode.sh @@ -1,6 +1,6 @@ #!/bin/bash -e -o pipefail -$XCODE_VERSION=$1 +XCODE_VERSION=$1 echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]/Applications/Xcode_$XCODE_VERSION.app' From 53a4796b48b5cb0edcdfb7b4205324a2f695fd07 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 07:47:21 +0200 Subject: [PATCH 07/63] skip if installed --- scripts/install-dotnet.ps1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index 549cf933171..f242f7cab36 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -6,6 +6,12 @@ Param( $ErrorActionPreference = 'Stop' +$dotnetDll = Join-Path "$InstallDir" "sdk" "$Version" "dotnet.dll" +if (Test-Path $dotnetDll) { + Write-Host ".NET already installed." + exit 0 +} + if ($IsMacOS -or $IsLinux) { $url = "https://dot.net/v1/dotnet-install.sh" } else { From 3895074c79c3813c11700b149de0e66f73cacca3 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 07:51:23 +0200 Subject: [PATCH 08/63] always set props --- scripts/install-dotnet.ps1 | 39 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index f242f7cab36..4891b5570f5 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -9,27 +9,26 @@ $ErrorActionPreference = 'Stop' $dotnetDll = Join-Path "$InstallDir" "sdk" "$Version" "dotnet.dll" if (Test-Path $dotnetDll) { Write-Host ".NET already installed." - exit 0 -} - -if ($IsMacOS -or $IsLinux) { - $url = "https://dot.net/v1/dotnet-install.sh" -} else { - $url = "https://dot.net/v1/dotnet-install.ps1" -} - -Write-Host "Downloading .NET Installer..." -Invoke-WebRequest ` - -Uri "$url" ` - -OutFile (Split-Path $url -Leaf) - -Write-Host "Installing .NET $Version..." -if ($IsMacOS) { - & sh dotnet-install.sh --version "$Version" --install-dir "$InstallDir" --azure-feed "$FeedUrl" --verbose -} elseif ($IsLinux) { - & bash dotnet-install.sh --version "$Version" --install-dir "$InstallDir" --azure-feed "$FeedUrl" --verbose } else { - .\dotnet-install.ps1 -Version "$Version" -InstallDir "$InstallDir" -AzureFeed "$FeedUrl" -Verbose + if ($IsMacOS -or $IsLinux) { + $url = "https://dot.net/v1/dotnet-install.sh" + } else { + $url = "https://dot.net/v1/dotnet-install.ps1" + } + + Write-Host "Downloading .NET Installer..." + Invoke-WebRequest ` + -Uri "$url" ` + -OutFile (Split-Path $url -Leaf) + + Write-Host "Installing .NET $Version..." + if ($IsMacOS) { + & sh dotnet-install.sh --version "$Version" --install-dir "$InstallDir" --azure-feed "$FeedUrl" --verbose + } elseif ($IsLinux) { + & bash dotnet-install.sh --version "$Version" --install-dir "$InstallDir" --azure-feed "$FeedUrl" --verbose + } else { + .\dotnet-install.ps1 -Version "$Version" -InstallDir "$InstallDir" -AzureFeed "$FeedUrl" -Verbose + } } $env:DOTNET_INSTALL_DIR=$InstallDir From e7e5b6495f389b76a42f22ad82963dd41d5c9595 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 08:04:08 +0200 Subject: [PATCH 09/63] logging --- scripts/install-dotnet.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index 4891b5570f5..13c893f3dd4 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -31,6 +31,7 @@ if (Test-Path $dotnetDll) { } } +Write-Host "Setting install directry to '$InstallDir'..." $env:DOTNET_INSTALL_DIR=$InstallDir $env:DOTNET_ROOT=$InstallDir $env:DOTNET_MULTILEVEL_LOOKUP=0 @@ -41,6 +42,8 @@ Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; Write-Host "##vso[task.setvariable variable=PATH;]$InstallDir;$env:PATH"; +Write-Host "Checking all dotnet info..." +dir $InstallDir & dotnet --info exit $LASTEXITCODE From 84bacc5e2fdf0942d9a4729520718d4af39cbdb5 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 08:17:54 +0200 Subject: [PATCH 10/63] make sure PATH is set? --- scripts/install-dotnet.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index 13c893f3dd4..aba38f02372 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -31,7 +31,7 @@ if (Test-Path $dotnetDll) { } } -Write-Host "Setting install directry to '$InstallDir'..." +Write-Host "Setting install directory to '$InstallDir'..." $env:DOTNET_INSTALL_DIR=$InstallDir $env:DOTNET_ROOT=$InstallDir $env:DOTNET_MULTILEVEL_LOOKUP=0 @@ -40,10 +40,10 @@ Write-Host "##vso[task.setvariable variable=DOTNET_INSTALL_DIR;]$InstallDir"; Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; -Write-Host "##vso[task.setvariable variable=PATH;]$InstallDir;$env:PATH"; +$env:PATH = "$InstallDir;$env:PATH" +Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; Write-Host "Checking all dotnet info..." -dir $InstallDir & dotnet --info exit $LASTEXITCODE From 2bd1d23a05b3fa6742da48e3956432a31a2d7f74 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 08:28:48 +0200 Subject: [PATCH 11/63] ??? --- scripts/install-dotnet.ps1 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index aba38f02372..c90f79f8a86 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -44,6 +44,8 @@ $env:PATH = "$InstallDir;$env:PATH" Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; Write-Host "Checking all dotnet info..." +$dn = Join-Path "$InstallDir" "dotnet" +& "$dn" --info & dotnet --info exit $LASTEXITCODE From 63f3d265a9c8334be5e4f60b13769a2700f8a29a Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 08:38:55 +0200 Subject: [PATCH 12/63] try this --- scripts/azure-templates-build.yml | 6 +++--- scripts/install-dotnet.ps1 | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 71fb1408e00..abb30caef62 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -130,6 +130,9 @@ jobs: - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core condition: and(succeeded(), ne(variables.DOTNET_VERSION_PREVIEW, '')) + # display dotnet info + - pwsh: dotnet --info + displayName: Display all the .NET information - ${{ if endsWith(parameters.name, '_windows') }}: - ${{ if eq(parameters.installPreviewVs, 'true') }}: - pwsh: .\scripts\install-vs.ps1 @@ -141,9 +144,6 @@ jobs: - pwsh: .\scripts\install-dotnet-workloads.ps1 -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" -SourceUrl "$env:DOTNET_WORKLOAD_SOURCE" -IsPreview $false condition: and(succeeded(), eq(variables.DOTNET_VERSION_PREVIEW, '')) displayName: Install the .NET Core workloads - # display dotnet info - - pwsh: dotnet --info - displayName: Display all the .NET information # select the correct/latest version of Visual Studio - ${{ if endsWith(parameters.name, '_windows') }}: diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index c90f79f8a86..9ea89d2d084 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -43,9 +43,4 @@ Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; $env:PATH = "$InstallDir;$env:PATH" Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; -Write-Host "Checking all dotnet info..." -$dn = Join-Path "$InstallDir" "dotnet" -& "$dn" --info -& dotnet --info - exit $LASTEXITCODE From 27351e3b4c9280b44998b4a6ef5ecc7a802eb087 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 08:47:35 +0200 Subject: [PATCH 13/63] madness --- scripts/install-dotnet.ps1 | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index 9ea89d2d084..9fae8f02b5f 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -31,16 +31,19 @@ if (Test-Path $dotnetDll) { } } -Write-Host "Setting install directory to '$InstallDir'..." -$env:DOTNET_INSTALL_DIR=$InstallDir -$env:DOTNET_ROOT=$InstallDir -$env:DOTNET_MULTILEVEL_LOOKUP=0 +# Write-Host "Setting install directory to '$InstallDir'..." +# $env:DOTNET_INSTALL_DIR=$InstallDir +# $env:DOTNET_ROOT=$InstallDir +# $env:DOTNET_MULTILEVEL_LOOKUP=0 -Write-Host "##vso[task.setvariable variable=DOTNET_INSTALL_DIR;]$InstallDir"; -Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; -Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; +# Write-Host "##vso[task.setvariable variable=DOTNET_INSTALL_DIR;]$InstallDir"; +# Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; +# Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; $env:PATH = "$InstallDir;$env:PATH" Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; +Write-Host "Checking all dotnet info..." +& dotnet --info + exit $LASTEXITCODE From 1131a71e65e6159deed331daa7d939cb4f4bda8d Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 09:00:11 +0200 Subject: [PATCH 14/63] sadf --- scripts/azure-templates-build.yml | 25 +++++++++++++------------ scripts/install-dotnet.ps1 | 7 ++++--- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index abb30caef62..e550602c698 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -114,18 +114,19 @@ jobs: displayName: Install Android API 31 (v12) # install the bits needed for .NET - ${{ if eq(parameters.installDotNet, 'true') }}: - - task: UseDotNet@2 - inputs: - packageType: 'sdk' - version: $(DOTNET_VERSION_PREVIOUS) - performMultiLevelLookup: true - displayName: Install the previous version of .NET Core - - task: UseDotNet@2 - inputs: - packageType: 'sdk' - version: $(DOTNET_VERSION) - performMultiLevelLookup: true - displayName: Install the correct version of .NET Core + - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" + # - task: UseDotNet@2 + # inputs: + # packageType: 'sdk' + # version: $(DOTNET_VERSION_PREVIOUS) + # performMultiLevelLookup: true + # displayName: Install the previous version of .NET Core + # - task: UseDotNet@2 + # inputs: + # packageType: 'sdk' + # version: $(DOTNET_VERSION) + # performMultiLevelLookup: true + # displayName: Install the correct version of .NET Core # install the bits needed for .NET 6 builds - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index 9fae8f02b5f..0f26f5db7ff 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -40,10 +40,11 @@ if (Test-Path $dotnetDll) { # Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; # Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; -$env:PATH = "$InstallDir;$env:PATH" -Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; +# $env:PATH = "$InstallDir;$env:PATH" +# Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; Write-Host "Checking all dotnet info..." -& dotnet --info +& "$InstallDir/dotnet" --info +# & dotnet --info exit $LASTEXITCODE From 993a824308af21158feb6f503e41d4a7d02e1823 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 09:15:43 +0200 Subject: [PATCH 15/63] sxdcfvgbhjnkml, --- scripts/azure-templates-build.yml | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index e550602c698..919d89b3c33 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -115,20 +115,12 @@ jobs: # install the bits needed for .NET - ${{ if eq(parameters.installDotNet, 'true') }}: - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" - # - task: UseDotNet@2 - # inputs: - # packageType: 'sdk' - # version: $(DOTNET_VERSION_PREVIOUS) - # performMultiLevelLookup: true - # displayName: Install the previous version of .NET Core - # - task: UseDotNet@2 - # inputs: - # packageType: 'sdk' - # version: $(DOTNET_VERSION) - # performMultiLevelLookup: true - # displayName: Install the correct version of .NET Core + - pwsh: .\scripts\install-dotnet.ps1 -Version $(DOTNET_VERSION_PREVIOUS) -InstallDir "$(Agent.ToolsDirectory)/dotnet" + displayName: Install the previous version of .NET Core + - pwsh: .\scripts\install-dotnet.ps1 -Version $(DOTNET_VERSION) -InstallDir "$(Agent.ToolsDirectory)/dotnet" + displayName: Install the correct version of .NET Core # install the bits needed for .NET 6 builds - - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" + - pwsh: .\scripts\install-dotnet.ps1 -Version $(DOTNET_VERSION_PREVIEW) -InstallDir "$(Agent.ToolsDirectory)/dotnet" displayName: Install the preview version of .NET Core condition: and(succeeded(), ne(variables.DOTNET_VERSION_PREVIEW, '')) # display dotnet info From 5041821e256ac4fbef0cf15bfe3da7615a932a80 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 09:35:34 +0200 Subject: [PATCH 16/63] scary --- scripts/azure-templates-build.yml | 14 ++++++++++---- scripts/install-dotnet.ps1 | 2 ++ 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 919d89b3c33..e9e5b20ff51 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -114,13 +114,19 @@ jobs: displayName: Install Android API 31 (v12) # install the bits needed for .NET - ${{ if eq(parameters.installDotNet, 'true') }}: - - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" - - pwsh: .\scripts\install-dotnet.ps1 -Version $(DOTNET_VERSION_PREVIOUS) -InstallDir "$(Agent.ToolsDirectory)/dotnet" + - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" + - task: UseDotNet@2 + inputs: + packageType: 'sdk' + version: $(DOTNET_VERSION_PREVIOUS) displayName: Install the previous version of .NET Core - - pwsh: .\scripts\install-dotnet.ps1 -Version $(DOTNET_VERSION) -InstallDir "$(Agent.ToolsDirectory)/dotnet" + - task: UseDotNet@2 + inputs: + packageType: 'sdk' + version: $(DOTNET_VERSION) displayName: Install the correct version of .NET Core # install the bits needed for .NET 6 builds - - pwsh: .\scripts\install-dotnet.ps1 -Version $(DOTNET_VERSION_PREVIEW) -InstallDir "$(Agent.ToolsDirectory)/dotnet" + - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core condition: and(succeeded(), ne(variables.DOTNET_VERSION_PREVIEW, '')) # display dotnet info diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index 0f26f5db7ff..a8bd9c0e11b 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -6,6 +6,8 @@ Param( $ErrorActionPreference = 'Stop' +dir env: + $dotnetDll = Join-Path "$InstallDir" "sdk" "$Version" "dotnet.dll" if (Test-Path $dotnetDll) { Write-Host ".NET already installed." From b567a8412185678bc6647c1a0021fe7e7adb36a5 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 09:35:56 +0200 Subject: [PATCH 17/63] asdfsadf --- scripts/azure-templates-build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index e9e5b20ff51..3f3950cc68b 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -125,6 +125,9 @@ jobs: packageType: 'sdk' version: $(DOTNET_VERSION) displayName: Install the correct version of .NET Core + # display dotnet info + - pwsh: dotnet --info + displayName: Display all the .NET information # install the bits needed for .NET 6 builds - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core From 6898588a23ef74689429bf44f1bc2900b87d2c26 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 09:44:29 +0200 Subject: [PATCH 18/63] select dotnet --- scripts/azure-templates-build.yml | 4 +++- scripts/install-dotnet-workloads.ps1 | 4 ++-- scripts/select-dotnet.ps1 | 22 ++++++++++++++++++++++ 3 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 scripts/select-dotnet.ps1 diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 3f3950cc68b..44bb7dceb0e 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -114,7 +114,7 @@ jobs: displayName: Install Android API 31 (v12) # install the bits needed for .NET - ${{ if eq(parameters.installDotNet, 'true') }}: - - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" + - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" - task: UseDotNet@2 inputs: packageType: 'sdk' @@ -135,6 +135,8 @@ jobs: # display dotnet info - pwsh: dotnet --info displayName: Display all the .NET information + - pwsh: .\scripts\select-dotnet.ps1 -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" + displayName: Select .NET Core - ${{ if endsWith(parameters.name, '_windows') }}: - ${{ if eq(parameters.installPreviewVs, 'true') }}: - pwsh: .\scripts\install-vs.ps1 diff --git a/scripts/install-dotnet-workloads.ps1 b/scripts/install-dotnet-workloads.ps1 index 48ec1de6916..52195dd0eec 100644 --- a/scripts/install-dotnet-workloads.ps1 +++ b/scripts/install-dotnet-workloads.ps1 @@ -11,8 +11,8 @@ $previewRuntime = 'https://api.nuget.org/v3/index.json' $previewEmscripten = 'https://api.nuget.org/v3/index.json' if ($IsPreview) { $previewFeed = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet6/nuget/v3/index.json' - $previewRuntime = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-6dd808ff-1/nuget/v3/index.json' - $previewEmscripten = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-ee0a97a0/nuget/v3/index.json' + $previewRuntime = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-runtime-323bf2dd/nuget/v3/index.json' + $previewEmscripten = 'https://pkgs.dev.azure.com/dnceng/public/_packaging/darc-pub-dotnet-emsdk-572aeedc/nuget/v3/index.json' } Write-Host "Installing workloads..." diff --git a/scripts/select-dotnet.ps1 b/scripts/select-dotnet.ps1 new file mode 100644 index 00000000000..651b7c95444 --- /dev/null +++ b/scripts/select-dotnet.ps1 @@ -0,0 +1,22 @@ +Param( + [string] $InstallDir +) + +$ErrorActionPreference = 'Stop' + +Write-Host "Setting install directory to '$InstallDir'..." +$env:DOTNET_INSTALL_DIR=$InstallDir +$env:DOTNET_ROOT=$InstallDir +$env:DOTNET_MULTILEVEL_LOOKUP=0 + +Write-Host "##vso[task.setvariable variable=DOTNET_INSTALL_DIR;]$InstallDir"; +Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; +Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; + +$env:PATH = "$InstallDir;$env:PATH" +Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; + +Write-Host "Checking all dotnet info..." +& dotnet --info + +exit $LASTEXITCODE From 6c9793848648bc5a25d4477d40fb340e952cf540 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 09:53:26 +0200 Subject: [PATCH 19/63] dfasdf --- scripts/azure-templates-build.yml | 8 ++------ scripts/install-dotnet.ps1 | 17 +---------------- scripts/select-dotnet.ps1 | 22 ---------------------- 3 files changed, 3 insertions(+), 44 deletions(-) delete mode 100644 scripts/select-dotnet.ps1 diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 44bb7dceb0e..e39c1afb8fb 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -114,7 +114,6 @@ jobs: displayName: Install Android API 31 (v12) # install the bits needed for .NET - ${{ if eq(parameters.installDotNet, 'true') }}: - - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" - task: UseDotNet@2 inputs: packageType: 'sdk' @@ -125,9 +124,6 @@ jobs: packageType: 'sdk' version: $(DOTNET_VERSION) displayName: Install the correct version of .NET Core - # display dotnet info - - pwsh: dotnet --info - displayName: Display all the .NET information # install the bits needed for .NET 6 builds - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core @@ -135,12 +131,12 @@ jobs: # display dotnet info - pwsh: dotnet --info displayName: Display all the .NET information - - pwsh: .\scripts\select-dotnet.ps1 -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" - displayName: Select .NET Core + # install VS - ${{ if endsWith(parameters.name, '_windows') }}: - ${{ if eq(parameters.installPreviewVs, 'true') }}: - pwsh: .\scripts\install-vs.ps1 displayName: Install Visual Studio + # install workloads - ${{ if not(endsWith(parameters.name, '_linux')) }}: - pwsh: .\scripts\install-dotnet-workloads.ps1 -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" -SourceUrl "$env:DOTNET_WORKLOAD_SOURCE" -IsPreview $true condition: and(succeeded(), ne(variables.DOTNET_VERSION_PREVIEW, '')) diff --git a/scripts/install-dotnet.ps1 b/scripts/install-dotnet.ps1 index a8bd9c0e11b..a1aaeeb73b2 100644 --- a/scripts/install-dotnet.ps1 +++ b/scripts/install-dotnet.ps1 @@ -6,8 +6,6 @@ Param( $ErrorActionPreference = 'Stop' -dir env: - $dotnetDll = Join-Path "$InstallDir" "sdk" "$Version" "dotnet.dll" if (Test-Path $dotnetDll) { Write-Host ".NET already installed." @@ -33,20 +31,7 @@ if (Test-Path $dotnetDll) { } } -# Write-Host "Setting install directory to '$InstallDir'..." -# $env:DOTNET_INSTALL_DIR=$InstallDir -# $env:DOTNET_ROOT=$InstallDir -# $env:DOTNET_MULTILEVEL_LOOKUP=0 - -# Write-Host "##vso[task.setvariable variable=DOTNET_INSTALL_DIR;]$InstallDir"; -# Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; -# Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; - -# $env:PATH = "$InstallDir;$env:PATH" -# Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; - Write-Host "Checking all dotnet info..." -& "$InstallDir/dotnet" --info -# & dotnet --info +& dotnet --info exit $LASTEXITCODE diff --git a/scripts/select-dotnet.ps1 b/scripts/select-dotnet.ps1 deleted file mode 100644 index 651b7c95444..00000000000 --- a/scripts/select-dotnet.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -Param( - [string] $InstallDir -) - -$ErrorActionPreference = 'Stop' - -Write-Host "Setting install directory to '$InstallDir'..." -$env:DOTNET_INSTALL_DIR=$InstallDir -$env:DOTNET_ROOT=$InstallDir -$env:DOTNET_MULTILEVEL_LOOKUP=0 - -Write-Host "##vso[task.setvariable variable=DOTNET_INSTALL_DIR;]$InstallDir"; -Write-Host "##vso[task.setvariable variable=DOTNET_ROOT;]$InstallDir"; -Write-Host "##vso[task.setvariable variable=DOTNET_MULTILEVEL_LOOKUP;]0"; - -$env:PATH = "$InstallDir;$env:PATH" -Write-Host "##vso[task.setvariable variable=PATH;]$env:PATH"; - -Write-Host "Checking all dotnet info..." -& dotnet --info - -exit $LASTEXITCODE From bb100f9fab1d701db2f8a526ab0ea00cd4f4e930 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 10:05:46 +0200 Subject: [PATCH 20/63] quotes --- scripts/select-xcode.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/select-xcode.sh b/scripts/select-xcode.sh index f0cd78f378f..1c37fbb7a0c 100755 --- a/scripts/select-xcode.sh +++ b/scripts/select-xcode.sh @@ -2,6 +2,6 @@ XCODE_VERSION=$1 -echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]/Applications/Xcode_$XCODE_VERSION.app' +echo "##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]/Applications/Xcode_$XCODE_VERSION.app" -xcode-select --switch '/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer' +xcode-select --switch "/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer" From fa6223af316b67d7db63ec17191232f39a028294 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 15:28:41 +0200 Subject: [PATCH 21/63] hmmm --- scripts/azure-templates-build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index e39c1afb8fb..5fedd162edd 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -114,16 +114,23 @@ jobs: displayName: Install Android API 31 (v12) # install the bits needed for .NET - ${{ if eq(parameters.installDotNet, 'true') }}: + - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" - task: UseDotNet@2 inputs: packageType: 'sdk' version: $(DOTNET_VERSION_PREVIOUS) displayName: Install the previous version of .NET Core + # display dotnet info + - pwsh: dotnet --info + displayName: Display all the .NET information - task: UseDotNet@2 inputs: packageType: 'sdk' version: $(DOTNET_VERSION) displayName: Install the correct version of .NET Core + # display dotnet info + - pwsh: dotnet --info + displayName: Display all the .NET information # install the bits needed for .NET 6 builds - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core From d233b1d8fb71ea5cbe0e46e8b2ca7c7faf183afa Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 16:14:55 +0200 Subject: [PATCH 22/63] /Applications/ --- scripts/azure-templates-build.yml | 10 +++------- scripts/select-xcode.sh | 2 ++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 5fedd162edd..2fa38d4380d 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -114,23 +114,19 @@ jobs: displayName: Install Android API 31 (v12) # install the bits needed for .NET - ${{ if eq(parameters.installDotNet, 'true') }}: - - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" + - ${{ if endsWith(parameters.name, '_macos') }}: + - pwsh: Remove-Item -Recurse -Force "$env:AGENT_TOOLSDIRECTORY/dotnet" + displayName: Cleanup existing versions of .NET Core - task: UseDotNet@2 inputs: packageType: 'sdk' version: $(DOTNET_VERSION_PREVIOUS) displayName: Install the previous version of .NET Core - # display dotnet info - - pwsh: dotnet --info - displayName: Display all the .NET information - task: UseDotNet@2 inputs: packageType: 'sdk' version: $(DOTNET_VERSION) displayName: Install the correct version of .NET Core - # display dotnet info - - pwsh: dotnet --info - displayName: Display all the .NET information # install the bits needed for .NET 6 builds - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core diff --git a/scripts/select-xcode.sh b/scripts/select-xcode.sh index 1c37fbb7a0c..d7e6d45d3ed 100755 --- a/scripts/select-xcode.sh +++ b/scripts/select-xcode.sh @@ -2,6 +2,8 @@ XCODE_VERSION=$1 +ls -l /Applications/Xcode* + echo "##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]/Applications/Xcode_$XCODE_VERSION.app" xcode-select --switch "/Applications/Xcode_$XCODE_VERSION.app/Contents/Developer" From 82b1cdf55b21764be98a480af436d76c27b5784d Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 31 Mar 2022 16:32:07 +0200 Subject: [PATCH 23/63] asdf --- scripts/azure-pipelines-variables.yml | 2 +- scripts/select-xcode.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index e80cf961c21..96fcf3034fe 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -12,7 +12,7 @@ variables: MANAGED_LINUX_PACKAGES: ttf-ancient-fonts ninja-build MONO_VERSION_MACOS: '6_12_13' MONO_VERSION_LINUX: '' - XCODE_VERSION: 13.3 + XCODE_VERSION: 13.3.0 XCODE_VERSION_NATIVE: 13.2.1 DOTNET_VERSION_PREVIOUS: 3.1.417 DOTNET_VERSION: 5.0.406 diff --git a/scripts/select-xcode.sh b/scripts/select-xcode.sh index d7e6d45d3ed..9f7e4591024 100755 --- a/scripts/select-xcode.sh +++ b/scripts/select-xcode.sh @@ -2,7 +2,7 @@ XCODE_VERSION=$1 -ls -l /Applications/Xcode* +ls /Applications/Xcode* echo "##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]/Applications/Xcode_$XCODE_VERSION.app" From 29de733cadcc9adfb4f5f1e10affb32a1ef7f75a Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Fri, 1 Apr 2022 00:07:53 +0200 Subject: [PATCH 24/63] Use new APIs --- VERSIONS.txt | 2 +- samples/Basic/Maui/SkiaSharpSample/MauiProgram.cs | 1 + .../SkiaSharpSample/Platforms/Windows/App.xaml.cs | 7 ------- .../Maui/SkiaSharpSample/SkiaSharpSample.csproj | 12 +----------- source/SkiaSharp.Build.targets | 2 +- .../SKCanvasViewRendererBase.cs | 6 +++--- .../SKGLViewRendererBase.cs | 4 ++-- .../SkiaSharp.Views.Forms.Shared/SKImageSource.cs | 2 ++ .../AppHostBuilderExtensions.cs | 8 +++----- .../SKCanvasView/SKCanvasViewHandler.Android.cs | 2 +- .../SKCanvasView/SKCanvasViewHandler.Windows.cs | 2 +- .../Handlers/SKCanvasView/SKCanvasViewHandler.iOS.cs | 2 +- .../SkiaSharp.Views.UWP/UWPExtensions.cs | 2 +- 13 files changed, 18 insertions(+), 34 deletions(-) diff --git a/VERSIONS.txt b/VERSIONS.txt index 5fb1b34f195..2020ba6641a 100644 --- a/VERSIONS.txt +++ b/VERSIONS.txt @@ -22,7 +22,7 @@ System.IO.UnmanagedMemoryStream release 4.3.0 System.Drawing.Common release 4.5.1 SharpVk release 0.4.2 Uno.UI release 4.0.8 -Microsoft.WindowsAppSDK release 1.0.0 +Microsoft.WindowsAppSDK release 1.0.1 Microsoft.Maui.Graphics release 6.0.200-preview.12.852 Microsoft.Windows.SDK.NET.Ref release 10.0.18362.22 Microsoft.AspNetCore.Components.Web release 6.0.0 diff --git a/samples/Basic/Maui/SkiaSharpSample/MauiProgram.cs b/samples/Basic/Maui/SkiaSharpSample/MauiProgram.cs index a57d7612aed..b83ef70d373 100644 --- a/samples/Basic/Maui/SkiaSharpSample/MauiProgram.cs +++ b/samples/Basic/Maui/SkiaSharpSample/MauiProgram.cs @@ -2,6 +2,7 @@ using Microsoft.Maui.Hosting; using Microsoft.Maui.Controls.Hosting; using SkiaSharp.Views.Maui.Controls.Hosting; +using Microsoft.Maui.Controls.Compatibility.Hosting; namespace SkiaSharpSample { diff --git a/samples/Basic/Maui/SkiaSharpSample/Platforms/Windows/App.xaml.cs b/samples/Basic/Maui/SkiaSharpSample/Platforms/Windows/App.xaml.cs index 616eb04f66d..20098026ce4 100644 --- a/samples/Basic/Maui/SkiaSharpSample/Platforms/Windows/App.xaml.cs +++ b/samples/Basic/Maui/SkiaSharpSample/Platforms/Windows/App.xaml.cs @@ -12,12 +12,5 @@ public App() } protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp(); - - protected override void OnLaunched(LaunchActivatedEventArgs args) - { - base.OnLaunched(args); - - Microsoft.Maui.Essentials.Platform.OnLaunched(args); - } } } diff --git a/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj index 9d84a75d7a0..660e801413b 100644 --- a/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj @@ -18,7 +18,7 @@ 14.2 14.0 21.0 - 10.0.18362.0 + 10.0.17763.0 @@ -37,11 +37,6 @@ - - - - - libSkiaSharp.dll @@ -49,11 +44,6 @@ - - WinExe - win10-x64 - - diff --git a/source/SkiaSharp.Build.targets b/source/SkiaSharp.Build.targets index 1efc4d0c980..1301709c05e 100644 --- a/source/SkiaSharp.Build.targets +++ b/source/SkiaSharp.Build.targets @@ -23,7 +23,7 @@ 10.14 13.1 21.0 - 10.0.18362.0 + 10.0.17763.0 diff --git a/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj b/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj index 660e801413b..eb95a62a69b 100644 --- a/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj +++ b/samples/Basic/Maui/SkiaSharpSample/SkiaSharpSample.csproj @@ -2,7 +2,7 @@ net6.0-ios;net6.0-maccatalyst;net6.0-android - $(TargetFrameworks);net6.0-windows10.0.19041 + $(TargetFrameworks);net6.0-windows10.0.19041.0 Exe true true diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index 96fcf3034fe..12e0d08dbe4 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -14,8 +14,6 @@ variables: MONO_VERSION_LINUX: '' XCODE_VERSION: 13.3.0 XCODE_VERSION_NATIVE: 13.2.1 - DOTNET_VERSION_PREVIOUS: 3.1.417 - DOTNET_VERSION: 5.0.406 DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.1.json' CONFIGURATION: 'Release' diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 13ea6985c6c..a23c8715ef4 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -120,13 +120,18 @@ jobs: - task: UseDotNet@2 inputs: packageType: 'sdk' - version: $(DOTNET_VERSION_PREVIOUS) - displayName: Install the previous version of .NET Core + version: 3.1.x + displayName: Install .NET Core 3.1.x - task: UseDotNet@2 inputs: packageType: 'sdk' - version: $(DOTNET_VERSION) - displayName: Install the correct version of .NET Core + version: 5.0.x + displayName: Install .NET Core 5.0.x + - task: UseDotNet@2 + inputs: + packageType: 'sdk' + version: 6.0.x + displayName: Install .NET Core 6.0.x # install the bits needed for .NET 6 builds - pwsh: .\scripts\install-dotnet.ps1 -Version $env:DOTNET_VERSION_PREVIEW -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" displayName: Install the preview version of .NET Core diff --git a/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj index f447b73e1e5..e46a08ce14a 100644 --- a/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj +++ b/source/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI/SkiaSharp.Views.WinUI.csproj @@ -1,6 +1,6 @@  - net5.0-windows10.0.18362 + net5.0-windows10.0.18362;net6.0-windows10.0.18362 10.0.17763.0 SkiaSharp.Views.Windows SkiaSharp.Views.Windows From aac08095df389d640f32f9e8f74f7ce1a566891d Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 6 Apr 2022 23:35:26 +0200 Subject: [PATCH 29/63] potentially a cool thing --- scripts/azure-pipelines-tests.yml | 27 ++++++++------------ scripts/azure-pipelines-variables.yml | 3 +-- scripts/azure-pipelines.yml | 32 ++++++++++++++---------- scripts/azure-templates-bootstrapper.yml | 8 ++++-- scripts/azure-templates-build.yml | 9 +++---- 5 files changed, 39 insertions(+), 40 deletions(-) diff --git a/scripts/azure-pipelines-tests.yml b/scripts/azure-pipelines-tests.yml index 9991b79264c..9a4db3810cb 100644 --- a/scripts/azure-pipelines-tests.yml +++ b/scripts/azure-pipelines-tests.yml @@ -10,28 +10,21 @@ parameters: - name: VM_IMAGE_WINDOWS type: object default: - name: Azure Pipelines - vmImage: windows-2022 - - name: VM_IMAGE_MAC_NATIVE - type: object - default: - name: Azure Pipelines - vmImage: macos-11 + pool: + name: Azure Pipelines + vmImage: windows-2022 - name: VM_IMAGE_MAC type: object default: - name: VSEng-VSMac-Xamarin-Shared - vmImage: VSEng-VSMac-Xamarin-Shared - demands: - - macOS.Name -equals Monterey - - macOS.Architecture -equals x64 - - Agent.HasDevices -equals False - - Agent.IsPaired -equals False + pool: + name: Azure Pipelines + vmImage: macos-11 - name: VM_IMAGE_LINUX type: object default: - name: Azure Pipelines - vmImage: ubuntu-18.04 + pool: + name: Azure Pipelines + vmImage: ubuntu-18.04 variables: - template: azure-pipelines-variables.yml @@ -56,6 +49,6 @@ stages: VM_IMAGE_WINDOWS: ${{ parameters.VM_IMAGE_WINDOWS }} VM_IMAGE_WINDOWS_NATIVE: ${{ parameters.VM_IMAGE_WINDOWS }} VM_IMAGE_MAC: ${{ parameters.VM_IMAGE_MAC }} - VM_IMAGE_MAC_NATIVE: ${{ parameters.VM_IMAGE_MAC_NATIVE }} + VM_IMAGE_MAC_NATIVE: ${{ parameters.VM_IMAGE_MAC }} VM_IMAGE_LINUX: ${{ parameters.VM_IMAGE_LINUX }} VM_IMAGE_LINUX_NATIVE: ${{ parameters.VM_IMAGE_LINUX }} diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index 12e0d08dbe4..50cbb4f7774 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -12,8 +12,7 @@ variables: MANAGED_LINUX_PACKAGES: ttf-ancient-fonts ninja-build MONO_VERSION_MACOS: '6_12_13' MONO_VERSION_LINUX: '' - XCODE_VERSION: 13.3.0 - XCODE_VERSION_NATIVE: 13.2.1 + XCODE_VERSION: 13.2.1 DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.1.json' CONFIGURATION: 'Release' diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 7577ca77948..2f1a9d9d389 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -16,28 +16,34 @@ parameters: - name: VM_IMAGE_WINDOWS type: object default: - name: Azure Pipelines - vmImage: windows-2022 + pool: + name: Azure Pipelines + vmImage: windows-2022 - name: VM_IMAGE_MAC_NATIVE type: object default: - name: Azure Pipelines - vmImage: macos-11 + pool: + name: Azure Pipelines + vmImage: macos-11 - name: VM_IMAGE_MAC type: object default: - name: VSEng-VSMac-Xamarin-Shared - vmImage: VSEng-VSMac-Xamarin-Shared - demands: - - macOS.Name -equals Monterey - - macOS.Architecture -equals x64 - - Agent.HasDevices -equals False - - Agent.IsPaired -equals False + pool: + name: VSEng-VSMac-Xamarin-Shared + vmImage: VSEng-VSMac-Xamarin-Shared + demands: + - macOS.Name -equals Monterey + - macOS.Architecture -equals x64 + - Agent.HasDevices -equals False + - Agent.IsPaired -equals False + variables: + XCODE_VERSION: 13.3.0 - name: VM_IMAGE_LINUX type: object default: - name: Azure Pipelines - vmImage: ubuntu-18.04 + pool: + name: Azure Pipelines + vmImage: ubuntu-18.04 variables: - template: azure-pipelines-variables.yml diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 27c1e3b6bcf..dd34d3bde4d 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -37,11 +37,15 @@ jobs: parameters: name: ${{ parameters.name }} displayName: ${{ parameters.displayName }} - vmImage: ${{ parameters.vmImage }} + vmImage: ${{ parameters.vmImage.pool }} packages: ${{ parameters.packages }} target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} - variables: ${{ parameters.variables }} + variables: + - ${{ each var in parameters.vmImage.variables }}: + - ${{ var }} + - ${{ each var in parameters.variables }}: + - ${{ var }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index a23c8715ef4..3b9410bff1b 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -39,6 +39,7 @@ jobs: variables: ${{ parameters.variables }} steps: # prepare + - script: echo "$(XCODE_VERSION)" - checkout: self submodules: recursive - template: azure-templates-variables.yml @@ -165,12 +166,8 @@ jobs: # install the mac tools - ${{ if endsWith(parameters.name, '_macos') }}: - - ${{ if startsWith(parameters.name, 'native_') }}: - - bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION_NATIVE) - displayName: Switch to the latest Xcode - - ${{ if not(startsWith(parameters.name, 'native_')) }}: - - bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION) - displayName: Switch to the latest Xcode + - bash: sudo ./scripts/select-xcode.sh $(XCODE_VERSION) + displayName: Switch to the latest Xcode # install the linux tools - ${{ if and(eq(parameters.installEmsdk, 'true'), endsWith(parameters.name, '_linux')) }}: From eb8eb658a791de398986adcf44b2c054a15586c4 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 6 Apr 2022 23:44:06 +0200 Subject: [PATCH 30/63] okay so I am a senior developer... --- scripts/azure-templates-bootstrapper.yml | 8 ++++++-- scripts/azure-templates-download.yml | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index dd34d3bde4d..4076bc71ccb 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -75,11 +75,15 @@ jobs: parameters: name: ${{ parameters.name }} displayName: ${{ parameters.displayName }} - vmImage: ${{ parameters.vmImage }} + vmImage: ${{ parameters.vmImage.pool }} packages: ${{ parameters.packages }} target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} - variables: ${{ parameters.variables }} + variables: + - ${{ each var in parameters.vmImage.variables }}: + - ${{ var }} + - ${{ each var in parameters.variables }}: + - ${{ var }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} diff --git a/scripts/azure-templates-download.yml b/scripts/azure-templates-download.yml index 19cccd1b670..b2b9cc7bd53 100644 --- a/scripts/azure-templates-download.yml +++ b/scripts/azure-templates-download.yml @@ -13,6 +13,7 @@ jobs: pool: ${{ parameters.vmImage }} condition: ${{ parameters.condition }} steps: + - script: echo "$(XCODE_VERSION)" - checkout: none - template: azure-templates-download-artifacts.yml parameters: From 61e7ac79c9c013799f42e97a39a8f961a18b35a8 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 6 Apr 2022 23:50:59 +0200 Subject: [PATCH 31/63] try this --- scripts/azure-templates-bootstrapper.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 4076bc71ccb..d32fdc676ce 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,10 +42,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - - ${{ each var in parameters.vmImage.variables }}: - - ${{ var }} - - ${{ each var in parameters.variables }}: - - ${{ var }} + ${{ each var in parameters.vmImage.variables }}: + ${{ var }} + ${{ each var in parameters.variables }}: + ${{ var }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} @@ -80,10 +80,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - - ${{ each var in parameters.vmImage.variables }}: - - ${{ var }} - - ${{ each var in parameters.variables }}: - - ${{ var }} + ${{ each var in parameters.vmImage.variables }}: + ${{ var }} + ${{ each var in parameters.variables }}: + ${{ var }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} From a63c142390bfd83590a350f66ccd911ba99876e5 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 6 Apr 2022 23:57:27 +0200 Subject: [PATCH 32/63] attempt --- scripts/azure-templates-bootstrapper.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index d32fdc676ce..3788232c669 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,10 +42,12 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ each var in parameters.vmImage.variables }}: - ${{ var }} - ${{ each var in parameters.variables }}: - ${{ var }} + - ${{ each var in parameters.vmImage.variables }}: + - name: ${{ var.name }} + value: ${{ var.value }} + - ${{ each var in parameters.variables }}: + - name: ${{ var.name }} + value: ${{ var.value }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} @@ -80,10 +82,12 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ each var in parameters.vmImage.variables }}: - ${{ var }} - ${{ each var in parameters.variables }}: - ${{ var }} + - ${{ each var in parameters.vmImage.variables }}: + - name: ${{ var.name }} + value: ${{ var.value }} + - ${{ each var in parameters.variables }}: + - name: ${{ var.name }} + value: ${{ var.value }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} From 8d8ec653a4544f6cdfde3741ca8e176b623e375d Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:02:14 +0200 Subject: [PATCH 33/63] things are weird --- scripts/azure-templates-bootstrapper.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 3788232c669..d4a587e57c5 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -43,10 +43,10 @@ jobs: dependsOn: ${{ parameters.dependsOn }} variables: - ${{ each var in parameters.vmImage.variables }}: - - name: ${{ var.name }} + - name: ${{ var.key }} value: ${{ var.value }} - ${{ each var in parameters.variables }}: - - name: ${{ var.name }} + - name: ${{ var.key }} value: ${{ var.value }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} From 148690e3269a494e86548c02d45e0eed592ebba6 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:03:44 +0200 Subject: [PATCH 34/63] sadf --- scripts/azure-templates-bootstrapper.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index d4a587e57c5..252e3a9a851 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,11 +42,11 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - - ${{ each var in parameters.vmImage.variables }}: - - name: ${{ var.key }} + ${{ each var in parameters.vmImage.variables }}: + - name: ${{ var.name }} value: ${{ var.value }} - - ${{ each var in parameters.variables }}: - - name: ${{ var.key }} + ${{ each var in parameters.variables }}: + - name: ${{ var.name }} value: ${{ var.value }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} @@ -82,10 +82,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - - ${{ each var in parameters.vmImage.variables }}: + ${{ each var in parameters.vmImage.variables }}: - name: ${{ var.name }} value: ${{ var.value }} - - ${{ each var in parameters.variables }}: + ${{ each var in parameters.variables }}: - name: ${{ var.name }} value: ${{ var.value }} requiredArtifacts: ${{ parameters.requiredArtifacts }} From ecb8ab5ed234fea950e3ed6b30464ff796774c58 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:05:25 +0200 Subject: [PATCH 35/63] asdf --- scripts/azure-templates-bootstrapper.yml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 252e3a9a851..d32fdc676ce 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -43,11 +43,9 @@ jobs: dependsOn: ${{ parameters.dependsOn }} variables: ${{ each var in parameters.vmImage.variables }}: - - name: ${{ var.name }} - value: ${{ var.value }} + ${{ var }} ${{ each var in parameters.variables }}: - - name: ${{ var.name }} - value: ${{ var.value }} + ${{ var }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} @@ -83,11 +81,9 @@ jobs: dependsOn: ${{ parameters.dependsOn }} variables: ${{ each var in parameters.vmImage.variables }}: - - name: ${{ var.name }} - value: ${{ var.value }} + ${{ var }} ${{ each var in parameters.variables }}: - - name: ${{ var.name }} - value: ${{ var.value }} + ${{ var }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} From b2649c00889f755b482bd9eb817e6b1d8f3eded9 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:10:39 +0200 Subject: [PATCH 36/63] try this --- scripts/azure-templates-bootstrapper.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index d32fdc676ce..f4aaca5df22 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,10 +42,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ each var in parameters.vmImage.variables }}: - ${{ var }} - ${{ each var in parameters.variables }}: - ${{ var }} + ${{ if ne(parameters.vmImage.variables, '') }}: + ${{ parameters.vmImage.variables }} + ${{ if ne(parameters.variables, '') }}: + ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} @@ -80,10 +80,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ each var in parameters.vmImage.variables }}: - ${{ var }} - ${{ each var in parameters.variables }}: - ${{ var }} + ${{ if ne(parameters.vmImage.variables, '') }}: + ${{ parameters.vmImage.variables }} + ${{ if ne(parameters.variables, '') }}: + ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} From 18cd5d3dea71422fc9470182462bc0e27c3a0f12 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:13:38 +0200 Subject: [PATCH 37/63] asdfas --- scripts/azure-templates-bootstrapper.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index f4aaca5df22..7b02a72638e 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,8 +42,8 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ if ne(parameters.vmImage.variables, '') }}: - ${{ parameters.vmImage.variables }} + # ${{ if ne(parameters.vmImage.variables, '') }}: + # ${{ parameters.vmImage.variables }} ${{ if ne(parameters.variables, '') }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} @@ -80,8 +80,8 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ if ne(parameters.vmImage.variables, '') }}: - ${{ parameters.vmImage.variables }} + # ${{ if ne(parameters.vmImage.variables, '') }}: + # ${{ parameters.vmImage.variables }} ${{ if ne(parameters.variables, '') }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} From 5b7ada1d6c4512483e4deedafec08f686972d523 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:14:29 +0200 Subject: [PATCH 38/63] tnag --- scripts/azure-templates-bootstrapper.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 7b02a72638e..ce6902b60d0 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,10 +42,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - # ${{ if ne(parameters.vmImage.variables, '') }}: - # ${{ parameters.vmImage.variables }} - ${{ if ne(parameters.variables, '') }}: - ${{ parameters.variables }} + ${{ if ne(parameters.vmImage.variables, '') }}: + ${{ parameters.vmImage.variables }} + # ${{ if ne(parameters.variables, '') }}: + # ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} @@ -80,10 +80,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - # ${{ if ne(parameters.vmImage.variables, '') }}: - # ${{ parameters.vmImage.variables }} - ${{ if ne(parameters.variables, '') }}: - ${{ parameters.variables }} + ${{ if ne(parameters.vmImage.variables, '') }}: + ${{ parameters.vmImage.variables }} + # ${{ if ne(parameters.variables, '') }}: + # ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} From d5161731017d962dff9a54d7a44f5cc13e17e851 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:17:55 +0200 Subject: [PATCH 39/63] sdfasdf --- scripts/azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 2f1a9d9d389..3a187a759b6 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -19,12 +19,16 @@ parameters: pool: name: Azure Pipelines vmImage: windows-2022 + variables: + XCODE_VERSION: fishes - name: VM_IMAGE_MAC_NATIVE type: object default: pool: name: Azure Pipelines vmImage: macos-11 + variables: + XCODE_VERSION: nope - name: VM_IMAGE_MAC type: object default: @@ -44,6 +48,8 @@ parameters: pool: name: Azure Pipelines vmImage: ubuntu-18.04 + variables: + XCODE_VERSION: carrots variables: - template: azure-pipelines-variables.yml From 127a78ab5b811717f147650743cd59603edd8440 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:23:21 +0200 Subject: [PATCH 40/63] try this --- scripts/azure-templates-bootstrapper.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index ce6902b60d0..d2969634dd2 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,10 +42,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ if ne(parameters.vmImage.variables, '') }}: - ${{ parameters.vmImage.variables }} - # ${{ if ne(parameters.variables, '') }}: - # ${{ parameters.variables }} + # ${{ if ne(parameters.vmImage.variables, '') }}: + # ${{ parameters.vmImage.variables }} + ${{ if ne(length(parameters.variables), 0) }}: + ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} @@ -80,10 +80,10 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - ${{ if ne(parameters.vmImage.variables, '') }}: - ${{ parameters.vmImage.variables }} - # ${{ if ne(parameters.variables, '') }}: - # ${{ parameters.variables }} + # ${{ if ne(parameters.vmImage.variables, '') }}: + # ${{ parameters.vmImage.variables }} + ${{ if ne(length(parameters.variables), 0) }}: + ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} From edb60fbb3dd5bf16ee3a11acd94acc91934d694c Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:29:36 +0200 Subject: [PATCH 41/63] enable them all --- scripts/azure-templates-bootstrapper.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index d2969634dd2..7df40b7c58d 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -42,8 +42,8 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - # ${{ if ne(parameters.vmImage.variables, '') }}: - # ${{ parameters.vmImage.variables }} + ${{ if ne(parameters.vmImage.variables, '') }}: + ${{ parameters.vmImage.variables }} ${{ if ne(length(parameters.variables), 0) }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} @@ -80,8 +80,8 @@ jobs: target: ${{ parameters.target }} dependsOn: ${{ parameters.dependsOn }} variables: - # ${{ if ne(parameters.vmImage.variables, '') }}: - # ${{ parameters.vmImage.variables }} + ${{ if ne(parameters.vmImage.variables, '') }}: + ${{ parameters.vmImage.variables }} ${{ if ne(length(parameters.variables), 0) }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} From a896eaa201e15306f31f990391ff7cd9ca7db91a Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:32:21 +0200 Subject: [PATCH 42/63] asdfas --- scripts/azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 3a187a759b6..23f6872952e 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -19,8 +19,6 @@ parameters: pool: name: Azure Pipelines vmImage: windows-2022 - variables: - XCODE_VERSION: fishes - name: VM_IMAGE_MAC_NATIVE type: object default: From ec5f30a271b0703f5a7ba8b32b3e7083d277c056 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 00:44:53 +0200 Subject: [PATCH 43/63] variables: ${{ parameters.variables }} --- scripts/azure-templates-download.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/azure-templates-download.yml b/scripts/azure-templates-download.yml index b2b9cc7bd53..7868b4566e7 100644 --- a/scripts/azure-templates-download.yml +++ b/scripts/azure-templates-download.yml @@ -12,6 +12,7 @@ jobs: displayName: ${{ parameters.displayName }} pool: ${{ parameters.vmImage }} condition: ${{ parameters.condition }} + variables: ${{ parameters.variables }} steps: - script: echo "$(XCODE_VERSION)" - checkout: none From f89fdda162a2ea6c3ff21947060e372981604fd9 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 01:17:45 +0200 Subject: [PATCH 44/63] yay --- scripts/azure-pipelines.yml | 4 ---- scripts/azure-templates-build.yml | 1 - scripts/azure-templates-download.yml | 1 - 3 files changed, 6 deletions(-) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 23f6872952e..2f1a9d9d389 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -25,8 +25,6 @@ parameters: pool: name: Azure Pipelines vmImage: macos-11 - variables: - XCODE_VERSION: nope - name: VM_IMAGE_MAC type: object default: @@ -46,8 +44,6 @@ parameters: pool: name: Azure Pipelines vmImage: ubuntu-18.04 - variables: - XCODE_VERSION: carrots variables: - template: azure-pipelines-variables.yml diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 3b9410bff1b..74ec857a0ae 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -39,7 +39,6 @@ jobs: variables: ${{ parameters.variables }} steps: # prepare - - script: echo "$(XCODE_VERSION)" - checkout: self submodules: recursive - template: azure-templates-variables.yml diff --git a/scripts/azure-templates-download.yml b/scripts/azure-templates-download.yml index 7868b4566e7..9db1dd1d73f 100644 --- a/scripts/azure-templates-download.yml +++ b/scripts/azure-templates-download.yml @@ -14,7 +14,6 @@ jobs: condition: ${{ parameters.condition }} variables: ${{ parameters.variables }} steps: - - script: echo "$(XCODE_VERSION)" - checkout: none - template: azure-templates-download-artifacts.yml parameters: From 42967909b78f20b50c644410f29a35d14f305e1e Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 12:46:02 +0200 Subject: [PATCH 45/63] this --- scripts/azure-pipelines.yml | 7 +++++++ scripts/azure-templates-bootstrapper.yml | 12 ++++++++++-- scripts/provisionator.csx | 1 + 3 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 scripts/provisionator.csx diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 2f1a9d9d389..89e71503ce8 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -38,6 +38,13 @@ parameters: - Agent.IsPaired -equals False variables: XCODE_VERSION: 13.3.0 + preBuildSteps: + - task: xamops.azdevex.provisionator-task.provisionator@1 + displayName: 'Provision Xamarin' + inputs: + provisioning_script: ./scripts/provisionator.csx + env: + AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2) - name: VM_IMAGE_LINUX type: object default: diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 7df40b7c58d..8a07905b85c 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -47,7 +47,11 @@ jobs: ${{ if ne(length(parameters.variables), 0) }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} - preBuildSteps: ${{ parameters.preBuildSteps }} + preBuildSteps: + ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: + ${{ parameters.vmImage.preBuildSteps }} + ${{ if ne(length(parameters.preBuildSteps), 0) }}: + ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} @@ -85,7 +89,11 @@ jobs: ${{ if ne(length(parameters.variables), 0) }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} - preBuildSteps: ${{ parameters.preBuildSteps }} + preBuildSteps: + ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: + ${{ parameters.vmImage.preBuildSteps }} + ${{ if ne(length(parameters.preBuildSteps), 0) }}: + ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} diff --git a/scripts/provisionator.csx b/scripts/provisionator.csx new file mode 100644 index 00000000000..73a0e634151 --- /dev/null +++ b/scripts/provisionator.csx @@ -0,0 +1 @@ +XamarinChannel("Stable"); \ No newline at end of file From cba2e092a464deb82b8ade60e61d8b3add75a394 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 12:47:09 +0200 Subject: [PATCH 46/63] ok --- scripts/azure-templates-bootstrapper.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 8a07905b85c..d0151914d7f 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -48,10 +48,10 @@ jobs: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: - ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: - ${{ parameters.vmImage.preBuildSteps }} - ${{ if ne(length(parameters.preBuildSteps), 0) }}: - ${{ parameters.preBuildSteps }} + - ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: + - ${{ parameters.vmImage.preBuildSteps }} + - ${{ if ne(length(parameters.preBuildSteps), 0) }}: + - ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} @@ -90,10 +90,10 @@ jobs: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: - ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: - ${{ parameters.vmImage.preBuildSteps }} - ${{ if ne(length(parameters.preBuildSteps), 0) }}: - ${{ parameters.preBuildSteps }} + - ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: + - ${{ parameters.vmImage.preBuildSteps }} + - ${{ if ne(length(parameters.preBuildSteps), 0) }}: + - ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} From 73e16365bcd7dc550e3f3e00b02a43858f067cb4 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 12:50:35 +0200 Subject: [PATCH 47/63] asdf --- scripts/azure-templates-bootstrapper.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index d0151914d7f..a67f58e43e3 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -48,10 +48,10 @@ jobs: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: - - ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: - - ${{ parameters.vmImage.preBuildSteps }} - - ${{ if ne(length(parameters.preBuildSteps), 0) }}: - - ${{ parameters.preBuildSteps }} + ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: + ${{ parameters.vmImage.preBuildSteps }} + ${{ if ne(length(parameters.preBuildSteps), 0) }}: + ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} @@ -90,10 +90,10 @@ jobs: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: - - ${{ if ne(length(parameters.vmImage.preBuildSteps), 0) }}: - - ${{ parameters.vmImage.preBuildSteps }} - - ${{ if ne(length(parameters.preBuildSteps), 0) }}: - - ${{ parameters.preBuildSteps }} + ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: + ${{ parameters.vmImage.preBuildSteps }} + ${{ if ne(length(parameters.preBuildSteps), 0) }}: + ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} From ef6a37e6c7b6ba3f54bdd7e43333f4099769a8ca Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 12:52:24 +0200 Subject: [PATCH 48/63] adf --- scripts/azure-templates-bootstrapper.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index a67f58e43e3..1f2a5f5626f 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -48,10 +48,10 @@ jobs: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: - ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: - ${{ parameters.vmImage.preBuildSteps }} - ${{ if ne(length(parameters.preBuildSteps), 0) }}: - ${{ parameters.preBuildSteps }} + - ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: + - ${{ parameters.vmImage.preBuildSteps }} + - ${{ if ne(length(parameters.preBuildSteps), 0) }}: + - ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} @@ -90,10 +90,10 @@ jobs: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} preBuildSteps: - ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: - ${{ parameters.vmImage.preBuildSteps }} - ${{ if ne(length(parameters.preBuildSteps), 0) }}: - ${{ parameters.preBuildSteps }} + - ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: + - ${{ parameters.vmImage.preBuildSteps }} + - ${{ if ne(length(parameters.preBuildSteps), 0) }}: + - ${{ parameters.preBuildSteps }} postBuildSteps: ${{ parameters.postBuildSteps }} initScript: ${{ parameters.initScript }} additionalArgs: ${{ parameters.additionalArgs }} From 5f37ffec8fd14662e4790bf4b5e9ffec46747a73 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 13:09:40 +0200 Subject: [PATCH 49/63] sadf --- scripts/azure-pipelines.yml | 2 +- scripts/azure-templates-bootstrapper.yml | 11 +++++++++++ scripts/azure-templates-build.yml | 6 +++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 89e71503ce8..d0e112bb871 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -38,7 +38,7 @@ parameters: - Agent.IsPaired -equals False variables: XCODE_VERSION: 13.3.0 - preBuildSteps: + provisioningSteps: - task: xamops.azdevex.provisionator-task.provisionator@1 displayName: 'Provision Xamarin' inputs: diff --git a/scripts/azure-templates-bootstrapper.yml b/scripts/azure-templates-bootstrapper.yml index 1f2a5f5626f..c1d00cce44c 100644 --- a/scripts/azure-templates-bootstrapper.yml +++ b/scripts/azure-templates-bootstrapper.yml @@ -8,6 +8,7 @@ parameters: variables: [] # the job variables requiredArtifacts: [] # the artifacts that this build needs to download preBuildSteps: [] # any steps to run before the build + provisioningSteps: [] # any steps to run to provision the machine postBuildSteps: [] # any additional steps to run after the build initScript: '' # any scripts to run before starting the bootstrapper additionalArgs: '' # any additional arguments to pass to the bootstrapper @@ -47,6 +48,11 @@ jobs: ${{ if ne(length(parameters.variables), 0) }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} + provisioningSteps: + - ${{ if ne(parameters.vmImage.provisioningSteps, '') }}: + - ${{ parameters.vmImage.provisioningSteps }} + - ${{ if ne(length(parameters.provisioningSteps), 0) }}: + - ${{ parameters.provisioningSteps }} preBuildSteps: - ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: - ${{ parameters.vmImage.preBuildSteps }} @@ -89,6 +95,11 @@ jobs: ${{ if ne(length(parameters.variables), 0) }}: ${{ parameters.variables }} requiredArtifacts: ${{ parameters.requiredArtifacts }} + provisioningSteps: + - ${{ if ne(parameters.vmImage.provisioningSteps, '') }}: + - ${{ parameters.vmImage.provisioningSteps }} + - ${{ if ne(length(parameters.provisioningSteps), 0) }}: + - ${{ parameters.provisioningSteps }} preBuildSteps: - ${{ if ne(parameters.vmImage.preBuildSteps, '') }}: - ${{ parameters.vmImage.preBuildSteps }} diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 74ec857a0ae..ce66a81a4a8 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -7,7 +7,8 @@ parameters: dependsOn: [] # the dependiencies variables: [] # the job variables requiredArtifacts: [] # the artifacts that this build needs to download - preBuildSteps: [] # any steps to run before the build + provisioningSteps: [] # any steps to run before the build + provisioningSteps: [] # any steps to run to provision the machine postBuildSteps: [] # any additional steps to run after the build initScript: '' # any scripts to run before starting the bootstrapper additionalArgs: '' # any additional arguments to pass to the bootstrapper @@ -192,6 +193,9 @@ jobs: - pwsh: dotnet tool install -g ${{ tool }} displayName: Install ${{ tool }} + # provisioning steps + - ${{ parameters.provisioningSteps }} + # download artifacts - template: azure-templates-download-artifacts.yml parameters: From 76e44e7b1c543b4e025448b84eecc3184d871571 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 13:10:56 +0200 Subject: [PATCH 50/63] saves --- scripts/azure-templates-build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index ce66a81a4a8..3e2b8ceecb9 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -7,7 +7,6 @@ parameters: dependsOn: [] # the dependiencies variables: [] # the job variables requiredArtifacts: [] # the artifacts that this build needs to download - provisioningSteps: [] # any steps to run before the build provisioningSteps: [] # any steps to run to provision the machine postBuildSteps: [] # any additional steps to run after the build initScript: '' # any scripts to run before starting the bootstrapper From d3e9cb3a059b101b066a630e7d2d8a2690d81af5 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 13:27:58 +0200 Subject: [PATCH 51/63] provision early --- scripts/azure-templates-build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 3e2b8ceecb9..4c5d6d2c3d7 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -48,6 +48,9 @@ jobs: parameters: state: 'pending' + # provisioning steps + - ${{ parameters.provisioningSteps }} + # install any packages on linux - ${{ if and(eq(parameters.docker, ''), endsWith(parameters.name, '_linux')) }}: - bash: | @@ -192,9 +195,6 @@ jobs: - pwsh: dotnet tool install -g ${{ tool }} displayName: Install ${{ tool }} - # provisioning steps - - ${{ parameters.provisioningSteps }} - # download artifacts - template: azure-templates-download-artifacts.yml parameters: From c45499da27435f82b4478b85c63948a0d65f2125 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 19:18:25 +0200 Subject: [PATCH 52/63] Test --- scripts/azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index d0e112bb871..90ddb1e0c95 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -43,6 +43,7 @@ parameters: displayName: 'Provision Xamarin' inputs: provisioning_script: ./scripts/provisionator.csx + provisioning_extra_args: --force env: AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2) - name: VM_IMAGE_LINUX From a2c672e484225d5a4a596a04a2d24f717f780a77 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Thu, 7 Apr 2022 19:48:21 +0200 Subject: [PATCH 53/63] Try install this for now --- scripts/azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 90ddb1e0c95..a5af55602b9 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -19,6 +19,10 @@ parameters: pool: name: Azure Pipelines vmImage: windows-2022 + preBuildSteps: + pwsh: | + dotnet tool install --global boots + boots https://aka.ms/xamarin-android-commercial-d17-1-windows - name: VM_IMAGE_MAC_NATIVE type: object default: From 99dfdba70ea9384d148c4279fbcc7495009ce707 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Sat, 9 Apr 2022 03:03:35 +0200 Subject: [PATCH 54/63] nl --- scripts/provisionator.csx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/provisionator.csx b/scripts/provisionator.csx index 73a0e634151..a1e1975ce88 100644 --- a/scripts/provisionator.csx +++ b/scripts/provisionator.csx @@ -1 +1 @@ -XamarinChannel("Stable"); \ No newline at end of file +XamarinChannel("Stable"); From db29a45df3c1a87b07768ab7ed3c858ac739dba6 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Tue, 12 Apr 2022 19:48:54 +0200 Subject: [PATCH 55/63] Update azure-pipelines-variables.yml --- scripts/azure-pipelines-variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index ea223ef4bb1..6901f767795 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -13,7 +13,7 @@ variables: MONO_VERSION_MACOS: '6_12_13' MONO_VERSION_LINUX: '' XCODE_VERSION: 13.2.1 - VISUAL_STUDIO_VERSION: '' + VISUAL_STUDIO_VERSION: '17/pre' DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.1.json' CONFIGURATION: 'Release' From 826a7c1558c95f19f30cbb6de28e32204b1a0165 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Tue, 12 Apr 2022 20:46:03 +0200 Subject: [PATCH 56/63] Update azure-pipelines-variables.yml --- scripts/azure-pipelines-variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index 6901f767795..ea223ef4bb1 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -13,7 +13,7 @@ variables: MONO_VERSION_MACOS: '6_12_13' MONO_VERSION_LINUX: '' XCODE_VERSION: 13.2.1 - VISUAL_STUDIO_VERSION: '17/pre' + VISUAL_STUDIO_VERSION: '' DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.1.json' CONFIGURATION: 'Release' From 5c87d0e2d2c3a4c5e2527911fe3c2944988b7e33 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Tue, 12 Apr 2022 20:49:23 +0200 Subject: [PATCH 57/63] Update azure-pipelines-variables.yml --- scripts/azure-pipelines-variables.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines-variables.yml b/scripts/azure-pipelines-variables.yml index ea223ef4bb1..6901f767795 100644 --- a/scripts/azure-pipelines-variables.yml +++ b/scripts/azure-pipelines-variables.yml @@ -13,7 +13,7 @@ variables: MONO_VERSION_MACOS: '6_12_13' MONO_VERSION_LINUX: '' XCODE_VERSION: 13.2.1 - VISUAL_STUDIO_VERSION: '' + VISUAL_STUDIO_VERSION: '17/pre' DOTNET_VERSION_PREVIEW: '6.0.300-preview.22179.2' DOTNET_WORKLOAD_SOURCE: 'https://aka.ms/dotnet/maui/6.0.300/rc.1.json' CONFIGURATION: 'Release' From fbef55d755ca3baf5d4127bd9fed9296b79e5683 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 13 Apr 2022 03:33:40 +0800 Subject: [PATCH 58/63] try this --- scripts/azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 90ddb1e0c95..ad129ecd7ff 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -17,8 +17,8 @@ parameters: type: object default: pool: - name: Azure Pipelines - vmImage: windows-2022 + name: AzurePipelines-EO + vmImage: AzurePipelinesWindows2022compliant - name: VM_IMAGE_MAC_NATIVE type: object default: @@ -50,8 +50,8 @@ parameters: type: object default: pool: - name: Azure Pipelines - vmImage: ubuntu-18.04 + name: AzurePipelines-EO + vmImage: AzurePipelinesUbuntu18.04compliant variables: - template: azure-pipelines-variables.yml From 206c10f32c079995758c795978584e83aaff666f Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 13 Apr 2022 04:31:49 +0800 Subject: [PATCH 59/63] not a secondary --- scripts/azure-templates-variables.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/scripts/azure-templates-variables.yml b/scripts/azure-templates-variables.yml index d2409ef806a..1b697ae1d0b 100644 --- a/scripts/azure-templates-variables.yml +++ b/scripts/azure-templates-variables.yml @@ -51,13 +51,17 @@ steps: - pwsh: | Write-Host "Working with $env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME" - $match = [regex]::Match("$env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME", '.*\-(.+)\.(\d+)') - $label = $match.Groups[1].Value - Write-Host "Preview label: $label" - Write-Host "##vso[task.setvariable variable=PREVIEW_LABEL]$label" - $buildnumber = $match.Groups[2].Value - Write-Host "Build number: $buildnumber" - Write-Host "##vso[task.setvariable variable=BUILD_NUMBER]$buildnumber" + if ($env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME) { + $match = [regex]::Match("$env:RESOURCES_PIPELINE_SKIASHARP_RUNNAME", '.*\-(.+)\.(\d+)') + $label = $match.Groups[1].Value + Write-Host "Preview label: $label" + Write-Host "##vso[task.setvariable variable=PREVIEW_LABEL]$label" + $buildnumber = $match.Groups[2].Value + Write-Host "Build number: $buildnumber" + Write-Host "##vso[task.setvariable variable=BUILD_NUMBER]$buildnumber" + } else { + Write-Host "Not a secondary build." + } condition: or(eq(variables['Build.Reason'], 'ResourceTrigger'), eq(variables['Build.Reason'], 'Manual')) displayName: Override the preview label and build number if this is a secondary build From def2395d0dc9522b34cc9ffb3ac0a61af851fb4a Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 13 Apr 2022 05:12:37 +0800 Subject: [PATCH 60/63] this --- scripts/azure-templates-build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/azure-templates-build.yml b/scripts/azure-templates-build.yml index 966cf85b61a..e949d7bd686 100644 --- a/scripts/azure-templates-build.yml +++ b/scripts/azure-templates-build.yml @@ -145,9 +145,10 @@ jobs: displayName: Display all the .NET information # install VS - ${{ if endsWith(parameters.name, '_windows') }}: - - ${{ if and(eq(parameters.installPreviewVs, 'true'), ne(variables.VISUAL_STUDIO_VERSION, '')) }}: + - ${{ if eq(parameters.installPreviewVs, 'true') }}: - pwsh: .\scripts\install-vs.ps1 -Version $(VISUAL_STUDIO_VERSION) displayName: Install Visual Studio + condition: ne(variables.VISUAL_STUDIO_VERSION, '') # install workloads - ${{ if not(endsWith(parameters.name, '_linux')) }}: - pwsh: .\scripts\install-dotnet-workloads.ps1 -InstallDir "$env:AGENT_TOOLSDIRECTORY/dotnet" -SourceUrl "$env:DOTNET_WORKLOAD_SOURCE" -IsPreview $true From 3bf473a12b3cbcb4e5f806a561dc4aaff8f8c47b Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 13 Apr 2022 06:48:17 +0800 Subject: [PATCH 61/63] no temp for some reason --- scripts/install-vs.ps1 | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/scripts/install-vs.ps1 b/scripts/install-vs.ps1 index 33612e1718a..3985c7d8e81 100644 --- a/scripts/install-vs.ps1 +++ b/scripts/install-vs.ps1 @@ -11,25 +11,30 @@ if (Test-Path $fullPath) { exit 0 } +$temp = "$env:TEMP" +if ("$env:AGENT_TEMPDIRECTORY") { + $temp = "$env:AGENT_TEMPDIRECTORY" +} + $startTime = Get-Date Write-Host "Downloading Visual Studio Installer..." Invoke-WebRequest -UseBasicParsing ` -Uri "https://aka.ms/vs/install/latest/vs_setup.exe" ` - -OutFile "$env:TEMP\dd_vs_setup.exe" + -OutFile "$temp\dd_vs_setup.exe" Write-Host "Updating the Visual Studio Installer..." -$exitCode = & "$env:TEMP\dd_vs_setup.exe" --update --quiet --wait | Out-Null +$exitCode = & "$temp\dd_vs_setup.exe" --update --quiet --wait | Out-Null Write-Host "Exit code: $exitCode" Write-Host "Downloading Visual Studio ($Version)..." Invoke-WebRequest -UseBasicParsing ` -Uri "https://aka.ms/vs/$Version/vs_community.exe" ` - -OutFile "$env:TEMP\dd_vs_community.exe" + -OutFile "$temp\dd_vs_community.exe" Write-Host "Installing Visual Studio..." -$exitCode = & "$env:TEMP\dd_vs_community.exe" --quiet --norestart --wait ` +$exitCode = & "$temp\dd_vs_community.exe" --quiet --norestart --wait ` --includeRecommended ` --add Microsoft.VisualStudio.Workload.NetCrossPlat ` --add Microsoft.VisualStudio.Workload.NetCoreTools ` @@ -41,7 +46,7 @@ Write-Host "Exit code: $exitCode" $vsLogs = 'output\logs\vs-logs' New-Item -ItemType Directory -Force -Path "$vsLogs" | Out-Null -Get-ChildItem "$env:TEMP\dd_*" | +Get-ChildItem "$temp\dd_*" | Where-Object { $_.CreationTime -gt $startTime } | Copy-Item -Destination "$vsLogs" From 2d610ff22054ff927ea8568aa65332f88d3bcd8e Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 13 Apr 2022 07:23:36 +0800 Subject: [PATCH 62/63] Revert this --- scripts/azure-pipelines.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index ad129ecd7ff..90ddb1e0c95 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -17,8 +17,8 @@ parameters: type: object default: pool: - name: AzurePipelines-EO - vmImage: AzurePipelinesWindows2022compliant + name: Azure Pipelines + vmImage: windows-2022 - name: VM_IMAGE_MAC_NATIVE type: object default: @@ -50,8 +50,8 @@ parameters: type: object default: pool: - name: AzurePipelines-EO - vmImage: AzurePipelinesUbuntu18.04compliant + name: Azure Pipelines + vmImage: ubuntu-18.04 variables: - template: azure-pipelines-variables.yml From 34e65dc7cb12d5df8b2c34c4c9589a0d8d8acb90 Mon Sep 17 00:00:00 2001 From: Matthew Leibowitz Date: Wed, 13 Apr 2022 10:27:28 +0200 Subject: [PATCH 63/63] Update azure-pipelines.yml --- scripts/azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/azure-pipelines.yml b/scripts/azure-pipelines.yml index 90ddb1e0c95..e8c4cbe86ee 100644 --- a/scripts/azure-pipelines.yml +++ b/scripts/azure-pipelines.yml @@ -12,7 +12,7 @@ parameters: - name: buildExternals displayName: 'The specific native artifacts to use for this build.' type: number - default: 5981147 + default: 0 - name: VM_IMAGE_WINDOWS type: object default: