Skip to content
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

Don't use Zstandard bundles on Windows #2537

Merged
merged 2 commits into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/__zstd-bundle-fallback.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions .github/workflows/__zstd-bundle.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion lib/setup-codeql.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/setup-codeql.js.map

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion pr-checks/checks/zstd-bundle-fallback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ versions:
- linked
operatingSystems:
- macos
- windows
- ubuntu
env:
CODEQL_ACTION_ZSTD_BUNDLE: true
Expand Down
8 changes: 5 additions & 3 deletions pr-checks/checks/zstd-bundle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ versions:
- linked
operatingSystems:
- macos
- windows
henrymercer marked this conversation as resolved.
Show resolved Hide resolved
- ubuntu
- windows
env:
CODEQL_ACTION_ZSTD_BUNDLE: true
steps:
Expand Down Expand Up @@ -59,8 +59,10 @@ steps:
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
console.log(`Found tools URL: ${toolsUrl}`);

if (!toolsUrl.endsWith('.tar.zst')) {
const expectedExtension = process.env['RUNNER_OS'] === 'Windows' ? '.tar.gz' : '.tar.zst';

if (!toolsUrl.endsWith(expectedExtension)) {
core.setFailed(
`Expected the tools URL to be a .tar.zst file, but found ${toolsUrl}.`
`Expected the tools URL to be a ${expectedExtension} file, but found ${toolsUrl}.`
);
}
2 changes: 2 additions & 0 deletions src/setup-codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,8 @@ async function useZstdBundle(
tarSupportsZstd: boolean,
): Promise<boolean> {
return (
// In testing, gzip performs better than zstd on Windows.
process.platform !== "win32" &&
tarSupportsZstd &&
semver.gte(cliVersion, CODEQL_VERSION_ZSTD_BUNDLE) &&
!!(await features.getValue(Feature.ZstdBundle))
Expand Down
Loading