|
2 | 2 | #
|
3 | 3 | # Results are uploaded to GitHub Code Scanning.
|
4 | 4 | #
|
5 |
| -# Note: Important: This file currently only works with "CI" builds. "Platform" builds can |
6 |
| -# be supported without much effort but that will be done in the future. |
| 5 | +# Note: Important: This file only works with "CI" builds. "Platform" builds are |
| 6 | +# supported with the codeql-platform.yml file. |
7 | 7 | #
|
8 | 8 | # Note: This workflow only supports Windows as CodeQL CLI has confirmed issues running
|
9 | 9 | # against edk2-style codebases on Linux (only tested on Ubuntu). Therefore, this
|
10 | 10 | # workflow is written only for Windows but could easily be adapted to run on Linux
|
11 |
| -# in the future if needed (e.g. swap out "windows" with agent OS var value, etc.) |
| 11 | +# in the future if needed (e.g. swap out "windows" with agent OS var value, etc.). |
| 12 | +# |
| 13 | +# For details about the Linux issue see: https://github.com/github/codeql-action/issues/1338 |
12 | 14 | #
|
13 | 15 | # NOTE: This file is automatically synchronized from Mu DevOps. Update the original file there
|
14 | 16 | # instead of the file in this repo.
|
@@ -270,7 +272,14 @@ jobs:
|
270 | 272 | import sys
|
271 | 273 | from pathlib import Path
|
272 | 274 |
|
273 |
| - # Find the plugin directory that contains the CodeQL plugin |
| 275 | + # |
| 276 | + # Find the plugin directory that contains the CodeQL plugin. |
| 277 | + # |
| 278 | + # Prior to Mu Basecore 202311, the CodeQL plugin was located in .pytool. After it |
| 279 | + # is located in BaseTools. First check BaseTools, but consider .pytool as a backup |
| 280 | + # for backward compatibility. The .pytool backup can be removed when no longer needed |
| 281 | + # for supported branches. |
| 282 | + # |
274 | 283 | plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('BaseTools/Plugin/CodeQL'))
|
275 | 284 | if not plugin_dir:
|
276 | 285 | plugin_dir = list(Path(os.environ['GITHUB_WORKSPACE']).rglob('.pytool/Plugin/CodeQL'))
|
@@ -352,7 +361,14 @@ jobs:
|
352 | 361 | import shutil
|
353 | 362 | from pathlib import Path
|
354 | 363 |
|
355 |
| - # Only these two plugins are needed for CodeQL |
| 364 | + # Only these two plugins are needed for CodeQL. |
| 365 | + # |
| 366 | + # CodeQL build time is reduced by removing other plugins that are not needed for the CodeQL |
| 367 | + # build in the .pytool directory. The CompilerPlugin is required to compile code for CodeQL |
| 368 | + # to extract results from and the CodeQL plugin is necessary to to analyze the results and |
| 369 | + # build the CodeQL database from them. The CodeQL plugin should be in BaseTools moving forward |
| 370 | + # but still might be in .pytool in older branches so it is kept here as an exception. |
| 371 | + # |
356 | 372 | plugins_to_keep = ['CodeQL', 'CompilerPlugin']
|
357 | 373 |
|
358 | 374 | plugin_dir = Path(os.environ['PYTOOL_PLUGIN_DIR']).absolute()
|
|
0 commit comments