Skip to content

Commit

Permalink
Merge pull request #10122 from Youssef1313/pin-sdk
Browse files Browse the repository at this point in the history
Use .NET 7 SDK
  • Loading branch information
jeromelaban authored Feb 15, 2023
2 parents e835c7e + 34c6f31 commit 7a1c3c3
Show file tree
Hide file tree
Showing 33 changed files with 92 additions and 309 deletions.
4 changes: 0 additions & 4 deletions build/Uno.UI.Build.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
<UpdateAssemblyInfo>false</UpdateAssemblyInfo>
</PropertyGroup>

<ItemGroup>
<Content Include="..\src\global.json" Link="global.json" />
</ItemGroup>

<PropertyGroup Condition="'$(BuildingInsideVisualStudio)'==''">
<AppVersion>$(GITVERSION_SemVer)</AppVersion>

Expand Down
2 changes: 0 additions & 2 deletions build/ci/.azure-devops-android-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,6 @@ jobs:
artifactName: uitests-failure-results
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/optimize-roslyn-mono.yml

- template: templates/dotnet-install.yml

- template: templates/ios-build-select-version.yml
Expand Down
1 change: 0 additions & 1 deletion build/ci/.azure-devops-ios-tests-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ jobs:
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet-install.yml
- template: templates/optimize-roslyn-mono.yml

- template: templates/nuget-cache.yml
parameters:
Expand Down
1 change: 0 additions & 1 deletion build/ci/.azure-devops-ios-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ jobs:
nugetPackages: $(NUGET_PACKAGES)

- template: templates/dotnet-install.yml
- template: templates/optimize-roslyn-mono.yml

- template: templates/ios-build-select-version.yml
parameters:
Expand Down
25 changes: 9 additions & 16 deletions build/ci/.azure-devops-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
SourceLinkEnabled: false
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget
XCODE_ROOT: /Applications/Xcode_10.3.app

dependsOn: Pipeline_Validations

pool:
Expand All @@ -22,9 +22,8 @@ jobs:
steps:
- checkout: self
clean: true

- template: templates/dotnet-install.yml
- template: templates/optimize-roslyn-mono.yml

- template: templates/nuget-cache.yml
parameters:
Expand Down Expand Up @@ -79,7 +78,7 @@ jobs:
CI_Build: true
SourceLinkEnabled: false
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget

dependsOn: macOS

pool:
Expand All @@ -88,9 +87,6 @@ jobs:
steps:
- checkout: none
clean: true

- template: templates/dotnet-install.yml
- template: templates/optimize-roslyn-mono.yml

- task: DownloadBuildArtifacts@0
inputs:
Expand All @@ -103,18 +99,18 @@ jobs:
targetType: inline
script: |
brew install coreutils
- script: |
cd $(build.sourcesdirectory)/build/uno-macos-artifacts
installer -pkg SamplesApp.macOS-1.0.pkg -target CurrentUserHomeDirectory
displayName: Install SamplesApp
- script: |
timeout 70m /Applications/SamplesApp.macOS.app/Contents/MacOS/SamplesApp.macOS --runtime-tests=$(build.sourcesdirectory)/build/macOS-runtime-tests-results.xml
displayName: Run macOS Runtime Tests
- task: PublishTestResults@2
displayName: Publish macOS Runtime Tests
condition: always()
Expand All @@ -132,7 +128,7 @@ jobs:
CI_Build: true
SourceLinkEnabled: false
NUGET_PACKAGES: $(build.sourcesdirectory)/.nuget

dependsOn: macOS

pool:
Expand All @@ -141,15 +137,12 @@ jobs:
steps:
- checkout: none
clean: true

- template: templates/dotnet-install.yml
- template: templates/optimize-roslyn-mono.yml

- task: DownloadBuildArtifacts@0
inputs:
artifactName: uno-macos-artifacts
downloadPath: '$(build.sourcesdirectory)/build'

- task: PowerShell@2
displayName: 'Install coreutils'
inputs:
Expand All @@ -160,7 +153,7 @@ jobs:
- script: |
cd $(build.sourcesdirectory)/build/uno-macos-artifacts
installer -pkg SamplesApp.macOS-1.0.pkg -target CurrentUserHomeDirectory
displayName: Install SamplesApp
- script: |
Expand Down
7 changes: 0 additions & 7 deletions build/ci/.azure-devops-package-generic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,6 @@ jobs:
versionSpec: 4.9.1
checkLatest: false

# Required to run the api comparison tool
- task: UseDotNet@2
displayName: 'Use .Net Core runtime 2.2.x'
inputs:
packageType: runtime
version: 2.2.x

- template: templates/dotnet-install.yml

- powershell: .\build\Install-WindowsSdkISO.ps1 18362
Expand Down
13 changes: 7 additions & 6 deletions build/ci/.azure-devops-package-net6-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,15 @@ jobs:

- template: templates/gitversion.yml

- template: templates/dotnet6-mobile-install-windows.yml
- template: templates/dotnet7-mobile-install-windows.yml
- script: |
cp global.json global-net7.json
cp global-net6.json global.json
displayName: Replace global.json with .NET 6
condition: and(succeeded(), eq(variables.UnoDisableNet7Mobile, 'true'))
- template: templates/install-windows-sdk.yml
- template: templates/dotnet-mobile-install-windows.yml

- powershell: |
cp $(build.sourcesdirectory)\src\global-netcoremobile.json $(build.sourcesdirectory)\src\global.json
displayName: Change active .NET SDK
- template: templates/install-windows-sdk.yml

# This task is required to run in separately to avoid hitting targets file
# caching issues with msbuild 17.3 or later
Expand Down
2 changes: 2 additions & 0 deletions build/ci/.azure-devops-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ jobs:
cleanDestinationFolder: false
overwriteExistingFiles: true

