-
Notifications
You must be signed in to change notification settings - Fork 498
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
Support for target runtimes. #72
Comments
From my looking it is explicitly set to x64 It's probably a corner case, but it could cause issues if someone is running an x86 self hosted runner. |
Any thoughts resurrecting the following PR: #152 I'd like a way to specify the architecture too. I need to test on win-x86 and setting that up is complicated. |
I need to test some code with x86 and so this is a blocker for me. |
I have found a workaround I use in my workflows that's not TOO cumbersome. Note that this example assumes Windows for the OS. # This must be done before the normal setup-dotnet action to ensure DOTNET_ROOT refers to the 64-bit installation
- name: Setup .NET x86
uses: actions/setup-dotnet@v4
env:
PROCESSOR_ARCHITECTURE: x86
DOTNET_INSTALL_DIR: C:\Program Files (x86)\dotnet
with:
dotnet-version: 8.0.x
# Copy DOTNET_ROOT from the above step to DOTNET_ROOT(x86), the next step will overwrite DOTNET_ROOT to refer to the 64-bit installation
- name: Set DOTNET_ROOT(x86)
shell: pwsh
run: |
echo "DOTNET_ROOT(x86)=${env:DOTNET_ROOT}" | Out-File -FilePath $env:GITHUB_ENV -Append
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x |
Looking at the documentation and the code it appears the SDK runtime platform architecture is determined by the architecture of the OS.
It would be very useful for unit testing scenarios to allow specifying whether the x86 or x64 SDK is in use as
dotnet test
requires the explicit architecture.The text was updated successfully, but these errors were encountered: