Skip to content

Commit

Permalink
Merge pull request #2139 from dusk-network/feature-1954
Browse files Browse the repository at this point in the history
Add benchmarks to CI
  • Loading branch information
HDauven authored Aug 21, 2024
2 parents 2753374 + 5b23110 commit 282c8d2
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/rusk_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,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

0 comments on commit 282c8d2

Please sign in to comment.