Merge pull request #2537 from github/henrymercer/no-zstd-windows
Don't use Zstandard bundles on Windows
This commit is contained in:
commit
38469af228
7 changed files with 18 additions and 12 deletions
2
.github/workflows/__zstd-bundle-fallback.yml
generated
vendored
2
.github/workflows/__zstd-bundle-fallback.yml
generated
vendored
|
|
@ -29,8 +29,6 @@ jobs:
|
|||
include:
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: windows-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
name: Zstandard bundle fallback
|
||||
|
|
|
|||
10
.github/workflows/__zstd-bundle.yml
generated
vendored
10
.github/workflows/__zstd-bundle.yml
generated
vendored
|
|
@ -29,10 +29,10 @@ jobs:
|
|||
include:
|
||||
- os: macos-latest
|
||||
version: linked
|
||||
- os: windows-latest
|
||||
version: linked
|
||||
- os: ubuntu-latest
|
||||
version: linked
|
||||
- os: windows-latest
|
||||
version: linked
|
||||
name: Zstandard bundle
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -109,9 +109,11 @@ jobs:
|
|||
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}.`
|
||||
);
|
||||
}
|
||||
env:
|
||||
|
|
|
|||
5
lib/setup-codeql.js
generated
5
lib/setup-codeql.js
generated
|
|
@ -553,7 +553,10 @@ function sanitizeUrlForStatusReport(url) {
|
|||
: "sanitized-value";
|
||||
}
|
||||
async function useZstdBundle(cliVersion, features, tarSupportsZstd) {
|
||||
return (tarSupportsZstd &&
|
||||
return (
|
||||
// In testing, gzip performs better than zstd on Windows.
|
||||
process.platform !== "win32" &&
|
||||
tarSupportsZstd &&
|
||||
semver.gte(cliVersion, feature_flags_1.CODEQL_VERSION_ZSTD_BUNDLE) &&
|
||||
!!(await features.getValue(feature_flags_1.Feature.ZstdBundle)));
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -4,7 +4,6 @@ versions:
|
|||
- linked
|
||||
operatingSystems:
|
||||
- macos
|
||||
- windows
|
||||
- ubuntu
|
||||
env:
|
||||
CODEQL_ACTION_ZSTD_BUNDLE: true
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ versions:
|
|||
- linked
|
||||
operatingSystems:
|
||||
- macos
|
||||
- windows
|
||||
- ubuntu
|
||||
- windows
|
||||
env:
|
||||
CODEQL_ACTION_ZSTD_BUNDLE: true
|
||||
steps:
|
||||
|
|
@ -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}.`
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue