Benchmarks #24
This file contains 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: Benchmarks | |
on: | |
push: | |
branches: | |
- main | |
- mb/benchmarks | |
issue_comment: | |
types: [created] | |
if: contains(github.event.comment.body, 'test performance please') | |
schedule: | |
# every night at 03:33 | |
- cron: '33 3 * * *' | |
jobs: | |
benchmarks: | |
name: On-Push Benchmarks | |
runs-on: ['self-hosted', 'benchmarks'] | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
ref: ${{ github.event_name == 'push' && github.ref || github.event.issue.pull_request.head.ref }} | |
repository: ${{ github.event_name == 'push' && github.repository || github.event.issue.pull_request.head.repo.full_name }} | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
- name: Set Path | |
run: | | |
echo "/home/scalabenchs/.local/share/coursier/bin" >> $GITHUB_PATH | |
- name: Run Benchmarks | |
# Select benchmarks that do not contain `Nightly` or `Bootstrapped` in | |
# their name. | |
# `-foe true` means "fail on error". | |
# `-gc true` launches the garbage collector between each iterations, which | |
# significantly reduces the noise. | |
run: "sbt 'scala3-bench / Jmh / run -foe true -gc true -e Nightly -e Bootstrapped'" | |
- name: Run Bootstrapped Benchmarks | |
# Select benchmarks that contain `Bootstrapped` in their name, but not | |
# `Nightly`. | |
run: "sbt 'scala3-bench-bootstrapped / Jmh / run -foe true -gc true -e Nightly Bootstrapped'" | |
- name: Upload Results | |
run: "echo 'Uploading results...'" | |
- name: Post Comment | |
if: github.event_name == 'issue_comment' | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const issue_number = context.payload.issue.number; | |
const comment = `Benchmarks have been triggered. The results will be posted soon.`; | |
await github.issues.createComment({ | |
issue_number: issue_number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: comment, | |
}); | |
benchmarks_nightly: | |
name: Nightly Benchmarks | |
if: github.event_name == 'schedule' | |
runs-on: ['self-hosted', 'benchmarks'] | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
with: | |
submodules: 'true' | |
ref: main | |
- name: Git Checkout | |
uses: actions/checkout@v4 | |
- name: Set Path | |
run: | | |
echo "/home/scalabenchs/.local/share/coursier/bin" >> $GITHUB_PATH | |
- name: Run Benchmarks | |
run: "sbt 'scala3-bench / Jmh / run -foe true -gc true -e Bootstrapped Nightly'" | |
- name: Upload Results | |
run: "echo 'Uploading results...'" |