-
Notifications
You must be signed in to change notification settings - Fork 2k
CI: compile-queries: use cache when running on main, and support more base-branches #11180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
484dc4a
restore from another cache when running on main. Otherwise that workf…
erik-krogh aede9c3
support general base-branches, not just main
erik-krogh b3b13bd
use base_ref to calculate the cache-keys when running in a PR.
erik-krogh f0b09ee
fallback to main
erik-krogh 53917e5
add refs/heads/ to make the ref fully-formed
erik-krogh 1b96538
do a quicker merge-base calculation
erik-krogh 7e52277
simplify the cache keys
erik-krogh 8d51aaa
add another fallback to main
erik-krogh 57ad491
adjust the triggers, run on all PRs, and more branches
erik-krogh 5ba694e
remember to run on PRs
erik-krogh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -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 }}- | ||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Perhaps fall back to
Suggested change
|
||||||||
| - 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 }}- | ||||||||
|
aibaars marked this conversation as resolved.
Outdated
|
||||||||
| codeql-compile-refs/heads/main- | ||||||||
| - name: Setup CodeQL | ||||||||
| uses: ./.github/actions/fetch-codeql | ||||||||
| with: | ||||||||
|
|
||||||||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.