Repository navigation
ci: reduce CodeQL build time - #829
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR optimizes the CodeQL GitHub Actions workflow by reducing unnecessary build work during CodeQL’s manual build phase and preventing wasted runner time on superseded runs for the same PR.
Changes:
- Add workflow-level concurrency to cancel in-progress CodeQL runs superseded by newer commits on the same pull request.
- Replace the CodeQL manual build step from
./scripts/buildto./scripts/gradle classesto compile only production classes.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
HAYDEN-OAI
approved these changes
Jul 31, 2026
HAYDEN-OAI
left a comment
Contributor
There was a problem hiding this comment.
Approved. The production-only Gradle build retains all eight project source sets and --no-build-cache; the required CI check uses a separate concurrency group. One low-priority non-PR pending-run edge case is noted inline.
jbeckwith-oai
marked this pull request as ready for review
July 31, 2026 20:47
jbeckwith-oai
enabled auto-merge (squash)
July 31, 2026 20:47
Contributor
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Why
Recent CodeQL runs average 23m52s, with the manual build accounting for 19m45s. The full
scripts/buildpath compiles test sources, runs build-logic tests and policy checks, and creates artifacts that CodeQL does not need to analyze production Java and Kotlin.The workflow also allowed stale runs from earlier commits on the same pull request to continue consuming runner time.
Impact
classesstill compiles every production source set across all eight included Gradle projects while preserving--no-build-cache, which CodeQL requires to observe compilation. Test and packaging coverage remains in the normal CI workflow.The PR's first cold CodeQL run reduced the production build step from the 19m45s historical average to 11m25s (8m20s / 42% faster). The full job fell from 23m52s to 14m55s (8m57s / 38% faster).
Validation
./scripts/gradle classes --dry-run --no-build-cachewith JDK 21GRADLE_OPTS=-Dkotlin.compiler.execution.strategy=in-process ./scripts/gradle classes --no-build-cachewith JDK 21.github/workflows/codeql.yml