From eeaea4220bbc1a90011dad61293955a0d624f2ba Mon Sep 17 00:00:00 2001 From: Tarrence van As Date: Wed, 24 Jan 2024 10:08:11 -0500 Subject: [PATCH] Enable benches in ci --- .github/workflows/bench.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/bench.yml diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml new file mode 100644 index 0000000000..24578a53df --- /dev/null +++ b/.github/workflows/bench.yml @@ -0,0 +1,35 @@ +name: benchmark + +on: + push: + branches: [main] + pull_request: + +permissions: + # deployments permission to deploy GitHub pages website + deployments: write + # contents permission to update benchmark contents in gh-pages branch + contents: write + +jobs: + build: + runs-on: ubuntu-latest + container: + image: ghcr.io/dojoengine/dojo-dev:136a67a + steps: + - uses: actions/checkout@v3 + - name: Run benchmark + run: cargo +nightly bench | tee output.txt + - name: Store benchmark result + uses: benchmark-action/github-action-benchmark@v1 + with: + tool: "cargo" + output-file-path: output.txt + benchmark-data-dir-path: "." + # Access token to deploy GitHub Pages branch + github-token: ${{ secrets.GITHUB_TOKEN }} + # Push and deploy GitHub pages branch automatically + auto-push: true + alert-threshold: "130%" + comment-on-alert: true + alert-comment-cc-users: "@kariy,@glihm,@tarrencev"