diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 00000000000000..e9a9eeaf73c02a --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,30 @@ +name: Rust Example +on: + push: + branches: + - master + +permissions: + contents: write + deployments: write + +jobs: + benchmark: + name: Run Rust benchmark example + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Run benchmark + run: | + source ci/rust-version.sh all + cargo +$rust_nightly bench -p solana-runtime | tee output.txt + + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + name: bench-solana-runtime + tool: "cargo" + output-file-path: output.txt + github-token: ${{ secrets.GITHUB_TOKEN }} + auto-push: true diff --git a/Cargo.toml b/Cargo.toml index 67b73b5cbd114e..c595cb9197bd7b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,6 +3,9 @@ inherits = "release" debug = true split-debuginfo = "packed" +[profile.bench] +lto = true + [workspace] members = [ "account-decoder",