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

Add benchmarks to CI #2139

Merged
merged 2 commits into from
Aug 21, 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
15 changes: 15 additions & 0 deletions .github/workflows/rusk_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,18 @@ jobs:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: cargo fmt --all -- --check
benchmark:
needs: changes
if: needs.changes.outputs.run-ci == 'true' && github.event_name == 'push' && github.ref == 'refs/heads/master'
name: Run Benchmarks
runs-on: core
steps:
- uses: actions/checkout@v4
- uses: dsherret/rust-toolchain-file@v1
- run: make bench
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: rusk-benchmark-results
path: ./target/criterion
retention-days: 14
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ doc: ## Run doc gen
$(MAKE) -C ./rusk-recovery $@
$(MAKE) -C ./wallet-core/ $@

bench: keys wasm ## Bench Rusk
$(MAKE) -C ./rusk bench

run: keys state web-wallet ## Run the server
$(MAKE) -C ./rusk/ $@

Expand All @@ -79,4 +82,4 @@ COMPILER_VERSION=v0.2.0
setup-compiler: ## Setup the Dusk Contract Compiler
@./scripts/setup-compiler.sh $(COMPILER_VERSION)

.PHONY: all abi keys state wasm allcircuits contracts test run help rusk web-wallet setup-compiler
.PHONY: all abi keys state wasm allcircuits contracts test bench run help rusk web-wallet setup-compiler
5 changes: 4 additions & 1 deletion rusk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ build: ## Build rusk binary
build-bench: ## Build the benchmarks
@cargo bench --features testwallet --no-run

bench: ## Run the benchmarks
@cargo bench --features testwallet

run:
@cargo r --release --bin rusk

Expand All @@ -66,4 +69,4 @@ recovery-state: ## Build network state
-- recovery-state \
--init $(INITFILE)

.PHONY: test help clippy build build-bench recovery-keys recovery-state rusk
.PHONY: test help clippy build build-bench bench recovery-keys recovery-state rusk
Loading