Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: Add benchmark run #1641

Merged
merged 5 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/bench.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Bench
on:
workflow_run:
workflows: ["CI"]
types: [completed]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
bench:
name: Benchmark
runs-on: self-hosted
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
# components: rustfmt, clippy, llvm-tools-preview

- name: Use sccache
uses: mozilla-actions/[email protected]

- name: Enable sscache
run: |
echo "SCCACHE_GHA_ENABLED=true" >> "$GITHUB_ENV"
echo "RUSTC_WRAPPER=sccache" >> "$GITHUB_ENV"

- name: Install dependencies (Linux)
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get install -y --no-install-recommends gyp mercurial ninja-build lld
echo "RUSTFLAGS=-C link-arg=-fuse-ld=lld" >> "$GITHUB_ENV"

- name: Checkout
uses: actions/checkout@v4

- name: Build
run: |
cargo bench --features ci,bench

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,8 @@ license = "MIT OR Apache-2.0"
# Don't increase beyond what Firefox is currently using:
# https://firefox-source-docs.mozilla.org/writing-rust-code/update-policy.html#schedule
rust-version = "1.74.0"

[profile.bench]
# Inherits from the "release" profile, so just provide overrides here:
# https://doc.rust-lang.org/cargo/reference/profiles.html#release
debug = true
Loading