From c1acb5197b875f54711cd5778e364d0fad0d11db Mon Sep 17 00:00:00 2001 From: Steve Bilogan Date: Wed, 2 Nov 2022 22:58:40 -0400 Subject: [PATCH] fix: markup dependencies (#878) * fix: markup dependencies --- Directory.Build.props | 17 +++---- azure-pipelines.yml | 46 ++++++++++++++++--- build/scripts/macos-build.sh | 7 +++ build/stage-build.yml | 19 +------- build/templates/canary-updater.yml | 31 +++++++++++++ .../{ => templates}/dotnet-install-macos.yml | 6 +-- .../dotnet-install-windows.yml | 6 +-- build/{ => templates}/gitversion.yml | 0 build/{ => templates}/jdk-setup.yml | 0 .../Uno.Material.WinUI.Markup.csproj | 7 +-- .../Uno.Themes.WinUI.Markup.csproj | 4 +- 11 files changed, 97 insertions(+), 46 deletions(-) create mode 100644 build/scripts/macos-build.sh create mode 100644 build/templates/canary-updater.yml rename build/{ => templates}/dotnet-install-macos.yml (88%) rename build/{ => templates}/dotnet-install-windows.yml (91%) rename build/{ => templates}/gitversion.yml (100%) rename build/{ => templates}/jdk-setup.yml (100%) diff --git a/Directory.Build.props b/Directory.Build.props index ec4af568..ccd3293d 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,10 +1,11 @@  - Uno Platform - https://github.com/unoplatform/uno.themes - https://nv-assets.azurewebsites.net/logos/uno.png - https://github.com/unoplatform/uno.themes + 10.0 + Uno Platform + https://github.com/unoplatform/uno.themes + https://nv-assets.azurewebsites.net/logos/uno.png + https://github.com/unoplatform/uno.themes $(BUILD_REPOSITORY_URI) Copyright (C) 2015-$([System.DateTime]::Now.ToString(`yyyy`)) Uno Platform Inc. - all rights reserved $(AssemblyName) ($(TargetFramework)) @@ -13,22 +14,22 @@ README.md false - + true - + true $(MSBuildProjectName.Contains('Test')) $(MSBuildProjectName.Contains('Sample')) - + - + diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2948c7ca..930d1015 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -75,8 +75,8 @@ jobs: vmImage: windows-2022 steps: - - template: build/gitversion.yml - - template: build/dotnet-install-windows.yml + - template: build/templates/gitversion.yml + - template: build/templates/dotnet-install-windows.yml # This SDK version is needed as long as `uap10.0` will be supported in Uno.Core - powershell: ./build/Install-WindowsSdkISO.ps1 18362 @@ -100,9 +100,13 @@ jobs: DisableNet6MobileTargets: true UseWinUI: false pool: - vmImage: macOS-11 + vmImage: macOS-12 variables: + - name: XCODE_ROOT + value: '/Applications/Xcode_13.2.1.app' + - name: XamarinSDKVersion + value: 6_12_12 - name: SkipUnknownFrameworks value: true # Used by TargetFrameworks.Filtering package - group: unoplatform.apple.ios.appstore.distribution @@ -122,9 +126,37 @@ jobs: provisioningProfileLocation: 'secureFiles' provProfileSecureFile: 'Uno_Themes.mobileprovision' - - template: build/gitversion.yml - - template: build/dotnet-install-macos.yml - - template: build/stage-build.yml + - template: build/templates/canary-updater.yml + - template: build/templates/gitversion.yml + - template: build/templates/dotnet-install-macos.yml + + - bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(XamarinSDKVersion)" + displayName: Select Xamarin Version + + - bash: | + echo 'xCode Root to ${XCODE_ROOT}' + echo '##vso[task.setvariable variable=MD_APPLE_SDK_ROOT;]'${XCODE_ROOT} + sudo xcode-select --switch ${XCODE_ROOT}/Contents/Developer + + displayName: Select Xcode + + - bash: | + rm -f ${HOME}/Library/Preferences/Xamarin/Settings.plist + + # https://github.com/actions/virtual-environments/issues/1932 + displayName: Apply workaround for Azure Devops issue 1932 + + - bash: | + chmod +x $(build.sourcesdirectory)/build/scripts/macos-build.sh + $(build.sourcesdirectory)/build/scripts/macos-build.sh + displayName: 'Build solution in Release | $(ApplicationPlatform)' + retryCountOnTaskFailure: 3 + env: + BUILD_PLATFORM: "$(ApplicationPlatform)" + BUILD_APPLICATIONVERSION: "$(MajorMinorPatch)" + BUILD_PACKAGEVERSION: "$(SemVer)" + BUILD_SOLUTION: "Uno.Themes.sln" + BUILD_BINLOG: "$(build.artifactstagingdirectory)/themes-build-$(ApplicationPlatform).binlog" - job: Linux @@ -139,5 +171,5 @@ jobs: UseWinUI: false steps: - - template: build/gitversion.yml + - template: build/templates/gitversion.yml - template: build/stage-build-wasm.yml diff --git a/build/scripts/macos-build.sh b/build/scripts/macos-build.sh new file mode 100644 index 00000000..c22eb47b --- /dev/null +++ b/build/scripts/macos-build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +set -euo pipefail +IFS=$'\n\t' + +cd $BUILD_SOURCESDIRECTORY + +mono "/Applications/Visual Studio.app/Contents/MonoBundle/MSBuild/Current/bin/MSBuild.dll" /m /r /p:UnoUIUseRoslynSourceGenerators=False /p:Configuration=Release /p:Platform=$BUILD_PLATFORM /p:PackageVersion=$BUILD_PACKAGEVERSION /p:ApplicationVersion=$BUILD_APPLICATIONVERSION /detailedsummary /p:AotAssemblies=false /p:RestoreConfigFile=$BUILD_SOURCESDIRECTORY/nuget.config /bl:$BUILD_BINLOG $BUILD_SOLUTION \ No newline at end of file diff --git a/build/stage-build.yml b/build/stage-build.yml index d5e37446..98384555 100644 --- a/build/stage-build.yml +++ b/build/stage-build.yml @@ -1,22 +1,7 @@ steps: -- task: UseDotNet@2 - condition: eq(variables['IsCanaryBranch'], true) - retryCountOnTaskFailure: 3 - inputs: - packageType: runtime - version: 2.2.x -- task: nventiveCanaryUpdater@5 - condition: eq(variables['IsCanaryBranch'], true) - retryCountOnTaskFailure: 3 - inputs: - solution: Uno.Themes.sln - useNuGetOrg: true - usePrivateFeed: false - mergeBranch: true - branchToMerge: master - nugetUpdaterVersion: 2.1.1 - packageAuthor: nventive +- template: templates/canary-updater.yml + - bash: | npm install -g conventional-changelog-cli@2.2.2 conventional-changelog -p angular -u -r 1 -o "build/CHANGELOG.md" diff --git a/build/templates/canary-updater.yml b/build/templates/canary-updater.yml new file mode 100644 index 00000000..60692d31 --- /dev/null +++ b/build/templates/canary-updater.yml @@ -0,0 +1,31 @@ +steps: + + - task: UseDotNet@2 + condition: eq(variables['IsCanaryBranch'], true) + displayName: 'Use .NET 5.0.406' + retryCountOnTaskFailure: 3 + inputs: + packageType: runtime + version: 5.0.15 + + - task: UseDotNet@2 + condition: eq(variables['IsCanaryBranch'], true) + displayName: 'Use .NET runtime 2.2.x' + retryCountOnTaskFailure: 3 + inputs: + packageType: runtime + version: 2.2.x + + - task: nventiveCanaryUpdater@5 + condition: eq(variables['IsCanaryBranch'], true) + retryCountOnTaskFailure: 3 + inputs: + solution: Uno.Themes.sln + useNuGetOrg: true + usePrivateFeed: false + mergeBranch: true + branchToMerge: master + nugetUpdaterVersion: 2.1.1 + packageAuthor: nventive + summaryFile: '$(Build.ArtifactStagingDirectory)/Canary.md' + resultFile: '$(Build.ArtifactStagingDirectory)/Results.json' \ No newline at end of file diff --git a/build/dotnet-install-macos.yml b/build/templates/dotnet-install-macos.yml similarity index 88% rename from build/dotnet-install-macos.yml rename to build/templates/dotnet-install-macos.yml index f534b1c0..fd344340 100644 --- a/build/dotnet-install-macos.yml +++ b/build/templates/dotnet-install-macos.yml @@ -1,7 +1,7 @@ parameters: - DotNetVersion: '6.0.300' - UnoCheck_Version: '1.4.1' - UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/b58b891361591bc19d856dea0fbe15ff213e5f50/manifests/uno.ui-preview.manifest.json' + DotNetVersion: '6.0.401' + UnoCheck_Version: '1.5.4' + UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/34b1a60f5c1c51604b47362781969dde46979fd5/manifests/uno.ui.manifest.json' Dotnet_Root: '/usr/local/share/dotnet/' Dotnet_Tools: '~/.dotnet/tools' diff --git a/build/dotnet-install-windows.yml b/build/templates/dotnet-install-windows.yml similarity index 91% rename from build/dotnet-install-windows.yml rename to build/templates/dotnet-install-windows.yml index 86a94a03..bd3091d5 100644 --- a/build/dotnet-install-windows.yml +++ b/build/templates/dotnet-install-windows.yml @@ -1,7 +1,7 @@ parameters: - DotNetVersion: '6.0.300' - UnoCheck_Version: '1.4.1' - UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/b58b891361591bc19d856dea0fbe15ff213e5f50/manifests/uno.ui-preview.manifest.json' + DotNetVersion: '6.0.401' + UnoCheck_Version: '1.5.4' + UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/34b1a60f5c1c51604b47362781969dde46979fd5/manifests/uno.ui.manifest.json' steps: - task: UseDotNet@2 diff --git a/build/gitversion.yml b/build/templates/gitversion.yml similarity index 100% rename from build/gitversion.yml rename to build/templates/gitversion.yml diff --git a/build/jdk-setup.yml b/build/templates/jdk-setup.yml similarity index 100% rename from build/jdk-setup.yml rename to build/templates/jdk-setup.yml diff --git a/src/library/Uno.Material.WinUI.Markup/Uno.Material.WinUI.Markup.csproj b/src/library/Uno.Material.WinUI.Markup/Uno.Material.WinUI.Markup.csproj index 01289f32..5ae0ed5e 100644 --- a/src/library/Uno.Material.WinUI.Markup/Uno.Material.WinUI.Markup.csproj +++ b/src/library/Uno.Material.WinUI.Markup/Uno.Material.WinUI.Markup.csproj @@ -15,17 +15,14 @@ - + - - - + - diff --git a/src/library/Uno.Themes.WinUI.Markup/Uno.Themes.WinUI.Markup.csproj b/src/library/Uno.Themes.WinUI.Markup/Uno.Themes.WinUI.Markup.csproj index 6be29e5b..2a38afe2 100644 --- a/src/library/Uno.Themes.WinUI.Markup/Uno.Themes.WinUI.Markup.csproj +++ b/src/library/Uno.Themes.WinUI.Markup/Uno.Themes.WinUI.Markup.csproj @@ -15,12 +15,10 @@ - - + -