Skip to content

Mbaluda/qlt action - #41

Draft
mbaluda wants to merge 10 commits into
mainfrom
mbaluda/qlt-action
Draft

Mbaluda/qlt action#41
mbaluda wants to merge 10 commits into
mainfrom
mbaluda/qlt-action

Conversation

@mbaluda

@mbaluda mbaluda commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

mbaluda added 10 commits August 28, 2026 18:42
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant