Merge branch 'v2_develop' into v2_release

This commit is contained in:
Tig
2025-11-14 08:07:27 -07:00
716 changed files with 39608 additions and 43361 deletions

View File

@@ -1,4 +1,4 @@
name: Ensure that Release Build of Solution Builds Correctly
name: Build Validation
on:
push:
@@ -11,11 +11,14 @@ on:
- '**.md'
jobs:
build_release:
# Ensure that RELEASE builds are not broken
build-validation:
name: Build All Configurations
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout ${{ github.ref_name }}
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET Core
@@ -24,11 +27,19 @@ jobs:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: Restore dependencies
run: dotnet restore
# Suppress CS0618 (member is obsolete) and CS0612 (member is obsolete without message)
# Using -property: syntax with URL-encoded semicolon (%3B) to avoid shell interpretation issues
- name: Build Debug
run: dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612
- name: Build Release Terminal.Gui
run: dotnet build Terminal.Gui/Terminal.Gui.csproj --no-incremental --nologo --force --configuration Release
run: dotnet build Terminal.Gui/Terminal.Gui.csproj --configuration Release --no-incremental --force -property:NoWarn=0618%3B0612
- name: Pack Release Terminal.Gui
run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages
run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612
- name: Restore AOT and Self-Contained projects
run: |
@@ -40,8 +51,8 @@ jobs:
- name: Build Release AOT and Self-Contained
run: |
dotnet build ./Examples/NativeAot/NativeAot.csproj --configuration Release
dotnet build ./Examples/SelfContained/SelfContained.csproj --configuration Release
dotnet build ./Examples/NativeAot/NativeAot.csproj --configuration Release -property:NoWarn=0618%3B0612
dotnet build ./Examples/SelfContained/SelfContained.csproj --configuration Release -property:NoWarn=0618%3B0612
- name: Build Release Solution without restore
run: dotnet build --configuration Release --no-restore
- name: Build Release Solution
run: dotnet build --configuration Release --no-restore -property:NoWarn=0618%3B0612

View File

