From a163cfe1a416150952ee51e272dc5ddb0cfe43ea Mon Sep 17 00:00:00 2001 From: Anton Baliasnikov Date: Tue, 27 Aug 2024 09:32:33 +0100 Subject: [PATCH] fix: use base repo for reference benchmarks and head_ref for tests --- .github/workflows/benchmarks.yml | 6 +++++- .github/workflows/integration-tests.yaml | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index 6170d95..6cd22b3 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -83,20 +83,24 @@ jobs: options: -m 110g steps: - name: Define branches + shell: bash -ex {0} id: define-branches run: | if [ "${{ matrix.type }}" = "candidate" ]; then echo "compiler-tester-branch=${{ inputs.compiler_tester_candidate_branch || github.head_ref }}" | tee -a "${GITHUB_OUTPUT}" echo "llvm-branch=${{ inputs.compiler_llvm_candidate_branch || '' }}" | tee -a "${GITHUB_OUTPUT}" + echo "compiler-tester-repo=${{ inputs.compiler-tester-repo || github.event.pull_request.head.repo.full_name }}" | tee -a "${GITHUB_OUTPUT}" else echo "compiler-tester-branch=${{ inputs.compiler_tester_reference_branch || github.event.repository.default_branch }}" | tee -a "${GITHUB_OUTPUT}" echo "llvm-branch=${{ inputs.compiler_llvm_reference_branch || '' }}" | tee -a "${GITHUB_OUTPUT}" + # Always use base repo for the reference testing + echo "compiler-tester-repo=${{ inputs.compiler-tester-repo || github.event.pull_request.base.repo.full_name }}" | tee -a "${GITHUB_OUTPUT}" fi - name: Checkout compiler-tester uses: actions/checkout@v4 with: - repository: ${{ inputs.compiler-tester-repo }} + repository: ${{ steps.define-branches.outputs.compiler-tester-repo }} ref: ${{ steps.define-branches.outputs.compiler-tester-branch }} submodules: recursive diff --git a/.github/workflows/integration-tests.yaml b/.github/workflows/integration-tests.yaml index 185f576..e5480b3 100644 --- a/.github/workflows/integration-tests.yaml +++ b/.github/workflows/integration-tests.yaml @@ -72,7 +72,7 @@ jobs: uses: actions/checkout@v4 with: repository: ${{ inputs.compiler-tester-repo }} - ref: ${{ inputs.compiler-tester-ref || '' }} + ref: ${{ inputs.compiler-tester-ref || github.head_ref || '' }} submodules: recursive - name: Checkout LLVM