Mbaluda/qlt action - #41
Draft
mbaluda wants to merge 10 commits into
Draft
Conversation
…stall Adds optional `language`/`codeql-cli-version`/`codeql-standard-library-version`/ `codeql-bundle-version`/`base`/`cache-dir` inputs and `cache-dir`/`cache-primary-key`/ `codeql-bin` outputs. All new steps are gated on `language != ''`, so existing callers that only install QLT itself (passing just `qlt-version`/`add-to-path`) are unaffected.
Companion actions to the extended install-qlt: save-qlt-cache persists its cache-dir/cache-primary-key outputs, bundle-codeql-packs wraps `codeql pack bundle` for a data-driven list of packs, and run-qlt-unit-tests wraps `qlt test run execute-unit-tests`/`validate-unit-tests` for a single language.
…precompile) Lets callers opt into `codeql query compile --common-caches=<cache-dir>\n--compilation-cache-size=<N> [--precompile] <language>` right after install,\ninstead of hand-rolling that step in every workflow. Gated on both `language`\nand `compilation-cache-size` being set, so existing callers are unaffected.
QLT's plain `qlt codeql run install` (no --custom-bundle/--quick-bundle) already\ndownloads the CLI and checks out the standard library at the configured version -\nexactly what workflows testing the standard library directly (rather than this\nrepo's query packs) need. Add a `custom-bundle` input (default 'true', preserving\ncurrent behavior) to opt out of building/installing a custom bundle. Plain installs\naren't affected by --cache-dir (only custom-bundle downloads/compilation are), so\ncache ~/.qlt instead in that case. Also prefer the QLT_CODEQL_PATH env var QLT\nitself exports via GITHUB_ENV (--automation-type actions) over the previous\nfind-based binary lookup, since it works for both install modes.
…aints
QLT installs CodeQL to `~/.qlt/repo/{packages,custom-bundle}/<ident>` (confirmed via\nInstallationRepository/CodeQLInstallation) for every install mode, but the previous\ncache step only restored/saved `cache-dir`, which the source shows is a *separate*\ncache used only by custom-bundle builds (the codeql-bundle tool's own --cache-dir).\nThat meant the downloaded bundle tarball / CLI binaries were re-downloaded on every\nrun even on a cache hit. Add a step to compute the actual path list (~/.qlt always,\nplus cache-dir when custom-bundle is true) and restore/save that instead.\n\nAlso documented that QLT has no way to point at a different config file - it always\nreads qlt.conf.json from --base, and `qlt codeql set version` overwrites the whole\nfile (drops CodeQLPackConfiguration/CacheDir), which is why callers that need custom\npacks/cache-dir must keep passing --packs/--cache-dir explicitly on the install\ncommand rather than relying on the persisted file after set version runs.
…s a new install-cache-paths output The multi-line ~/.qlt + cache-dir list I put in `cache-dir`'s output broke every caller that uses it as a single --common-caches/--cache-dir CLI argument (bundle-codeql-packs, and the coding-standards repo's own --common-caches= in codeql-args). Restore `cache-dir` to a single directory again, and expose the multi-line actions/cache path list under a new `install-cache-paths` output instead, for save-qlt-cache callers to use.
…ring callers to pass it Adds a `verbosity` input (default 'progress++') so callers get per-test progress logging\nout of the box, matching install-qlt's own precompile step. Callers no longer need to\nremember to append --verbosity to codeql-args themselves.
…n bash Replace the GH expression format() trick with straightforward bash string\nconcatenation and conditional flag inclusion - easier to read and reason about.
…mand substitution The previous $([ -n "$CODEQL_ARGS" ] && echo --codeql-args "$CODEQL_ARGS") form word-split the whole codeql-args blob on spaces before qlt ever saw it, instead of passing it as a single --codeql-args value. An array preserves it as one argument.
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.
No description provided.