Skip to content
Merged
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
33 changes: 33 additions & 0 deletions .github/workflows/aot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Publishes the unit tests as Native AOT binaries and runs them, verifying the library
# behaves correctly under AOT compilation (IsAotCompatible only runs compile-time analyzers).

name: AOT Tests

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
aot-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# net8.0 also exercises the pre-net9 completion-order streaming path in ToIAsyncEnumerable
framework: [net8.0, net10.0]

Comment on lines +20 to +21

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 net9.0 AOT coverage gap

The test project targets net8.0;net9.0;net10.0 (see EnumerableAsyncProcessor.UnitTests.csproj), but the matrix skips net9.0. The PR description explains the rationale (net8 covers the pre-net9 streaming path; net10 covers Task.WhenEach), but net9.0 is a distinct TFM with its own runtime behaviour and could have different AOT trimming characteristics. If a net9.0-specific code path is ever added, it would fall through this gate silently. Worth at least a brief inline comment in the matrix entry explaining why net9.0 is intentionally absent.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x
- name: Publish tests as Native AOT
run: dotnet publish EnumerableAsyncProcessor.UnitTests -f ${{ matrix.framework }} -r linux-x64 -c Release -p:PublishAot=true
- name: Run AOT tests
run: ./EnumerableAsyncProcessor.UnitTests/bin/Release/${{ matrix.framework }}/linux-x64/publish/EnumerableAsyncProcessor.UnitTests
Loading