Skip to content

Update dependencies and target frameworks and fix build warnings #65

Update dependencies and target frameworks and fix build warnings

Update dependencies and target frameworks and fix build warnings #65

name: Run benchmark
on:
pull_request:
branches: [ main ]
jobs:
benchmark:
name: Continuous benchmarking
runs-on: windows-2019
defaults:
run:
working-directory: ./src
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
# Run benchmark with `go test -bench` and stores the output to a file
- name: Run benchmark
run: dotnet run --project ./GeoJSON.Text.Test.Benchmark/GeoJSON.Text.Test.Benchmark.csproj -c Release -- --job medium -f *SerializeAndDeserialize*
# Download previous benchmark result from cache (if exists)
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark
# Run `github-action-benchmark` action
- name: Store benchmark result
uses: Happypig375/github-action-benchmark@v1
with:
# What benchmark tool the output.txt came from
tool: 'benchmarkdotnet'
# Where the output from the benchmark tool is stored
output-file-path: 'src/BenchmarkDotNet.Artifacts/results/GeoJSON.Text.Test.Benchmark.SerializeAndDeserialize-report-full.json'
# Where the previous data file is stored
external-data-json-path: ./cache/benchmark-data.json
# Will comment on pull request when an alert happens
comment-always: true
# GitHub API token to make a commit comment
github-token: ${{ secrets.GITHUB_TOKEN }}
# Upload the updated cache file for the next job by actions/cache
# Run `github-action-benchmark` action