Files
pardeike-Harmony/.github/workflows/test-windows-framework.yml
Copilot 01258366a5 Partially add .NET 10 support (#744)
* Initial plan

* Add .NET 10 support to Harmony

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>

* Update additional workflow files for .NET 10 SDK

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>

* Fix CI by installing .NET 10 SDK in workflows

Updated workflows to install both 9.0.x and 10.0.x SDKs using wildcard versions.
This ensures .NET 10 SDK is installed when available in GitHub Actions runners.
Changed global.json to require SDK 10.0.100 with latestPatch rollForward for forward compatibility.

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>

* Revert global.json to SDK 9.0.100 for CI compatibility

Changed global.json back to require SDK 9.0.100 with latestFeature rollForward.
Note: net10.0 targets will fail to build until .NET 10 SDK is available in GitHub Actions.
This is expected since .NET SDK was just released today.

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>

* Set global.json to require .NET 10 SDK with latestPatch rollForward

Updated global.json to explicitly require SDK 10.0.100 with latestPatch rollForward.
This works because actions/setup-dotnet downloads and installs the SDK regardless of what's preinstalled on the runner.
Confirmed .NET 10.0.100 SDK is available and builds net10.0 targets successfully.

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>

* Simplify workflow SDK installation to only use .NET 10

Removed dual 9.0.x/10.0.x SDK installation in favor of only installing 10.0.x.
The .NET 10 SDK can build all target frameworks including net9.0 and older using targeting packs.
This follows the minimal change approach requested.

Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pardeike <853584+pardeike@users.noreply.github.com>
2025-11-12 20:30:22 +01:00

84 lines
2.5 KiB
YAML

name: Template Testing Windows .NET Framework
on:
workflow_call:
inputs:
architecture:
required: true
type: string
description: 'The architecture to use'
target_framework:
required: true
type: string
description: 'The target framework to use'
target_framework_array:
required: true
type: string
description: 'The target frameworks to use'
build_configuration:
required: true
type: string
description: 'The build configuration to use'
manual_build:
required: false
type: boolean
default: true
description: 'Whether to build manually before running the tests'
upload_tests:
required: false
type: boolean
default: true
description: 'Whether to upload the test results'
experimental:
required: false
type: boolean
default: false
description: 'Whether the tests are mandatory for the build to pass'
env:
# Disable the .NET logo in the console output.
DOTNET_NOLOGO: true
# Disable the .NET first time experience to skip caching NuGet packages and speed up the build.
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending .NET CLI telemetry to Microsoft.
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
windows-net-framework:
name: ${{ inputs.build_configuration }}
runs-on: windows-2022
continue-on-error: ${{inputs.experimental}}
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup .NET Sdk
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Get Installed .NET Sdk Information
run: dotnet --info
- name: Download Build Cache
uses: ./.github/actions/test-build-cache
if: ${{!inputs.manual_build}}
with:
os: windows
build_configuration: ${{inputs.build_configuration}}
- name: Test Framework ${{inputs.architecture}}
uses: ./.github/actions/test-execute-test
with:
os: windows
architecture: ${{inputs.architecture}}
runtime-type: fx
target_framework: ${{inputs.target_framework}}
target_framework_array: ${{inputs.target_framework_array}}
build_configuration: ${{inputs.build_configuration}}
manual_build: ${{inputs.manual_build}}
upload_tests: ${{inputs.upload_tests}}
experimental: ${{inputs.experimental}}