Repository navigation
86 lines (69 loc) · 2.28 KB
/
Copy pathci.yml
File metadata and controls
86 lines (69 loc) · 2.28 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
name: CI
on:
push:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build solution
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
- name: Build solution
run: dotnet run --project ./build -- build-solution
- name: Check benchmark adapters
run: dotnet run --project tests/Matrix.Benchmark.Tests --configuration Release -p:MatrixMode=Benchmark
discover:
name: Discover categories
runs-on: ubuntu-latest
outputs:
categories: ${{ steps.matrix.outputs.categories }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
- name: Build category matrix
id: matrix
run: |
dotnet run --project ./build -- ci-matrix --output artifacts/ci-matrix.json
echo "categories=$(jq -c . artifacts/ci-matrix.json)" >> "$GITHUB_OUTPUT"
validate:
name: Validate features (${{ matrix.category }})
needs: discover
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
category: ${{ fromJSON(needs.discover.outputs.categories) }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: "10.0.x"
# Native AOT probing is a real publish per library and DependencyInjection alone has 22 of
# them, so it is skipped here to keep per-push feedback fast. The full probe set still runs
# in reports.yml and in a local prepare-commit.
- name: Validate library features
run: dotnet run --project ./build -- ci-reports --category "${{ matrix.category }}" --skip-benchmarks --skip-aot-probes
- name: Upload feature reports
if: failure()
uses: actions/upload-artifact@v7
with:
name: ci-features-${{ matrix.category }}
path: artifacts/ci-reports
if-no-files-found: error
retention-days: 7