-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (54 loc) · 1.84 KB
/
Copy pathbuild.yml
File metadata and controls
68 lines (54 loc) · 1.84 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
name: Build & Test
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
10.0.x
- name: Restore workloads
run: dotnet workload restore
- name: Cache NuGet packages
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: ${{ runner.os }}-nuget-
- name: Verify DLL integrity checksums
run: powershell -ExecutionPolicy Bypass -File scripts/VerifyChecksums.ps1
- name: Restore dependencies
run: dotnet restore OpenCV5Sharp.slnx
- name: Build
run: dotnet build OpenCV5Sharp.slnx -c Release --no-restore
- name: Test
run: dotnet test OpenCV5Sharp.slnx --no-build -c Release --collect:"XPlat Code Coverage" --logger:"console;verbosity=detailed"
- name: Pack NuGet (CPU)
run: |
dotnet pack src/OpenCV5Sharp/OpenCV5Sharp.csproj -c Release --no-build -o ./artifacts
dotnet pack src/OpenCV5Sharp.Mobile/OpenCV5Sharp.Mobile.csproj -c Release --no-build -o ./artifacts
- name: Upload NuGet Package
uses: actions/upload-artifact@v4
with:
name: nuget-packages
path: ./artifacts/*.nupkg
if-no-files-found: warn
- name: Upload Coverage Report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: '**/coverage.cobertura.xml'
if-no-files-found: ignore