Skip to content

Commit

Permalink
restructuring benchmarks workflow, triggered only with merge on maste…
Browse files Browse the repository at this point in the history
…r branch
  • Loading branch information
sw360cab committed Oct 3, 2024
1 parent 466c595 commit 0b8f66e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 48 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/benchmark-check.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,18 +1,11 @@
name: benchmarks
name: run benchmarks when pushing on main branch

on:
workflow_call:
inputs:
publish:
required: true
type: boolean
test-flags:
required: true
type: string
runner-additional-tag:
type: string
default: benchmarks
external-data-json-path:
type: string
push:
branches:
- master

# publish: true

permissions:
# deployments permission to deploy GitHub pages website
Expand All @@ -26,7 +19,7 @@ env:
jobs:
benchmarks:
if: ${{ github.repository == 'gnolang/gno' }}
runs-on: [self-hosted, Linux, X64, "${{ inputs.runner-additional-tag }}"]
runs-on: [self-hosted, Linux, X64, benchmarks]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -40,7 +33,7 @@ jobs:
- name: Run benchmark
run: |
go test -benchmem -bench=. ./... -run=^$ \
-cpu 1,2 ${{ inputs.test-flags }} | tee benchmarks.txt
-cpu 1,2 -timeout 50m | tee benchmarks.txt
- name: Download previous benchmark data
uses: actions/cache@v4
Expand All @@ -56,17 +49,18 @@ jobs:
tool: 'go'
output-file-path: benchmarks.txt
# Where the previous data file is stored
external-data-json-path: ${{ inputs.external-data-json-path }}
external-data-json-path: ./cache/benchmark-data.json
max-items-in-chart: 100
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '20%'
alert-threshold: '100%'
fail-on-alert: true
comment-on-alert: true
alert-comment-cc-users: '@ajnavarro,@thehowl,@zivkovicmilos'
# Enable Job Summary for PRs
summary-always: true
github-token: ${{ secrets.GITHUB_TOKEN }}
# NOTE you need to use a separate GITHUB PAT token that has a write access to the specified repository.
# gh-repository: 'github.com/gnolang/benchmarks' # on gh-pages branch
gh-pages-branch: gh-benchmarks
benchmark-data-dir-path: .
auto-push: ${{ inputs.publish }}
alert-comment-cc-users: '@ajnavarro,@thehowl,@zivkovicmilos'
auto-push: true
15 changes: 0 additions & 15 deletions .github/workflows/benchmark-publish.yml

This file was deleted.

0 comments on commit 0b8f66e

Please sign in to comment.