Skip to content

Bump upload and download artifact versions (#528) #164

Bump upload and download artifact versions (#528)

Bump upload and download artifact versions (#528) #164

Workflow file for this run

name: Benchmark
# Do not run this workflow on pull request since this workflow has permission to modify contents.
on:
push:
branches:
- main
env:
AUTHOR: "@${{ github.event.commits[0].author.username }}"
REPO: "@${{ github.repository }}"
REPO_OWNER: "@${{ github.repository_owner }}"
ACTOR: "@${{ github.actor }}"
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
name: Performance regression check
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Rust Toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
# Run benchmark with `cargo bench` and stores the output to a file
- name: Run benchmark
run: cargo bench -- --output-format bencher | tee output.txt
# gh-pages branch is updated and pushed automatically with extracted benchmark data
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: PartiQL (rust) Benchmark
tool: 'cargo'
output-file-path: output.txt
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true
comment-always: true
comment-on-alert: true
alert-threshold: '150%'
fail-on-alert: true
alert-comment-cc-users: "${{ env.AUTHOR }},${{ env.ACTOR }},${{ env.REPO_OWNER }}"