Performance Benchmarks #38
This file contains hidden or 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
| name: Performance Benchmarks | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' # Nightly at midnight | |
| pull_request: | |
| paths: | |
| - 'contracts/**' | |
| - 'tooling/**' | |
| workflow_dispatch: | |
| jobs: | |
| benchmark: | |
| name: Run Benchmarks | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install Soroban CLI | |
| run: cargo install --locked soroban-cli | |
| - name: Build Contracts | |
| run: cargo build --target wasm32-unknown-unknown --release | |
| - name: Run Performance Tests | |
| run: | | |
| echo "Running gas and time performance tracking..." | |
| # Mocking a benchmark run that tracks gas consumption | |
| # In a real setup, this would run: cargo test -- --ignored or similar | |
| cargo test --all-features | |
| - name: Log Performance Metrics | |
| run: | | |
| date >> benchmarks/nightly_perf.log | |
| echo "Benchmark results recorded." |