GeezerVison is showing github.com — Add RAM and threads options to init action · github/codeql-action@82fa535
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/__extractor-ram-threads.yml +61Lines changed: 61 additions & 0 deletions Collapse file
Copy file name to clipboardExpand all lines: .github/workflows/pr-checks.yml +39Lines changed: 39 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -388,3 +388,42 @@ jobs: |
388 | 388 | # Deliberately don't use TEST_MODE here. This is specifically testing |
389 | 389 | # the compatibility with the API. |
390 | 390 | runner/dist/codeql-runner-linux upload --sarif-file src/testdata/empty-sarif.sarif --repository $GITHUB_REPOSITORY --commit $GITHUB_SHA --ref $GITHUB_REF --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }} |
| 391 | +
|
| 392 | + runner-extractor-ram-threads-options: |
| 393 | + name: Runner ubuntu extractor RAM and threads options |
| 394 | + needs: [check-js, check-node-modules] |
| 395 | + runs-on: ubuntu-latest |
| 396 | + |
| 397 | + steps: |
| 398 | + - uses: actions/checkout@v2 |
| 399 | + |
| 400 | + - name: Build runner |
| 401 | + run: | |
| 402 | + cd runner |
| 403 | + npm install |
| 404 | + npm run build-runner |
| 405 | +
|
| 406 | + - name: Run init |
| 407 | + run: | |
| 408 | + runner/dist/codeql-runner-linux init --ram=230 --threads=1 --repository $GITHUB_REPOSITORY --languages java --github-url $GITHUB_SERVER_URL --github-auth ${{ github.token }} |
| 409 | +
|
| 410 | + - name: Assert Results |
| 411 | + shell: bash |
| 412 | + run: | |
| 413 | + . ./codeql-runner/codeql-env.sh |
| 414 | + if [ "${CODEQL_RAM}" != "230" ]; then |
| 415 | + echo "CODEQL_RAM is '${CODEQL_RAM}' instead of 230" |
| 416 | + exit 1 |
| 417 | + fi |
| 418 | + if [ "${CODEQL_EXTRACTOR_JAVA_RAM}" != "230" ]; then |
| 419 | + echo "CODEQL_EXTRACTOR_JAVA_RAM is '${CODEQL_EXTRACTOR_JAVA_RAM}' instead of 230" |
| 420 | + exit 1 |
| 421 | + fi |
| 422 | + if [ "${CODEQL_THREADS}" != "1" ]; then |
| 423 | + echo "CODEQL_THREADS is '${CODEQL_THREADS}' instead of 1" |
| 424 | + exit 1 |
| 425 | + fi |
| 426 | + if [ "${CODEQL_EXTRACTOR_JAVA_THREADS}" != "1" ]; then |
| 427 | + echo "CODEQL_EXTRACTOR_JAVA_THREADS is '${CODEQL_EXTRACTOR_JAVA_THREADS}' instead of 1" |
| 428 | + exit 1 |
| 429 | + fi |
Collapse file
Copy file name to clipboardExpand all lines: init/action.yml +6Lines changed: 6 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -41,6 +41,12 @@ inputs: |
41 | 41 | source-root: |
42 | 42 | description: Path of the root source code directory, relative to $GITHUB_WORKSPACE. |
43 | 43 | required: false |
| 44 | + ram: |
| 45 | + description: Override the amount of memory in MB to be used by CodeQL extractors. By default, almost all the memory of the machine is used. |
| 46 | + required: false |
| 47 | + threads: |
| 48 | + description: The number of threads to be used by CodeQL extractors. |
| 49 | + required: false |
44 | 50 | outputs: |
45 | 51 | codeql-path: |
46 | 52 | description: The path of the CodeQL binary used for analysis |
|
Collapse file
Copy file name to clipboardExpand all lines: lib/init-action.js +8-3Lines changed: 8 additions & 3 deletions Collapse file
Copy file name to clipboardExpand all lines: lib/init-action.js.map +1-1Lines changed: 1 addition & 1 deletion Collapse file
Copy file name to clipboardExpand all lines: lib/runner.js +8Lines changed: 8 additions & 0 deletions