@@ -1,5 +1,4 @@
name: Build & Run Integration Tests
on:
push:
branches: [ v2_release, v2_develop ]
@@ -9,52 +8,99 @@ on:
branches: [ v2_release, v2_develop ]
paths-ignore:
- '**.md'
jobs:
build_and_test_debug:
jobs:
build:
uses: ./.github/workflows/quick-build.yml
integration_tests:
name: Integration Tests
runs-on: ${{ matrix.os }}
needs: build
strategy:
# Turn off fail-fast to let all runners run even if there are errors
fail-fast: true
fail-fast: false # Let all OSes finish even if one fails
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
timeout-minutes: 15
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: ga
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: test-build-artifacts
path: .
- name: Install dependencies
run: |
dotnet restore
- name: Restore NuGet packages
run: dotnet restore
- name: Build IntegrationTests
run: dotnet build Tests/IntegrationTests --configuration Debug --no-restore
- name: Disable Windows Defender (Windows only)
if: runner.os == 'Windows'
shell: powershell
run: |
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
Add-MpPreference -ExclusionProcess "dotnet.exe"
Add-MpPreference -ExclusionProcess "testhost.exe"
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
- name: Set VSTEST_DUMP_PATH
shell: bash
run: echo "{VSTEST_DUMP_PATH}={logs/${{ runner.os }}/}" >> $GITHUB_ENV
- name: Set VSTEST_DUMP_PATH
shell: bash
run: echo "VSTEST_DUMP_PATH=logs/IntegrationTests/${{ runner.os }}/" >> $GITHUB_ENV
- name: Run IntegrationTests
run: |
dotnet test Tests/IntegrationTests --no-build --verbosity normal --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
# mv -v Tests/IntegrationTests/TestResults/*/*.* TestResults/IntegrationTests/
- name: Run IntegrationTests
shell: bash
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
# Run with coverage on Linux only
dotnet test Tests/IntegrationTests \
--no-build \
--verbosity minimal \
--collect:"XPlat Code Coverage" \
--settings Tests/IntegrationTests/runsettings.coverage.xml \
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
--blame \
--blame-crash \
--blame-hang \
--blame-hang-timeout 60s \
--blame-crash-collect-always
else
# Run without coverage on Windows/macOS for speed
dotnet test Tests/IntegrationTests \
--no-build \
--verbosity minimal \
--settings Tests/IntegrationTests/runsettings.xml \
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
--blame \
--blame-crash \
--blame-hang \
--blame-hang-timeout 60s \
--blame-crash-collect-always
fi
- name: Upload Test Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: integration-test-logs-${{ runner.os }}
path: |
logs/
TestResults/IntegrationTests/
- name: Upload Integration Test Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: integration_tests-logs-${{ runner.os }}
path: |
logs/IntegrationTests/
TestResults/
- name: Upload Integration Tests Coverage to Codecov
if: matrix.os == 'ubuntu-latest' && always()
uses: codecov/codecov-action@v4
with:
files: TestResults/**/coverage.cobertura.xml
flags: integrationtests
name: IntegrationTests-${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false

43
.github/workflows/quick-build.yml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Quick Build for Tests
on:
workflow_call:
outputs:
artifact-name:
description: "Name of the build artifacts"
value: ${{ jobs.quick-build.outputs.artifact-name }}
jobs:
quick-build:
name: Build Debug Only
runs-on: ubuntu-latest
outputs:
artifact-name: test-build-artifacts
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: Restore dependencies
run: dotnet restore
# Suppress CS0618 (member is obsolete) and CS0612 (member is obsolete without message)
- name: Build Debug
run: dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: test-build-artifacts
path: |
**/bin/Debug/**
**/obj/Debug/**
retention-days: 1

View File

@@ -11,16 +11,21 @@ on:
- '**.md'
jobs:
# Call the quick-build workflow to build Debug configuration only
build:
uses: ./.github/workflows/quick-build.yml
non_parallel_unittests:
name: Non-Parallel Unit Tests
runs-on: ${{ matrix.os }}
needs: build
strategy:
# Turn off fail-fast to let all runners run even if there are errors
fail-fast: true
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
timeout-minutes: 10
timeout-minutes: 15 # Increased from 10 for Windows
steps:
- name: Checkout code
@@ -32,27 +37,59 @@ jobs:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: Install dependencies
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: test-build-artifacts
path: .
# KEEP THIS - It's needed for --no-build to work
- name: Restore NuGet packages
run: dotnet restore
# Optimize Windows performance
- name: Disable Windows Defender (Windows only)
if: runner.os == 'Windows'
shell: powershell
run: |
dotnet restore
- name: Build Solution Debug
run: dotnet build --configuration Debug --no-restore
# Test
# Note: The --blame and VSTEST_DUMP_PATH stuff is needed to diagnose the test runner crashing on ubuntu/mac
# See https://github.com/microsoft/vstest/issues/2952 for why the --blame stuff below is needed.
# Without it, the test runner crashes on ubuntu (but not Windows or mac)
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
Add-MpPreference -ExclusionProcess "dotnet.exe"
Add-MpPreference -ExclusionProcess "testhost.exe"
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
- name: Set VSTEST_DUMP_PATH
shell: bash
run: echo "{VSTEST_DUMP_PATH}={logs/UnitTests/${{ runner.os }}/}" >> $GITHUB_ENV
run: echo "VSTEST_DUMP_PATH=logs/UnitTests/${{ runner.os }}/" >> $GITHUB_ENV
- name: Run UnitTests
shell: bash
run: |
dotnet test Tests/UnitTests --no-build --verbosity normal --collect:"XPlat Code Coverage" --settings Tests/UnitTests/coverlet.runsettings --diag:logs/UnitTests/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
# mv -v Tests/UnitTests/TestResults/*/*.* TestResults/UnitTests/
if [ "${{ runner.os }}" == "Linux" ]; then
# Run with coverage on Linux only
dotnet test Tests/UnitTests \
--no-build \
--verbosity normal \
--collect:"XPlat Code Coverage" \
--settings Tests/UnitTests/runsettings.xml \
--diag:logs/UnitTests/${{ runner.os }}/logs.txt \
--blame \
--blame-crash \
--blame-hang \
--blame-hang-timeout 60s \
--blame-crash-collect-always
else
# Run without coverage on Windows/macOS for speed
dotnet test Tests/UnitTests \
--no-build \
--verbosity normal \
--settings Tests/UnitTests/runsettings.xml \
--diag:logs/UnitTests/${{ runner.os }}/logs.txt \
--blame \
--blame-crash \
--blame-hang \
--blame-hang-timeout 120s \
--blame-crash-collect-always
fi
- name: Upload Test Logs
if: always()
@@ -61,18 +98,29 @@ jobs:
name: non_parallel_unittests-logs-${{ runner.os }}
path: |
logs/UnitTests
TestResults/UnitTests/
TestResults/
- name: Upload Non-Parallel UnitTests Coverage to Codecov
if: matrix.os == 'ubuntu-latest' && always()
uses: codecov/codecov-action@v4
with:
files: TestResults/**/coverage.cobertura.xml
flags: unittests-nonparallel
name: UnitTests-${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
parallel_unittests:
name: Parallel Unit Tests
runs-on: ${{ matrix.os }}
needs: build
strategy:
# Turn off fail-fast to let all runners run even if there are errors
fail-fast: true
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
timeout-minutes: 10
timeout-minutes: 15
steps:
- name: Checkout code
@@ -84,27 +132,57 @@ jobs:
dotnet-version: 8.x
dotnet-quality: 'ga'
- name: Install dependencies
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
name: test-build-artifacts
path: .
- name: Restore NuGet packages
run: dotnet restore
- name: Disable Windows Defender (Windows only)
if: runner.os == 'Windows'
shell: powershell
run: |
dotnet restore
- name: Build Solution Debug
run: dotnet build --configuration Debug --no-restore
# Test
# Note: The --blame and VSTEST_DUMP_PATH stuff is needed to diagnose the test runner crashing on ubuntu/mac
# See https://github.com/microsoft/vstest/issues/2952 for why the --blame stuff below is needed.
# Without it, the test runner crashes on ubuntu (but not Windows or mac)
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
Add-MpPreference -ExclusionProcess "dotnet.exe"
Add-MpPreference -ExclusionProcess "testhost.exe"
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
- name: Set VSTEST_DUMP_PATH
shell: bash
run: echo "{VSTEST_DUMP_PATH}={logs/UnitTestsParallelizable/${{ runner.os }}/}" >> $GITHUB_ENV
run: echo "VSTEST_DUMP_PATH=logs/UnitTestsParallelizable/${{ runner.os }}/" >> $GITHUB_ENV
- name: Run UnitTestsParallelizable
shell: bash
run: |
dotnet test Tests/UnitTestsParallelizable --no-build --verbosity normal --collect:"XPlat Code Coverage" --settings Tests/UnitTestsParallelizable/coverlet.runsettings --diag:logs/UnitTestsParallelizable/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
# mv -v Tests/UnitTestsParallelizable/TestResults/*/*.* TestResults/UnitTestsParallelizable/
if [ "${{ runner.os }}" == "Linux" ]; then
# Run with coverage on Linux only
dotnet test Tests/UnitTestsParallelizable \
--no-build \
--verbosity normal \
--collect:"XPlat Code Coverage" \
--settings Tests/UnitTests/runsettings.coverage.xml \
--diag:logs/UnitTestsParallelizable/${{ runner.os }}/logs.txt \
--blame \
--blame-crash \
--blame-hang \
--blame-hang-timeout 60s \
--blame-crash-collect-always
else
# Run without coverage on Windows/macOS for speed
dotnet test Tests/UnitTestsParallelizable \
--no-build \
--verbosity normal \
--settings Tests/UnitTestsParallelizable/runsettings.xml \
--diag:logs/UnitTestsParallelizable/${{ runner.os }}/logs.txt \
--blame \
--blame-crash \
--blame-hang \
--blame-hang-timeout 60s \
--blame-crash-collect-always
fi
- name: Upload UnitTestsParallelizable Logs
if: always()
@@ -113,4 +191,14 @@ jobs:
name: parallel_unittests-logs-${{ runner.os }}
path: |
logs/UnitTestsParallelizable/
TestResults/UnitTestsParallelizable/
TestResults/
- name: Upload Parallelizable UnitTests Coverage to Codecov
if: matrix.os == 'ubuntu-latest' && always()
uses: codecov/codecov-action@v4
with:
files: TestResults/**/coverage.cobertura.xml
flags: unittests-parallel
name: UnitTestsParallelizable-${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false