| 1 |
name: PR Commands |
| 2 |
|
| 3 |
# Comment on a pull request to refresh the benchmark tables in README.md: |
| 4 |
# |
| 5 |
# /bench-readme re-measure the arm64 tables |
| 6 |
# /bench-readme-amd64 re-measure the amd64 tables (Xeon block and simd/AVX2) |
| 7 |
# /bench-readme-amd64 -block 3 run only the third table, not both amd64 ones |
| 8 |
# |
| 9 |
# Each table names the `go test` command that produced it, so the runner only |
| 10 |
# decides which of them it can reproduce. Maintainers only. |
| 11 |
|
| 12 |
on: |
| 13 |
issue_comment: |
| 14 |
types: [created] |
| 15 |
pull_request_target: |
| 16 |
types: [opened] |
| 17 |
|
| 18 |
permissions: |
| 19 |
contents: write |
| 20 |
pull-requests: write |
| 21 |
|
| 22 |
jobs: |
| 23 |
hint: |
| 24 |
if: github.event_name == 'pull_request_target' |
| 25 |
uses: gofiber/.github/.github/workflows/pr-command-hint.yml@main |
| 26 |
with: |
| 27 |
hint: '`/bench-readme` or `/bench-readme-amd64` refresh the README benchmark numbers on this branch' |
| 28 |
|
| 29 |
bench-readme: |
| 30 |
# Skipped outright on a newly opened pull request, so it takes no concurrency slot. |
| 31 |
if: github.event_name == 'issue_comment' |
| 32 |
# Grouped per command, so the arm64 and amd64 runs of one pull request do not |
| 33 |
# queue behind each other for up to 90 minutes. |
| 34 |
concurrency: |
| 35 |
group: ${{ github.workflow }}-bench-readme-${{ github.event.issue.number }} |
| 36 |
cancel-in-progress: false |
| 37 |
uses: gofiber/.github/.github/workflows/pr-command.yml@main |
| 38 |
with: |
| 39 |
command: bench-readme |
| 40 |
# arm64 Linux carries no cpu model name, so this one writes "cpu: unknown". |
| 41 |
runs-on: blacksmith-4vcpu-ubuntu-2404-arm |
| 42 |
paths: README.md |
| 43 |
commit-message: 'docs: refresh README benchmark numbers' |
| 44 |
# the full catalog is ~15 min of measurement, plus the amd64 tables when forced |
| 45 |
timeout-minutes: 90 |
| 46 |
# ARGS is sanitized upstream and has to split into separate flags here |
| 47 |
run: go run ./scripts -update $ARGS |
| 48 |
# Same PAT the dependabot workflows use. It never meets pull request code (the |
| 49 |
# job that runs the command has no credentials), and it is what lets the push |
| 50 |
# reach a fork branch and start the repository's own checks. |
| 51 |
secrets: |
| 52 |
push-token: ${{ secrets.PR_TOKEN }} |
| 53 |
|
| 54 |
bench-readme-amd64: |
| 55 |
if: github.event_name == 'issue_comment' |
| 56 |
concurrency: |
| 57 |
group: ${{ github.workflow }}-bench-readme-amd64-${{ github.event.issue.number }} |
| 58 |
cancel-in-progress: false |
| 59 |
uses: gofiber/.github/.github/workflows/pr-command.yml@main |
| 60 |
with: |
| 61 |
command: bench-readme-amd64 |
| 62 |
# This pool hands out AMD EPYC and Intel Xeon under one label and moves the |
| 63 |
# same benchmark by up to 2x between them. The Environment: header above each |
| 64 |
# table records what ran, so a jump has something to be read against. |
| 65 |
runs-on: blacksmith-4vcpu-ubuntu-2404 |
| 66 |
paths: README.md |
| 67 |
commit-message: 'docs: refresh README benchmark numbers' |
| 68 |
timeout-minutes: 90 |
| 69 |
run: go run ./scripts -update $ARGS |
| 70 |
# Same PAT the dependabot workflows use. It never meets pull request code (the |
| 71 |
# job that runs the command has no credentials), and it is what lets the push |
| 72 |
# reach a fork branch and start the repository's own checks. |
| 73 |
secrets: |
| 74 |
push-token: ${{ secrets.PR_TOKEN }} |