- template: templates/dotnet-install.yml

- task: MSBuild@1
inputs:
solution: Build/Uno.UI.Build.csproj
Expand Down
12 changes: 3 additions & 9 deletions build/ci/.azure-devops-project-template-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
artifactName: NugetPackages

- template: templates/gitversion.yml
- template: templates/dotnet-install.yml
- template: templates/jdk-setup.yml

- template: templates/install-windows-sdk.yml
Expand Down Expand Up @@ -51,11 +52,7 @@ jobs:

- template: templates/gitversion.yml

# required to get the WinAppSdk build running, as it depends on
# msbuild (and not `dotnet`), and VS 17.3 only supports building for .NET 6.
- template: templates/dotnet-install.yml

- template: templates/dotnet7-mobile-install-windows.yml
- template: templates/dotnet-mobile-install-windows.yml

- template: templates/install-windows-sdk.yml
parameters:
Expand Down Expand Up @@ -92,10 +89,7 @@ jobs:
- script: cp $(System.ArtifactsDirectory)/NugetPackages/vslatest/*.nupkg $(Build.SourcesDirectory)/src/PackageCache
displayName: Copy Artifacts to PackageCache

- task: UseDotNet@2
inputs:
packageType: sdk
version: 5.0.102
- template: templates/dotnet-install.yml

- script: dotnet new -i $(System.ArtifactsDirectory)/NugetPackages/vslatest/Uno.ProjectTemplates.Dotnet*.nupkg
displayName: Install Project Templates
Expand Down
1 change: 1 addition & 0 deletions build/ci/.azure-devops-uap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
nugetPackages: $(NUGET_PACKAGES)

- template: templates/gitversion.yml
- template: templates/dotnet-install.yml

# Required until Uno.Xaml can build without all targets enabled
- template: templates/jdk-setup.yml
Expand Down
2 changes: 2 additions & 0 deletions build/ci/.azure-devops-vs2022-vsix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:

- template: templates/gitversion.yml

- template: templates/dotnet-install.yml

- template: templates/nuget-cache.yml
parameters:
nugetPackages: $(NUGET_PACKAGES)
Expand Down
5 changes: 1 addition & 4 deletions build/ci/.azure-devops-wasm-uitests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ jobs:
- template: templates/nuget-cache.yml
parameters:
nugetPackages: $(NUGET_PACKAGES)

- template: templates/optimize-roslyn-mono.yml

- template: templates/dotnet-install.yml

- bash: |
Expand Down Expand Up @@ -97,7 +96,6 @@ jobs:
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet-install.yml
- template: templates/optimize-roslyn-mono.yml

- bash: |
set -euo pipefail
Expand Down Expand Up @@ -209,7 +207,6 @@ jobs:
clean: true

- template: templates/dotnet-install.yml
- template: templates/optimize-roslyn-mono.yml

- template: templates/nuget-cache.yml
parameters:
Expand Down
7 changes: 3 additions & 4 deletions build/ci/.azure-devops-winui-convert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
displayName: 'WinUI Converted Tree Generation'

pool: ${{ parameters.poolName }}

dependsOn: Pipeline_Validations

variables:
Expand All @@ -17,7 +17,7 @@ jobs:
NUGET_PACKAGES: $(Agent.WorkFolder)\.nuget

UNO_UWP_BUILD: false
XAML_FLAVOR_BUILD: WinUI
XAML_FLAVOR_BUILD: WinUI

steps:
- checkout: self
Expand All @@ -27,8 +27,7 @@ jobs:
parameters:
nugetPackages: $(NUGET_PACKAGES)

- template: templates/dotnet7-mobile-install-windows.yml
- template: templates/dotnet-install.yml
- template: templates/dotnet-mobile-install-windows.yml
- template: templates/install-windows-sdk.yml

- powershell: |
Expand Down
11 changes: 2 additions & 9 deletions build/ci/templates/dotnet-install.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
steps:

- task: UseDotNet@2
displayName: 'Use .NET Core SDK 6.0.401'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: 6.0.401

- task: UseDotNet@2
displayName: 'Use .NET Core SDK 7.0.102'
displayName: 'Use .NET SDK'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
useGlobalJson: true
includePreviewVersions: true
version: 7.0.102
23 changes: 23 additions & 0 deletions build/ci/templates/dotnet-mobile-install-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
steps:

- template: dotnet-install.yml

- template: jdk-setup.yml

- powershell: |
& dotnet tool update --global uno.check --version 1.5.4 --add-source https://api.nuget.org/v3/index.json
& uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest https://raw.githubusercontent.com/unoplatform/uno.check/34b1a60f5c1c51604b47362781969dde46979fd5/manifests/uno.ui.manifest.json
displayName: Install .NET Workloads
errorActionPreference: continue
ignoreLASTEXITCODE: true
retryCountOnTaskFailure: 3
condition: and(succeeded(), eq(variables.UnoDisableNet7Mobile, 'true'))
- powershell: |
& dotnet tool update --global uno.check --version 1.11.0-dev.2 --add-source https://api.nuget.org/v3/index.json
& uno-check -v --ci --non-interactive --fix --skip xcode --skip gtk3 --skip vswin --skip vsmac --manifest https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json
displayName: Install .NET Workloads
errorActionPreference: continue
ignoreLASTEXITCODE: true
retryCountOnTaskFailure: 3
condition: and(succeeded(), ne(variables.UnoDisableNet7Mobile, 'true'))
50 changes: 0 additions & 50 deletions build/ci/templates/dotnet6-mobile-install-mac.yml

This file was deleted.

Loading

0 comments on commit 7a1c3c3

Please sign in to comment.