84701ef879
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/cache](https://togithub.com/actions/cache) | action | major | `v3` -> `v4` | --- ### Release Notes <details> <summary>actions/cache (actions/cache)</summary> ### [`v4`](https://togithub.com/actions/cache/compare/v3...v4) [Compare Source](https://togithub.com/actions/cache/compare/v3...v4) </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/napi-rs/napi-rs). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMzUuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEzNS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
75 lines
1.7 KiB
YAML
75 lines
1.7 KiB
YAML
name: Benchmark
|
|
|
|
env:
|
|
DEBUG: 'napi:*'
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
bench:
|
|
name: Bench
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
cache: 'yarn'
|
|
|
|
- name: Install
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: stable
|
|
|
|
- name: Cache cargo
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: bench-cargo-cache
|
|
|
|
- name: 'Install dependencies'
|
|
run: yarn install --immutable --mode=skip-build
|
|
|
|
- name: 'Build bench'
|
|
run: yarn build:bench
|
|
|
|
- name: 'Run benchmark'
|
|
run: yarn bench
|
|
|
|
- name: Store benchmark result
|
|
uses: rhysd/github-action-benchmark@v1
|
|
if: github.ref == 'refs/heads/main'
|
|
with:
|
|
tool: 'benchmarkjs'
|
|
output-file-path: bench.txt
|
|
github-token: ${{ secrets.GH_TOKEN }}
|
|
auto-push: true
|
|
|
|
- name: Store benchmark result
|
|
uses: rhysd/github-action-benchmark@v1
|
|
if: github.ref != 'refs/heads/main'
|
|
with:
|
|
tool: 'benchmarkjs'
|
|
output-file-path: bench.txt
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
comment-always: true
|
|
|
|
- name: Clear the cargo caches
|
|
run: |
|
|
cargo install cargo-cache --no-default-features --features ci-autoclean
|
|
cargo-cache
|