Repository navigation
Use per-language CodeQL bundles by default #4244
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,54 @@ | ||
| name: Per-language bundles | ||
| description: Validates extraction and analysis using each per-language CodeQL bundle. | ||
| # TODO: Use a released bundle once releases include per-language bundles. | ||
| matrix: | ||
| include: | ||
| - language: actions | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| # Actions also needs the JavaScript extractor. | ||
| expected-extractors: actions javascript | ||
| - language: cpp | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| build-mode: manual | ||
| build-command: gcc -o main main.c | ||
| - language: csharp | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| build-mode: none | ||
| - language: go | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| build-mode: autobuild | ||
| - language: java | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| build-mode: none | ||
| - language: javascript | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| - language: python | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| - language: ruby | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| - language: rust | ||
| os: ubuntu-latest | ||
| version: nightly-latest | ||
| version: linked | ||
| - language: swift | ||
| os: macos-latest-xlarge | ||
| version: nightly-latest | ||
| version: linked | ||
| build-mode: autobuild | ||
| env: | ||
| CODEQL_ACTION_PER_LANGUAGE_BUNDLES: true | ||
| steps: | ||
| - name: Remove CodeQL from toolcache | ||
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | ||
| with: | ||
| script: | | ||
| const fs = require('fs'); | ||
| const path = require('path'); | ||
| const codeqlPath = path.join(process.env['RUNNER_TOOL_CACHE'], 'CodeQL'); | ||
| fs.rmdirSync(codeqlPath, { recursive: true }); | ||
|
Comment on lines
+44
to
+51
Member
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. Minor: Consider whether it would make sense to move this out into a |
||
| - uses: ./../action/init | ||
| id: init | ||
| with: | ||
|
|
@@ -84,9 +89,8 @@ steps: | |
| CODEQL_PATH: ${{ steps.init.outputs.codeql-path }} | ||
| run: | | ||
| # A bundle that is missing most of its extractors must never be left in the toolcache, | ||
| # where a later job analyzing a different language could pick it up. The runner image | ||
| # ships with its own CodeQL in the toolcache, so check where this bundle was extracted to | ||
| # rather than whether the toolcache contains CodeQL at all. | ||
| # where a later job analyzing a different language could pick it up. Per-language bundles | ||
| # must instead be extracted under the runner's temporary directory. | ||
| echo "CodeQL is at $CODEQL_PATH" | ||
| if [[ "$CODEQL_PATH" == "$RUNNER_TOOL_CACHE"/* ]]; then | ||
| echo "::error::The per-language bundle was added to the toolcache at $CODEQL_PATH." | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: