Skip to content

feat: support sdk-aware net9 and net10 surfaces #6

feat: support sdk-aware net9 and net10 surfaces

feat: support sdk-aware net9 and net10 surfaces #6

name: Benchmark report
on:
push:
branches:
- main
paths:
- ".github/workflows/benchmark-report.yml"
- "src/BitNetSharp.App/**"
- "src/BitNetSharp.Core/**"
- "tests/BitNetSharp.Tests/**"
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: benchmark-report-pages
cancel-in-progress: true
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: global.json
- name: Restore
run: dotnet restore BitNet-b1.58-Sharp.slnx
- name: Build
run: dotnet build BitNet-b1.58-Sharp.slnx --configuration Release --no-restore
- name: Test
run: dotnet test BitNet-b1.58-Sharp.slnx --configuration Release --no-build --no-restore
- name: Generate benchmark comparison report
run: >
dotnet run --configuration Release
--project "${{ github.workspace }}/src/BitNetSharp.App/BitNetSharp.App.csproj" --
benchmark-report
--model=bitnet-b1.58-sharp
--compare-model=traditional-local
--commit=${{ github.sha }}
--output="${{ github.workspace }}/artifacts/benchmark-report"
- name: Upload benchmark report artifact
uses: actions/upload-artifact@v4
with:
name: benchmark-report
path: ${{ github.workspace }}/artifacts/benchmark-report
if-no-files-found: error
- name: Setup GitHub Pages
uses: actions/configure-pages@v5
- name: Upload GitHub Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ github.workspace }}/artifacts/benchmark-report
deploy:
needs: benchmark
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy GitHub Pages artifact
id: deployment
uses: actions/deploy-pages@v4