Skip to content

Commit 796c190

Browse files
author
Petr Sramek
committed
split job to build and benchmark, added OS matrix and concurrent execution to benchmark job
1 parent cc63e8e commit 796c190

File tree

1 file changed

+26
-3
lines changed

1 file changed

+26
-3
lines changed

.github/workflows/dotnet.yml

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ on:
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
steps:
@@ -20,7 +19,7 @@ jobs:
2019
uses: actions/setup-dotnet@v3
2120
with:
2221
dotnet-version: 9.x
23-
- name: Restore dependencies
22+
- name: Restore
2423
run: dotnet restore
2524
- name: Build
2625
run: dotnet build --no-restore
@@ -31,4 +30,28 @@ jobs:
3130
run: dotnet run -c Release --framework net9.0 --runtimes net9.0 --filter '*DecodeBenchmark*'
3231
- name: Encode Benchmark
3332
working-directory: ./benchmarks/PolylineAlgorithm.Benchmarks
34-
run: dotnet run -c Release --framework net9.0 --runtimes net9.0 --filter '*EncodeBenchmark*'
33+
run: dotnet run -c Release --framework net9.0 --runtimes net9.0 --filter '*EncodeBenchmark*'
34+
benchmark:
35+
strategy:
36+
matrix:
37+
os: [ubuntu-latest, windows-latest, macos-latest]
38+
runs-on: $
39+
40+
concurrency:
41+
group: becnhmark-group
42+
cancel-in-progress: true
43+
44+
steps:
45+
- uses: actions/checkout@v3
46+
- name: Setup .NET 9
47+
uses: actions/setup-dotnet@v3
48+
with:
49+
dotnet-version: 9.x
50+
- name: Restore
51+
run: dotnet restore
52+
- name: Decode Benchmark
53+
working-directory: ./benchmarks/PolylineAlgorithm.Benchmarks
54+
run: dotnet run -c Release --no-restore --framework net9.0 --runtimes net9.0 --filter '*DecodeBenchmark*'
55+
- name: Encode Benchmark
56+
working-directory: ./benchmarks/PolylineAlgorithm.Benchmarks
57+
run: dotnet run -c Release --no-restore --framework net9.0 --runtimes net9.0 --filter '*EncodeBenchmark*'

0 commit comments

Comments
 (0)