-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
84 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,70 @@ | ||
name: CI Benchmarks | ||
|
||
on: push | ||
# push: | ||
# branches: | ||
# - master | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
permissions: | ||
# deployments permission to deploy GitHub pages website | ||
deployments: write | ||
# contents permission to update benchmark contents in gh-pages branch | ||
contents: write | ||
|
||
# cancel in-progress job when a new push is performed | ||
concurrency: | ||
group: ci-bench-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
benchmark: | ||
name: Performance benchmarks | ||
# strategy: | ||
# matrix: | ||
# # version: [4.12.0, 4.14.1] | ||
# version: [4.14.1] | ||
|
||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
|
||
- name: Rust-setup | ||
run: cargo test --all-features | ||
|
||
- name: System dependencies (ubuntu) | ||
run: | | ||
sudo apt install build-essential | ||
# libgmp-dev z3 opam cmake jq | ||
|
||
- name: cargo-cache # From: https://github.com/actions/cache/blob/main/examples.md#rust---cargo | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
~/.cargo/bin/ | ||
~/.cargo/registry/index/ | ||
~/.cargo/registry/cache/ | ||
~/.cargo/git/db/ | ||
target/ | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Run benchmark | ||
run: | | ||
cd examples | ||
cargo run --release -p collatz | ||
cd .. | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
name: CN Benchmarks | ||
tool: 'customSmallerIsBetter' | ||
output-file-path: examples/benchmark_results.json | ||
# Access token to deploy GitHub Pages branch | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Push and deploy GitHub pages branch automatically | ||
auto-push: true |
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,14 @@ | ||
[ | ||
{ | ||
"name": "CPU Load", | ||
"unit": "Percent", | ||
"value": 50, | ||
"range": "5%", | ||
"extra": "My Optional Information for the tooltip" | ||
}, | ||
{ | ||
"name": "Peak Memory Used", | ||
"unit": "Megabytes", | ||
"value": 100 | ||
} | ||
] |