Skip to content
Open
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
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ jobs:
- name: Restore dotnet tools
run: dotnet tool restore

# uno-check ignores global.json and installs workloads with the newest SDK on the machine.
# Remove SDKs newer than the global.json one so workloads match the SDK we build with.
- name: Remove .NET SDKs newer than global.json
if: ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' }}
shell: pwsh
run: |
$selected = [System.Management.Automation.SemanticVersion](dotnet --version)
Get-ChildItem (Join-Path $env:DOTNET_ROOT 'sdk') -Directory |
Where-Object { $v = $null; [System.Management.Automation.SemanticVersion]::TryParse($_.Name, [ref]$v) -and $v -gt $selected } |
ForEach-Object { Write-Host "Removing $($_.FullName)"; Remove-Item $_.FullName -Recurse -Force }
dotnet --list-sdks

- name: Run Uno Check to Install Dependencies
if: ${{ matrix.multitarget != 'wasdk' && matrix.multitarget != 'linuxgtk' && matrix.multitarget != 'wpf' }}
run: >
Expand Down Expand Up @@ -272,6 +284,16 @@ jobs:
- name: Restore dotnet tools
run: dotnet tool restore

# See the matching step in the build job.
- name: Remove .NET SDKs newer than global.json
shell: pwsh
run: |
$selected = [System.Management.Automation.SemanticVersion](dotnet --version)
Get-ChildItem (Join-Path $env:DOTNET_ROOT 'sdk') -Directory |
Where-Object { $v = $null; [System.Management.Automation.SemanticVersion]::TryParse($_.Name, [ref]$v) -and $v -gt $selected } |
ForEach-Object { Write-Host "Removing $($_.FullName)"; Remove-Item $_.FullName -Recurse -Force }
dotnet --list-sdks

- name: Run Uno Check to Install Dependencies
run: >
dotnet tool run uno-check
Expand Down
Loading