Skip to content

Commit ad235dc

Browse files
authored
ci: run unit tests under Native AOT (#374)
1 parent 1c74be7 commit ad235dc

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.github/workflows/aot.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Publishes the unit tests as Native AOT binaries and runs them, verifying the library
2+
# behaves correctly under AOT compilation (IsAotCompatible only runs compile-time analyzers).
3+
4+
name: AOT Tests
5+
6+
on:
7+
push:
8+
branches: ["main"]
9+
pull_request:
10+
branches: ["main"]
11+
workflow_dispatch:
12+
13+
jobs:
14+
aot-test:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: false
18+
matrix:
19+
# net8.0 also exercises the pre-net9 completion-order streaming path in ToIAsyncEnumerable
20+
framework: [net8.0, net10.0]
21+
22+
steps:
23+
- uses: actions/checkout@v7
24+
with:
25+
persist-credentials: false
26+
- name: Setup .NET
27+
uses: actions/setup-dotnet@v6
28+
with:
29+
dotnet-version: 10.0.x
30+
- name: Publish tests as Native AOT
31+
run: dotnet publish EnumerableAsyncProcessor.UnitTests -f ${{ matrix.framework }} -r linux-x64 -c Release -p:PublishAot=true
32+
- name: Run AOT tests
33+
run: ./EnumerableAsyncProcessor.UnitTests/bin/Release/${{ matrix.framework }}/linux-x64/publish/EnumerableAsyncProcessor.UnitTests

0 commit comments

Comments
 (0)