Skip to content

Commit

Permalink
fix jobs order
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-vasile committed Oct 11, 2024
1 parent 06609f7 commit 4e778be
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,24 @@ permissions:
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Install Go
uses: actions/[email protected]
with:
go-version-file: 'go.mod'
- run: go install golang.org/x/perf/cmd/benchstat@latest
# Base for comparison is master branch.
- name: Checkout code
uses: actions/[email protected]
with:
ref: master
steps:
- name: Install Go
uses: actions/[email protected]
with:
go-version-file: 'go.mod'
- run: go test -run=none -bench=. --count=7 > /tmp/prev &

- name: Checkout code
uses: actions/[email protected]
- run: go test -run=none -bench=. --count=7 > /tmp/curr &

# Wait for both benchmarks to complete before comparing.
- run: wait
- run: go install golang.org/x/perf/cmd/benchstat@latest
- run: RESULT="$(benchstat /tmp/prev /tmp/curr)"
- uses: actions/github-script@v7
with:
Expand Down

0 comments on commit 4e778be

Please sign in to comment.