-
Notifications
You must be signed in to change notification settings - Fork 6
63 lines (51 loc) · 1.49 KB
/
build-release.yml
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
name: Build and Release
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0.x' # Adjust the version as needed
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Performance Test
run: dotnet run --project SharpVectorPerformance --configuration Release
# - name: Publish
# run: dotnet publish --configuration Release --output ./publish --no-build
# - name: Upload artifact
# uses: actions/upload-artifact@v4
# with:
# name: release-build
# path: ./publish
- name: Performance Results
run: |
echo "## Performance Results" > $GITHUB_STEP_SUMMARY
cat ./BenchmarkDotNet.Artifacts/results/SharpVectorPerformance.MemoryVectorDatabasePerformance-report-github.md >> $GITHUB_STEP_SUMMARY
- name: Upload Performance artifact
uses: actions/upload-artifact@v4
with:
name: performance-results
path: './src/BenchmarkDotNet.Artifacts/*'
- name: Upload Nuget artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: '**/*.nupkg'