Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: restore build with net6.0 to keep compatibility with 6.0.XX SDKs #488

Merged
merged 8 commits into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions build/workflow/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:

steps:
- template: templates/gitversion.yml
- template: templates/dotnet7-install-windows.yml
- template: templates/dotnet-workload-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
Expand Down Expand Up @@ -126,7 +126,7 @@ jobs:
provProfileSecureFile: Uno_Toolkit_iOS.mobileprovision

- template: templates/gitversion.yml
- template: templates/dotnet7-install-mac.yml
- template: templates/dotnet-workload-install-mac.yml

- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(XamarinSDKVersion)"
displayName: Select Xamarin Version
Expand Down
4 changes: 2 additions & 2 deletions build/workflow/stage-uitests-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- checkout: self
clean: true

- template: templates/dotnet7-install-mac.yml
- template: templates/dotnet-workload-install-mac.yml
- template: templates/jdk-setup.yml

- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(XamarinSDKVersion)"
Expand Down Expand Up @@ -120,7 +120,7 @@
artifactName: toolkit-uitest-binaries
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet7-install-mac.yml
- template: templates/dotnet-workload-install-mac.yml
- template: templates/jdk-setup.yml

- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(XamarinSDKVersion)"
Expand Down
4 changes: 2 additions & 2 deletions build/workflow/stage-uitests-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- checkout: self
clean: true

- template: templates/dotnet7-install-mac.yml
- template: templates/dotnet-workload-install-mac.yml
- template: templates/jdk-setup.yml

- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(XamarinSDKVersion)"
Expand Down Expand Up @@ -125,7 +125,7 @@
artifactName: toolkit-uitest-binaries
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet7-install-mac.yml
- template: templates/dotnet-workload-install-mac.yml

- bash: /bin/bash -c "sudo $AGENT_HOMEDIRECTORY/scripts/select-xamarin-sdk.sh $(XamarinSDKVersion)"
displayName: Select Xamarin Version
Expand Down
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
parameters:
DotNetVersion: '7.0.102'
UnoCheck_Version: '1.11.0-dev.2'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json'
Dotnet_Root: '/usr/local/share/dotnet/'
Dotnet_Tools: '~/.dotnet/tools'

steps:
- task: UseDotNet@2
displayName: install .NET 5
retryCountOnTaskFailure: 3
inputs:
version: 5.x
installationPath: ${{ parameters.Dotnet_Root }}

- task: UseDotNet@2
displayName: install .NET 3.1
retryCountOnTaskFailure: 3
inputs:
version: 3.1.x
installationPath: ${{ parameters.Dotnet_Root }}

# Required until .NET 6 installs properly using UseDotnet
# using preview builds
#- bash: |
# export PATH="${{ parameters.Dotnet_Root }}:${{ parameters.Dotnet_Tools }}:$PATH"
# curl -L https://raw.githubusercontent.com/dotnet/install-scripts/11b4eebe23d871c074364940d301c3eb53e7c7ec/src/dotnet-install.sh > dotnet-install.sh
# sh dotnet-install.sh --version ${{ parameters.DotNetVersion }} --install-dir $DOTNET_ROOT --verbose
# dotnet --list-sdks
# echo "##vso[task.setvariable variable=PATH]$PATH"
# displayName: install .NET ${{ parameters.DotNetVersion }}
# retryCountOnTaskFailure: 3

- task: UseDotNet@2
displayName: 'Use .NET Core SDK ${{ parameters.DotNetVersion }}'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: ${{ parameters.DotNetVersion }}
includePreviewVersions: true

- template: jdk-setup.yml

