Skip to content

Commit

Permalink
removed dead code and added initial benchmarking script
Browse files Browse the repository at this point in the history
  • Loading branch information
zutshi committed Dec 31, 2024
1 parent 95713d2 commit 58dbc95
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 32 deletions.
35 changes: 3 additions & 32 deletions .github/workflows/ci-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,44 +27,15 @@ jobs:
# # version: [4.12.0, 4.14.1]
# version: [4.14.1]

runs-on: ubuntu-22.04
runs-on: ubuntu-latest

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
./run_benchmarks.sh
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
8 changes: 8 additions & 0 deletions examples/run_benchmarks.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash

for file in *; do
if [ -d "$file" ]; then
echo "Running $file"
cargo run --release -p "$file"
fi
done

0 comments on commit 58dbc95

Please sign in to comment.