mirror of
https://github.com/biomejs/biome.git
synced 2025-12-23 08:21:13 +00:00
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
name: Benchmarks
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types: [ opened, synchronize ]
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'Cargo.lock'
|
|
- 'crates/**_parser/**/*.rs'
|
|
- 'crates/**_formatter/**/*.rs'
|
|
- 'crates/**_analyze/**/*.rs'
|
|
- 'crates/biome_grit_patterns/**/*.rs'
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'Cargo.lock'
|
|
- 'crates/**_parser/**/*.rs'
|
|
- 'crates/**_formatter/**/*.rs'
|
|
- 'crates/**_analyze/**/*.rs'
|
|
- 'crates/biome_grit_patterns/**/*.rs'
|
|
|
|
env:
|
|
RUST_LOG: info
|
|
|
|
jobs:
|
|
bench:
|
|
permissions:
|
|
pull-requests: write
|
|
name: Bench
|
|
runs-on: depot-ubuntu-24.04-arm-16
|
|
|
|
steps:
|
|
|
|
- name: Checkout PR Branch
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
ref: ${{ steps.sha.outputs.result }}
|
|
|
|
- name: Install toolchain
|
|
uses: moonrepo/setup-rust@ede6de059f8046a5e236c94046823e2af11ca670 # v1.2.2
|
|
with:
|
|
channel: stable
|
|
cache-target: release
|
|
bins: cargo-codspeed
|
|
cache-base: main
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Compile
|
|
timeout-minutes: 15
|
|
run: cargo codspeed build --features codspeed -p xtask_bench
|
|
env:
|
|
CARGO_BUILD_JOBS: 3 # Default is 4 (equals to the vCPU count of the runner), which leads OOM on cargo build
|
|
|
|
- name: Run the benchmarks
|
|
uses: CodSpeedHQ/action@0010eb0ca6e89b80c88e8edaaa07cfe5f3e6664d # v3.5.0
|
|
timeout-minutes: 30
|
|
with:
|
|
run: cargo codspeed run
|
|
token: ${{ secrets.CODSPEED_TOKEN }}
|