-
Notifications
You must be signed in to change notification settings - Fork 0
119 lines (113 loc) · 3.96 KB
/
Copy pathci.yml
File metadata and controls
119 lines (113 loc) · 3.96 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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
schedule:
- cron: "0 2 * * *"
workflow_dispatch:
jobs:
build-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Restore
run: dotnet restore SmartPipe.Memory.slnx
- name: Build
run: dotnet build SmartPipe.Memory.slnx --configuration Release --no-restore /p:ContinuousIntegrationBuild=true
- name: Test
run: dotnet test SmartPipe.Memory.slnx --configuration Release --no-build --collect:"XPlat Code Coverage"
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: "**/TestResults/**/coverage.cobertura.xml"
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Install CSharpier
run: dotnet tool install --global csharpier
- name: CSharpier
run: csharpier check .
- name: Dotnet format
run: dotnet format SmartPipe.Memory.slnx --verify-no-changes --verbosity diagnostic
quality:
runs-on: ubuntu-latest
needs: build-test
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
NDEPEND_LICENSE: ${{ secrets.NDEPEND_LICENSE }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Sonar scan
if: ${{ env.SONAR_TOKEN != '' }}
run: |
dotnet tool install --global dotnet-sonarscanner
dotnet sonarscanner begin /k:"SmartPipe-Memory" /d:sonar.token="$SONAR_TOKEN" /d:sonar.cs.cobertura.reportsPaths="**/coverage.cobertura.xml" /d:sonar.qualitygate.wait=true
dotnet build SmartPipe.Memory.slnx --configuration Release
dotnet test SmartPipe.Memory.slnx --configuration Release --no-build --collect:"XPlat Code Coverage"
dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"
- name: NDepend
if: ${{ env.NDEPEND_LICENSE != '' }}
uses: ndepend/ndepend-action@v1
with:
license: ${{ env.NDEPEND_LICENSE }}
stopIfQGFailed: true
benchmarks-smoke:
runs-on: ubuntu-latest
needs: build-test
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run smoke benchmarks
env:
SMARTPIPE_BENCHMARK_PROFILE: smoke
run: |
dotnet run --project benchmarks/SmartPipe.Memory.Benchmarks/SmartPipe.Memory.Benchmarks.csproj -c Release -- --filter "*CsrBuildBenchmarks.BuildSnapshot*"
dotnet run --project benchmarks/SmartPipe.Memory.Benchmarks/SmartPipe.Memory.Benchmarks.csproj -c Release -- --filter "*TraversalBenchmarks.FindPath*"
dotnet run --project benchmarks/SmartPipe.Memory.Benchmarks/SmartPipe.Memory.Benchmarks.csproj -c Release -- --filter "*PageRankBenchmarks.ComputePageRankCsr*"
- name: Upload benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: benchmark-smoke
path: BenchmarkDotNet.Artifacts/**
benchmarks-nightly:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
needs: build-test
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Run nightly benchmarks
env:
SMARTPIPE_BENCHMARK_PROFILE: nightly
run: dotnet run --project benchmarks/SmartPipe.Memory.Benchmarks/SmartPipe.Memory.Benchmarks.csproj -c Release -- --filter "*"
- name: Upload nightly benchmark artifacts
uses: actions/upload-artifact@v4
with:
name: benchmark-nightly
path: BenchmarkDotNet.Artifacts/**