Skip to content

Commit 38469af

Browse files
authored
Merge pull request #2537 from github/henrymercer/no-zstd-windows
Don't use Zstandard bundles on Windows
2 parents 9d1e406 + 5b6984e commit 38469af

7 files changed

+18
-12
lines changed

.github/workflows/__zstd-bundle-fallback.yml

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/__zstd-bundle.yml

+6-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql.js

+4-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/setup-codeql.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pr-checks/checks/zstd-bundle-fallback.yml

-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ versions:
44
- linked
55
operatingSystems:
66
- macos
7-
- windows
87
- ubuntu
98
env:
109
CODEQL_ACTION_ZSTD_BUNDLE: true

pr-checks/checks/zstd-bundle.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ versions:
44
- linked
55
operatingSystems:
66
- macos
7-
- windows
87
- ubuntu
8+
- windows
99
env:
1010
CODEQL_ACTION_ZSTD_BUNDLE: true
1111
steps:
@@ -59,8 +59,10 @@ steps:
5959
const toolsUrl = downloadTelemetryNotifications[0].properties.attributes.toolsUrl;
6060
console.log(`Found tools URL: ${toolsUrl}`);
6161
62-
if (!toolsUrl.endsWith('.tar.zst')) {
62+
const expectedExtension = process.env['RUNNER_OS'] === 'Windows' ? '.tar.gz' : '.tar.zst';
63+
64+
if (!toolsUrl.endsWith(expectedExtension)) {
6365
core.setFailed(
64-
`Expected the tools URL to be a .tar.zst file, but found ${toolsUrl}.`
66+
`Expected the tools URL to be a ${expectedExtension} file, but found ${toolsUrl}.`
6567
);
6668
}

src/setup-codeql.ts

+2
Original file line numberDiff line numberDiff line change
@@ -823,6 +823,8 @@ async function useZstdBundle(
823823
tarSupportsZstd: boolean,
824824
): Promise<boolean> {
825825
return (
826+
// In testing, gzip performs better than zstd on Windows.
827+
process.platform !== "win32" &&
826828
tarSupportsZstd &&
827829
semver.gte(cliVersion, CODEQL_VERSION_ZSTD_BUNDLE) &&
828830
!!(await features.getValue(Feature.ZstdBundle))

0 commit comments

Comments
 (0)