Fix benchmark pipeline hang: force exit after report generation #20
This file contains hidden or 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 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 --filter "Category=SlowLane" | |
| - name: Generate benchmark comparison report | |
| run: > | |
| dotnet run --framework net10.0 --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 |