Skip to content

Commit

Permalink
Try to fix missing bench files
Browse files Browse the repository at this point in the history
  • Loading branch information
VojtechVitek committed Jul 24, 2024
1 parent 44f44a5 commit eb36318
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ jobs:
ref: master

- name: Run benchmark (master)
run: go test -bench=. -benchtime=100x -benchmem | tee master.txt
run: go test -bench=. -benchtime=100x -benchmem | tee /tmp/master.txt

- name: Git clone (PR)
uses: actions/checkout@v4

- name: Run benchmark (PR)
run: go test -bench=. -benchtime=100x -benchmem | tee pr.txt
run: go test -bench=. -benchtime=100x -benchmem | tee /tmp/pr.txt

- name: Install benchstat
run: go install golang.org/x/perf/cmd/benchstat@latest

- name: Run benchstat
run: benchstat master.txt pr.txt | tee result.txt
run: cd /tmp && benchstat master.txt pr.txt | tee /tmp/result.txt

- name: Comment on PR with benchmark results
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');
const results = fs.readFileSync('result.txt', 'utf8');
const results = fs.readFileSync('/tmp/result.txt', 'utf8');
const issue_number = context.payload.pull_request.number;
const { owner, repo } = context.repo;
Expand Down

0 comments on commit eb36318

Please sign in to comment.