Skip to content

Commit

Permalink
Merge pull request #2537 from github/henrymercer/no-zstd-windows
Browse files Browse the repository at this point in the history
Don't use Zstandard bundles on Windows
  • Loading branch information
henrymercer authored Oct 10, 2024
2 parents 9d1e406 + 5b6984e commit 38469af
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 12 deletions.
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
- 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

0 comments on commit 38469af

Please sign in to comment.