Skip to content

Commit

Permalink
excluded memory intensive examples and added back benchmark-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
zutshi committed Dec 31, 2024
1 parent b2468aa commit 2f5901d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/ci-bench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,21 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1



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

# Define the exclude list
exclude_list=("collatz" "overflow" "sha3-chain")

for file in *; do
# Check if the file is in the exclude list
skip=false
for exclude_file in "${exclude_list[@]}"; do
if [[ "$file" == "$exclude_file" ]]; then
skip=true
echo "skipping excluded example: $file"
break
fi
done

# If the file is not in the exclude list, process it
if ! $skip; then
if [ -d "$file" ]; then
echo "Running $file"
cargo run --release -p "$file"
fi
fi

done

0 comments on commit 2f5901d

Please sign in to comment.