Main and PR Pipeline #21
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: Main and PR Pipeline | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| on: | |
| pull_request: | |
| types: [opened, synchronize] | |
| workflow_dispatch: | |
| jobs: | |
| benchmark: | |
| if: startsWith(github.event.pull_request.title, 'perf') | |
| environment: ci | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: ./.github/actions/setup-nix | |
| with: | |
| cachix_cache_name: "${{ secrets.CACHIX_CACHE_NAME }}" | |
| cachix_auth_token: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
| - name: Run benchmark | |
| run: | | |
| just benchmark > profiling.md | |
| - name: Post report as PR comment | |
| if: success() | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| gh pr comment ${{ github.event.pull_request.number }} --body-file profiling.md |