Skip to content

Commit

Permalink
fix: use base repo for reference benchmarks and head_ref for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
antonbaliasnikov committed Aug 27, 2024
1 parent 0d399ef commit a163cfe
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a163cfe

Please sign in to comment.