Skip to content
9 changes: 6 additions & 3 deletions .github/workflows/compile-queries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,17 @@ jobs:
path: '*/ql/src/.cache'
key: codeql-compile-pr-${{ github.sha }} # deliberately not using the `compile-compile-main` keys here.
restore-keys: |
codeql-compile-main-${{ env.merge-base }}
codeql-compile-main-
codeql-compile-refs/heads/${{ github.base_ref }}-${{ env.merge-base }}
codeql-compile-refs/heads/${{ github.base_ref }}-
Comment thread
aibaars marked this conversation as resolved.
Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps fall back to main too, just in case. It won't matter much in practice as most PR will target main anyway.

Suggested change
codeql-compile-refs/heads/${{ github.base_ref }}-
codeql-compile-refs/heads/${{ github.base_ref }}-
codeql-compile-refs/heads/main-

- name: Fill CodeQL query compilation cache - main
if: ${{ github.event_name != 'pull_request' }}
uses: actions/cache@v3
with:
path: '*/ql/src/.cache'
key: codeql-compile-main-${{ github.sha }} # just fill on main
key: codeql-compile-${{ github.ref }}-${{ github.sha }} # just fill on main
restore-keys: | # restore from another random commit, to speed up compilation.
codeql-compile-${{ github.ref }}-
Comment thread
aibaars marked this conversation as resolved.
Outdated
codeql-compile-refs/heads/main-
- name: Setup CodeQL
uses: ./.github/actions/fetch-codeql
with:
Expand Down