Feature/2.0.0.0 preview2 #137
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: benchmark | |
on: | |
push: | |
tags: | |
- v* | |
branches: [main] | |
pull_request: | |
branches: [main, feature/*] | |
jobs: | |
build: | |
env: | |
APP: "${{ github.workspace }}/app" | |
PROJECT_BIN5: "./app/Spinner/bin/Release/net5.0" | |
PROJECT_BENCH: "./bench/Spinner.Benchmark" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Build Version 🏷️ | |
run: | | |
Import-Module .\nupkgs\GetBuildVersion.psm1 | |
Write-Host $Env:GITHUB_REF | |
$version = GetBuildVersion -VersionString $Env:GITHUB_REF | |
echo "BUILD_VERSION=$version" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
shell: pwsh | |
- name: Setup NuGet 🔧 | |
uses: NuGet/setup-nuget@v1.0.5 | |
- name: Setup .NET Core SDK 3.1 🔧 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 3.1.x | |
- name: Setup .NET Core SDK 5.0 🔧 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 5.0.x | |
- name: Setup .NET Core SDK 6.0 🔧 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.0.x | |
- name: Setup .NET Core SDK 7.0 🔧 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.0.305 | |
- name: Clean Dependencies 📦 | |
run: dotnet clean ${{env.PROJECT_BENCH }} | |
- name: Restore Dependencies 📦 | |
run: dotnet restore ${{env.PROJECT_BENCH }} | |
- name: Build ⚙️ | |
run: dotnet build ${{env.PROJECT_BENCH }} -c Release -p:Version=$BUILD_VERSION --no-restore | |
- name: Publish 📮 | |
run: dotnet publish ${{env.PROJECT_BENCH }} -f net6.0 -c Release --verbosity normal -o ./publish.benchmarks/ | |
- name: Run 🏋️♂️ | |
if: github.event_name == 'pull_request' | |
run: dotnet ./publish.benchmarks/Spinner.Benchmark.dll -f "Spinner.Benchmark.*" | |
- name: Upload Results 📂 | |
if: github.event_name == 'pull_request' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: Benchmark_Results | |
path: ./BenchmarkDotNet.Artifacts/results/* |