-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (70 loc) · 2.23 KB
/
Copy pathci.yml
File metadata and controls
87 lines (70 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
name: CI
on:
push:
branches: [ "main", "dev" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build-and-test:
name: Build & Test (.NET ${{ matrix.dotnet }})
runs-on: ubuntu-latest
strategy:
matrix:
dotnet: [ "10.0.x" ]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # needed for GitVersioning / source link
- name: Setup .NET ${{ matrix.dotnet }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
- name: Restore
run: dotnet restore
- name: Build (warn as errors)
run: dotnet build --no-restore -c Release
- name: Test
run: >
dotnet test --no-build -c Release
--logger "trx;LogFileName=results.trx"
--results-directory ./test-results
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.dotnet }}
path: ./test-results/*.trx
retention-days: 7
# ── AOT smoke test ──────────────────────────────────────────────────────────
aot-publish:
name: AOT publish smoke test
runs-on: ubuntu-latest
needs: build-and-test
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: "10.0.x"
- name: Install AOT prerequisites
run: sudo apt-get install -y clang zlib1g-dev
- name: AOT publish (minimal sample)
run: >
dotnet publish samples/SimpleAuth.Sample.Minimal/SimpleAuth.Sample.Minimal.csproj
-c Release
-r linux-x64
--self-contained
-p:PublishAot=true
-o ./publish/aot
- name: Verify binary exists
run: test -f ./publish/aot/SimpleAuth.Sample.Minimal
- name: Upload AOT binary size report
uses: actions/upload-artifact@v4
with:
name: aot-binary
path: ./publish/aot/SimpleAuth.Sample.Minimal
retention-days: 3