-
Notifications
You must be signed in to change notification settings - Fork 127
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* ci: Add benchmark run * Only run when CI succeeded * Generate debug info for bench builds * Try and fix the condition
- Loading branch information
1 parent
bb74821
commit 2f039e3
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||
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