Skip to content
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
24 changes: 21 additions & 3 deletions .github/actions/test-execute-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,28 @@ runs:
max_attempts: 3
retry_on: timeout
command: |
$dotnetCandidates = @()
if ('${{inputs.os == 'macos-arm64' && inputs.architecture == 'x64' && inputs.runtime-type == 'dotnet'}}' -eq 'true') {
$dotnet = '/Users/runner/.dotnet/x64/dotnet'
} else {
$dotnet = '/Users/runner/.dotnet/dotnet'
$dotnetCandidates += '/Users/runner/.dotnet/x64/dotnet'
}

if ($env:DOTNET_ROOT) {
$dotnetCandidates += (Join-Path $env:DOTNET_ROOT 'dotnet')
}

$dotnetCandidates += '/Users/runner/.dotnet/dotnet'
$dotnetCandidates += 'dotnet'

$dotnet = $null
foreach ($candidate in $dotnetCandidates) {
if ($candidate -eq 'dotnet' -or (Test-Path $candidate)) {
$dotnet = $candidate
break
}
}

if (-not $dotnet) {
throw 'Unable to locate a dotnet executable.'
}
foreach ($target_framework in ConvertFrom-Json "${{steps.test-args.outputs.target_frameworks}}") {
$trxFileName = "${{inputs.os}}-${{inputs.architecture}}-${{inputs.runtime-type}}-${{inputs.build_configuration}}-$target_framework.trx"
Expand Down
14 changes: 12 additions & 2 deletions .github/actions/test-setup-dotnet-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ inputs:
runs:
using: "composite"
steps:
- name: Setup .NET SDK ${{inputs.architecture}}
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'

- name: Get .NET Channel for ${{inputs.target_framework}}
uses: ./.github/actions/get-dotnet-channel
id: get_channel
Expand All @@ -33,16 +38,21 @@ runs:
Invoke-WebRequest 'https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1' -OutFile dotnet-install.ps1;
.\dotnet-install.ps1 -Runtime dotnet -SkipNonVersionedFiles -NoPath -Channel LTS -Architecture ${{inputs.architecture}} -InstallDir "${{steps.get-program-files.outputs.path}}/dotnet";
.\dotnet-install.ps1 -Runtime dotnet -SkipNonVersionedFiles -NoPath -Channel STS -Architecture ${{inputs.architecture}} -InstallDir "${{steps.get-program-files.outputs.path}}/dotnet";

$channel = "${{steps.get_channel.outputs.channel}}";
if ($channel -ne '') {
.\dotnet-install.ps1 -Runtime dotnet -SkipNonVersionedFiles -NoPath -Channel $channel -Architecture ${{inputs.architecture}} -InstallDir "${{steps.get-program-files.outputs.path}}/dotnet";
}

$channels = "${{steps.get_channel.outputs.channels_multiline}}";
if ($channels -ne '') {
foreach ($channel in ($channels -split "[\r\n]+")) {
.\dotnet-install.ps1 -Runtime dotnet -SkipNonVersionedFiles -NoPath -Channel $channel -Architecture ${{inputs.architecture}} -InstallDir "${{steps.get-program-files.outputs.path}}/dotnet";
}
}

$installRoot = (Resolve-Path (Join-Path "${{steps.get-program-files.outputs.path}}" 'dotnet')).Path;
if ('${{ inputs.architecture == 'x86'}}' -eq 'true') {
Add-Content -Path $env:GITHUB_ENV -Value "DOTNET_ROOT(x86)=$installRoot";
}
shell: pwsh
9 changes: 9 additions & 0 deletions .github/workflows/test-unix-mono.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y mono-complete

- name: Install Mono on macOS
if: runner.os == 'macOS'
run: |
brew update
brew install mono || (brew link --overwrite --force mono && brew install mono)
brew link --overwrite --force mono
shell: bash

- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
architecture: ${{inputs.architecture}}
env:
DOTNET_INSTALL_DIR: ${{ runner.temp }}/.dotnet

Expand Down
Loading