Skip to content

chore(deps): Bump BenchmarkDotNet.Diagnostics.Windows from 0.15.7 to 0.15.8 #458

chore(deps): Bump BenchmarkDotNet.Diagnostics.Windows from 0.15.7 to 0.15.8

chore(deps): Bump BenchmarkDotNet.Diagnostics.Windows from 0.15.7 to 0.15.8 #458

Workflow file for this run

on:
push:
branches:
- main
release:
types:
- published
pull_request:
name: pipeline
env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
dotnet-version: |
10.0.x
9.0.x
8.0.x
jobs:
determine-version:
runs-on: ubuntu-latest
env:
IGNORE_NORMALISATION_GIT_HEAD_MOVE: 1
GITVERSION: '6.5.x'
outputs:
version: ${{ steps.gitversion.outputs.fullSemVer }}
package-version: ${{ steps.gitversion.outputs.fullSemVer }}
assembly-version: ${{ steps.gitversion.outputs.assemblySemVer }}
file-version: ${{ steps.gitversion.outputs.assemblySemFileVer }}
informational-version: ${{ steps.gitversion.outputs.informationalVersion }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
fetch-tags: true
- name: Install GitVersion ${{ env.GITVERSION }}
uses: gittools/actions/gitversion/setup@d0139503a9321f76b4a417dfdc8aebcec24decdd #v4.2.0
with:
versionSpec: ${{ env.GITVERSION }}
- name: Determine version
uses: gittools/actions/gitversion/execute@d0139503a9321f76b4a417dfdc8aebcec24decdd #v4.2.0
id: gitversion
build:
needs:
- determine-version
name: build (v${{ needs.determine-version.outputs.version }})
runs-on: ubuntu-latest
env:
msbuild-version-args: /p:Version="${{ needs.determine-version.outputs.version }}" /p:PackageVersion="${{ needs.determine-version.outputs.package-version }}" /p:AssemblyVersion="${{ needs.determine-version.outputs.assembly-version }}" /p:FileVersion="${{ needs.determine-version.outputs.file-version }}" /p:InformationalVersion="${{ needs.determine-version.outputs.informational-version }}"
outputs:
dotnet-version: ${{ env.dotnet-version }}
msbuild-version-args: ${{ env.msbuild-version-args }}
steps:
# Setup
- uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.dotnet-version }}
- run: dotnet --info
# Checkout
- uses: actions/checkout@v6
with:
fetch-depth: 1
# NuGet cache
- name: Restore NuGet global package cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.targets','**/*.props','**/*.csproj') }} # Can't use packages.lock.json yet, because Dependabot does not support it.
restore-keys: |
${{ runner.os }}-nuget-
# Restore
- run: dotnet restore
# Build
- run: dotnet build --no-restore -c Release ${{ env.msbuild-version-args }}
- name: Upload build artifacts
uses: actions/upload-artifact@v5
with:
name: build
path: |
*/**/bin
*/**/obj
if-no-files-found: error
retention-days: 7
test:
needs: build
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
fail-fast: false
runs-on: ${{ matrix.os }}
steps:
# Setup
- uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.dotnet-version }}
# Install Mono
- name: Install Mono (Ubuntu)
run: |
sudo apt install ca-certificates gnupg
sudo gpg --homedir /tmp --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/mono-official-archive-keyring.gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo chmod +r /usr/share/keyrings/mono-official-archive-keyring.gpg
echo "deb [signed-by=/usr/share/keyrings/mono-official-archive-keyring.gpg] https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-complete
if: matrix.os == 'ubuntu-latest'
- name: Install Mono (Mac)
run: brew install mono
if: matrix.os == 'macos-latest'
# Checkout
- uses: actions/checkout@v6
with:
fetch-depth: 1
# Restore build artifacts
- name: Download build artifacts
uses: actions/download-artifact@v6
with:
name: build
# Run all tests
- run: dotnet test --no-restore --no-build -c Release -- xUnit.AppDomain=denied
if: matrix.os == 'ubuntu-latest'
- run: dotnet test --no-restore --no-build -c Release --filter Category!=PublicApi -- xUnit.AppDomain=denied
if: matrix.os != 'ubuntu-latest'
pack:
needs:
- determine-version
- build
runs-on: ubuntu-latest
steps:
# Setup
- uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.dotnet-version }}
# Checkout
- uses: actions/checkout@v6
with:
fetch-depth: 1
# NuGet cache (.NET Framework Reference assemblies are needed for pack)
- name: Restore NuGet global package cache
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.targets','**/*.props','**/*.csproj') }} # Can't use packages.lock.json yet, because Dependabot does not support it.
restore-keys: |
${{ runner.os }}-nuget-
fail-on-cache-miss: true
# Restore build artifacts
- name: Download build artifacts
uses: actions/download-artifact@v6
with:
name: build
# Pack
- run: dotnet pack --no-restore --no-build -c Release ${{ needs.build.outputs.msbuild-version-args }}
- name: Upload release artifacts
uses: actions/upload-artifact@v5
with:
name: release-${{ needs.determine-version.outputs.package-version }}
path: |
src/**/*.*nupkg
if-no-files-found: error
retention-days: 90
deploy:
needs:
- determine-version
- test
- pack
if: github.event_name == 'release'
environment: production
runs-on: ubuntu-latest
steps:
# Restore release artifacts
- name: Download release artifact
uses: actions/download-artifact@v6
with:
name: release-${{ needs.determine-version.outputs.package-version }}
- name: push - nuget.org
env:
NUGET_SOURCE_URL: https://api.nuget.org/v3/index.json
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}
run: dotnet nuget push **/*.nupkg -k $NUGET_API_KEY -s "$NUGET_SOURCE_URL"