-
Notifications
You must be signed in to change notification settings - Fork 3.4k
CodeQL: install platform specific CodeQL bundle #12443
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
Conversation
This should reduce the size of the CodeQL bundle by only including the platform specific CodeQL CLI and libraries, rather than the full set of CodeQL CLI and libraries for all platforms.
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.
Pull Request Overview
This PR updates the platform bundle download scripts to fetch only the OS-specific CodeQL CLI and libraries instead of the full multi-platform archive, reducing overall bundle size.
- Windows script now downloads and unpacks the
win64
bundle. - Ubuntu script now downloads the
linux64
bundle. - macOS script now downloads the
osx64
bundle.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
images/windows/scripts/build/Install-CodeQLBundle.ps1 | Changed download URL and archive name to codeql-bundle-win64 |
images/ubuntu/scripts/build/install-codeql-bundle.sh | Changed download URL to codeql-bundle-linux64.tar.gz |
images/macos/scripts/build/install-codeql-bundle.sh | Changed download URL to codeql-bundle-osx64.tar.gz |
@@ -31,15 +31,15 @@ $tagName = "codeql-bundle-v" + $cliVersion | |||
Write-Host "Downloading CodeQL bundle $($cliVersion)..." | |||
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run | |||
# different operating systems within containers. | |||
$codeQLBundlePath = Invoke-DownloadWithRetry "https://github.com/github/codeql-action/releases/download/$($tagName)/codeql-bundle.tar.gz" | |||
$codeQLBundlePath = Invoke-DownloadWithRetry "https://github.com/github/codeql-action/releases/download/$($tagName)/codeql-bundle-win64.tar.gz" |
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.
[nitpick] Instead of hardcoding win64
, consider parameterizing the platform and architecture suffix (e.g., via an environment variable or script parameter) to support additional architectures like arm64 in the future.
$codeQLBundlePath = Invoke-DownloadWithRetry "https://github.com/github/codeql-action/releases/download/$($tagName)/codeql-bundle-win64.tar.gz" | |
$architectureSuffix = $env:ARCHITECTURE_SUFFIX | |
if ([string]::IsNullOrEmpty($architectureSuffix)) { | |
$architectureSuffix = "win64" # Default to win64 if not specified | |
} | |
$codeQLBundlePath = Invoke-DownloadWithRetry "https://github.com/github/codeql-action/releases/download/$($tagName)/codeql-bundle-$($architectureSuffix).tar.gz" |
Copilot uses AI. Check for mistakes.
@@ -30,7 +30,7 @@ bundle_tag_name="codeql-bundle-v$bundle_version" | |||
echo "Downloading CodeQL bundle $bundle_version..." | |||
# Note that this is the all-platforms CodeQL bundle, to support scenarios where customers run | |||
# different operating systems within containers. | |||
codeql_archive=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle.tar.gz") | |||
codeql_archive=$(download_with_retry "https://github.com/github/codeql-action/releases/download/$bundle_tag_name/codeql-bundle-linux64.tar.gz") |
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.
[nitpick] The variable codeql_archive
uses snake_case, while the Windows script uses PascalCase ($codeQLBundlePath
). Consider standardizing variable names across scripts for consistency and easier maintenance.
Copilot uses AI. Check for mistakes.
This should reduce the size of the CodeQL bundle by only including the platform specific CodeQL CLI and libraries, rather than the full set of CodeQL CLI and libraries for all platforms.
Description
New tool, Bug fixing, or Improvement?
Please include a summary of the change and which issue is fixed. Also include relevant motivation and context.
For new tools, please provide total size and installation time.
Related issue:
Check list