Skip to content

Update benchmark.yml #178

Update benchmark.yml

Update benchmark.yml #178

Workflow file for this run

name: .NET CI
on:
push:
branches: [ "next" ]
pull_request:
branches: [ "next" ]
env:
DOTNET_VERSION: '10.0.103'
NODE_VERSION: '24'
permissions:
contents: read
statuses: write
jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Restore dependencies
run: dotnet restore src/FastClonerCi.slnf
- name: Build
run: dotnet build src/FastClonerCi.slnf --no-restore
- name: Test
run: dotnet test src/FastClonerCi.slnf --no-build --verbosity normal
- name: Update GitHub status check
if: always()
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: "Tests (${{ matrix.os }})"
description: "The tests on ${{ matrix.os }} ${{ job.status == 'success' && 'passed' || 'failed' }}"
state: ${{ job.status == 'success' && 'success' || 'failure' }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
build-netstandard20:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Build FastCloner for netstandard2.0
run: dotnet build src/FastCloner/ --framework netstandard2.0
- name: Update GitHub status check
if: always()
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Build (netstandard2.0)'
description: "The build for netstandard2.0 ${{ job.status == 'success' && 'passed' || 'failed' }}"
state: ${{ job.status == 'success' && 'success' || 'failure' }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
build-net46:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET Framework
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Build FastCloner for net46
run: dotnet build src/FastCloner/ --framework net46
- name: Update GitHub status check
if: always()
uses: Sibz/github-status-action@v1
with:
authToken: ${{secrets.GITHUB_TOKEN}}
context: 'Build (net46)'
description: "The build for net46 ${{ job.status == 'success' && 'passed' || 'failed' }}"
state: ${{ job.status == 'success' && 'success' || 'failure' }}
sha: ${{ github.event.pull_request.head.sha || github.sha }}
target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}