From 1d468384c9e3b857b2432d822f837acb71cd955e Mon Sep 17 00:00:00 2001 From: Brendan Chou <3680392+BrendanChou@users.noreply.github.com> Date: Thu, 16 May 2024 16:04:37 -0700 Subject: [PATCH] try update benchmark workflow --- .github/workflows/protocol-benchmark.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/protocol-benchmark.yml b/.github/workflows/protocol-benchmark.yml index 1f03a5dba4..8b7d193f05 100644 --- a/.github/workflows/protocol-benchmark.yml +++ b/.github/workflows/protocol-benchmark.yml @@ -2,14 +2,14 @@ name: Protocol Benchmark on: # yamllint disable-line rule:truthy pull_request: paths: - - 'protocol/**' + - 'protocol/lib/**' push: branches: - main - 'release/protocol/v[0-9]+.[0-9]+.x' # e.g. release/protocol/v0.1.x - 'release/protocol/v[0-9]+.x' # e.g. release/protocol/v1.x paths: - - 'protocol/**' + - 'protocol/lib/**' concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} @@ -29,12 +29,7 @@ jobs: with: go-version: 1.22 - name: Run Benchmarks - run: make benchmark | tee benchmark_output.txt - - name: Store benchmark result - uses: benchmark-action/github-action-benchmark@v1 - with: - tool: 'go' - output-file-path: benchmark_output.txt + run: make benchmark | tee ./benchmark_output.txt - name: Download previous benchmark data uses: actions/cache@v4 with: @@ -44,7 +39,8 @@ jobs: uses: benchmark-action/github-action-benchmark@v1 with: tool: 'go' - output-file-path: benchmark_output.txt + output-file-path: ./protocol/benchmark_output.txt external-data-json-path: ./cache/benchmark-data.json fail-on-alert: true alert-threshold: '150%' + save-data-file: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}