- bash: |
dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 --skip xcode --skip vswin --skip vsmac --manifest ${{ parameters.UnoCheck_Manifest }}
displayName: Install .NET Workloads
retryCountOnTaskFailure: 3
parameters:
DotNetVersion: '6.0.400'
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'
steps:
- task: UseDotNet@2
displayName: install .NET 5
retryCountOnTaskFailure: 3
inputs:
version: 5.x
installationPath: ${{ parameters.Dotnet_Root }}
- task: UseDotNet@2
displayName: install .NET 3.1
retryCountOnTaskFailure: 3
inputs:
version: 3.1.x
installationPath: ${{ parameters.Dotnet_Root }}
# Required until .NET 6 installs properly using UseDotnet
# using preview builds
#- bash: |
# export PATH="${{ parameters.Dotnet_Root }}:${{ parameters.Dotnet_Tools }}:$PATH"
# curl -L https://raw.githubusercontent.com/dotnet/install-scripts/11b4eebe23d871c074364940d301c3eb53e7c7ec/src/dotnet-install.sh > dotnet-install.sh
# sh dotnet-install.sh --version ${{ parameters.DotNetVersion }} --install-dir $DOTNET_ROOT --verbose
# dotnet --list-sdks
# echo "##vso[task.setvariable variable=PATH]$PATH"
# displayName: install .NET ${{ parameters.DotNetVersion }}
# retryCountOnTaskFailure: 3
- task: UseDotNet@2
displayName: 'Use .NET Core SDK ${{ parameters.DotNetVersion }}'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: ${{ parameters.DotNetVersion }}
includePreviewVersions: true
- template: jdk-setup.yml
- bash: |
dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --add-source https://api.nuget.org/v3/index.json
uno-check --ci --non-interactive --fix --skip androidsdk --skip gtk3 --skip xcode --skip vswin --skip vsmac --manifest ${{ parameters.UnoCheck_Manifest }}
displayName: Install .NET Workloads
retryCountOnTaskFailure: 3
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
parameters:
DotNetVersion: '7.0.102'
UnoCheck_Version: '1.11.0-dev.2'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/146b0b4b23d866bef455494a12ad7ffd2f6f2d20/manifests/uno.ui.manifest.json'

steps:

# Required until .NET 6 installs properly on Windows using UseDotnet
# using preview builds
#- powershell: |
# $ProgressPreference = 'SilentlyContinue'
# Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
# & .\dotnet-install.ps1 -Version ${{ parameters.DotNetVersion }} -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
# & dotnet --list-sdks
# displayName: Install .NET ${{ parameters.DotNetVersion }}
# errorActionPreference: stop
# retryCountOnTaskFailure: 3
- task: UseDotNet@2
displayName: 'Use .NET Core SDK ${{ parameters.DotNetVersion }}'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: ${{ parameters.DotNetVersion }}
includePreviewVersions: true

- template: jdk-setup.yml

- powershell: |
& dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --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 ${{ parameters.UnoCheck_Manifest }}
displayName: Install .NET Workloads
errorActionPreference: continue
ignoreLASTEXITCODE: true
retryCountOnTaskFailure: 3
parameters:
DotNetVersion: '6.0.400'
UnoCheck_Version: '1.5.4'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/34b1a60f5c1c51604b47362781969dde46979fd5/manifests/uno.ui.manifest.json'
steps:
# Required until .NET 6 installs properly on Windows using UseDotnet
# using preview builds
#- powershell: |
# $ProgressPreference = 'SilentlyContinue'
# Invoke-WebRequest -Uri "https://dot.net/v1/dotnet-install.ps1" -OutFile dotnet-install.ps1
# & .\dotnet-install.ps1 -Version ${{ parameters.DotNetVersion }} -InstallDir "$env:ProgramFiles\dotnet\" -Verbose
# & dotnet --list-sdks
# displayName: Install .NET ${{ parameters.DotNetVersion }}
# errorActionPreference: stop
# retryCountOnTaskFailure: 3
- task: UseDotNet@2
displayName: 'Use .NET Core SDK ${{ parameters.DotNetVersion }}'
retryCountOnTaskFailure: 3
inputs:
packageType: sdk
version: ${{ parameters.DotNetVersion }}
includePreviewVersions: true
- template: jdk-setup.yml
- powershell: |
& dotnet tool update --global uno.check --version ${{ parameters.UnoCheck_Version }} --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 ${{ parameters.UnoCheck_Manifest }}
displayName: Install .NET Workloads
errorActionPreference: continue
ignoreLASTEXITCODE: true
retryCountOnTaskFailure: 3
13 changes: 13 additions & 0 deletions samples/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,17 @@

<Import Project="..\src\xamarinmac-workaround.targets" Condition="$(TargetFramework.ToLower().StartsWith('xamarin')) and $(TargetFramework.ToLower().Contains('mac'))" />
<Import Project="..\src\Uno.CrossTargeting.props" />

<ItemGroup>
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,16 @@
</ItemGroup>

<Import Project="..\..\Uno.Toolkit.Samples\Uno.Toolkit.Samples.Shared\Uno.Toolkit.Samples.Shared.projitems" Label="Shared" />

<ItemGroup>
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" />
</ItemGroup>
</Project>
13 changes: 13 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,17 @@
</Target>

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.targets', '$(MSBuildThisFileDirectory)../'))" />

<ItemGroup>
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll. Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" />
</ItemGroup>

</Project>