diff --git a/.github/workflows/track-benchmarks.yaml b/.github/workflows/track-benchmarks.yaml index 6a10112d04..1b088ad8a7 100644 --- a/.github/workflows/track-benchmarks.yaml +++ b/.github/workflows/track-benchmarks.yaml @@ -56,13 +56,15 @@ jobs: let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'})); core.exportVariable("PR_HEAD", `${prEvent.number}/merge`); core.exportVariable("PR_BASE", prEvent.pull_request.base.ref); - core.exportVariable("PR_DEFAULT", prEvent.pull_request.base.repo.default_branch); + core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha); core.exportVariable("PR_NUMBER", prEvent.number); - uses: bencherdev/bencher@main - name: Track Benchmarks with Bencher run: | bencher run \ - --branch-start-point main \ + --branch '${{ env.PR_HEAD }}' \ + --branch-start-point '${{ env.PR_BASE }}' \ + --branch-start-point-hash '${{ env.PR_BASE_SHA }}' \ --branch-reset \ --ci-number '${{ env.PR_NUMBER }}' \ --github-actions "${{ secrets.GITHUB_TOKEN }}" \ @@ -117,15 +119,17 @@ jobs: script: | let fs = require('fs'); let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'})); - core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref); + core.exportVariable("PR_HEAD", `${prEvent.number}/merge`); core.exportVariable("PR_BASE", prEvent.pull_request.base.ref); - core.exportVariable("PR_DEFAULT", prEvent.pull_request.base.repo.default_branch); + core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha); core.exportVariable("PR_NUMBER", prEvent.number); - uses: bencherdev/bencher@main - name: Track Benchmarks with Bencher run: | bencher run \ - --branch-start-point main \ + --branch '${{ env.PR_HEAD }}' \ + --branch-start-point '${{ env.PR_BASE }}' \ + --branch-start-point-hash '${{ env.PR_BASE_SHA }}' \ --branch-reset \ --ci-number '${{ env.PR_NUMBER }}' \ --github-actions "${{ secrets.GITHUB_TOKEN }}" \ @@ -180,15 +184,17 @@ jobs: script: | let fs = require('fs'); let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'})); - core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref); + core.exportVariable("PR_HEAD", `${prEvent.number}/merge`); core.exportVariable("PR_BASE", prEvent.pull_request.base.ref); - core.exportVariable("PR_DEFAULT", prEvent.pull_request.base.repo.default_branch); + core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha); core.exportVariable("PR_NUMBER", prEvent.number); - uses: bencherdev/bencher@main - name: Track Benchmarks with Bencher run: | bencher run \ - --branch-start-point main \ + --branch '${{ env.PR_HEAD }}' \ + --branch-start-point '${{ env.PR_BASE }}' \ + --branch-start-point-hash '${{ env.PR_BASE_SHA }}' \ --branch-reset \ --ci-number '${{ env.PR_NUMBER }}' \ --github-actions "${{ secrets.GITHUB_TOKEN }}" \ @@ -243,15 +249,17 @@ jobs: script: | let fs = require('fs'); let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'})); - core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref); + core.exportVariable("PR_HEAD", `${prEvent.number}/merge`); core.exportVariable("PR_BASE", prEvent.pull_request.base.ref); - core.exportVariable("PR_DEFAULT", prEvent.pull_request.base.repo.default_branch); + core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha); core.exportVariable("PR_NUMBER", prEvent.number); - uses: bencherdev/bencher@main - name: Track Benchmarks with Bencher run: | bencher run \ - --branch-start-point main \ + --branch '${{ env.PR_HEAD }}' \ + --branch-start-point '${{ env.PR_BASE }}' \ + --branch-start-point-hash '${{ env.PR_BASE_SHA }}' \ --branch-reset \ --ci-number '${{ env.PR_NUMBER }}' \ --github-actions "${{ secrets.GITHUB_TOKEN }}" \