From 5b6984ee4d8d4337aa84b946951459213dd36daf Mon Sep 17 00:00:00 2001 From: Henry Mercer Date: Thu, 10 Oct 2024 19:40:37 +0100 Subject: [PATCH] Assert that Windows downloads gzip --- .github/workflows/__zstd-bundle.yml | 8 ++++++-- pr-checks/checks/zstd-bundle.yml | 7 +++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/__zstd-bundle.yml b/.github/workflows/__zstd-bundle.yml index 42402b3394..7438a6aa3d 100644 --- a/.github/workflows/__zstd-bundle.yml +++ b/.github/workflows/__zstd-bundle.yml @@ -31,6 +31,8 @@ jobs: version: linked - os: ubuntu-latest version: linked + - os: windows-latest + version: linked name: Zstandard bundle permissions: contents: read @@ -107,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: diff --git a/pr-checks/checks/zstd-bundle.yml b/pr-checks/checks/zstd-bundle.yml index ba11c308f8..a751b18bcb 100644 --- a/pr-checks/checks/zstd-bundle.yml +++ b/pr-checks/checks/zstd-bundle.yml @@ -5,6 +5,7 @@ versions: operatingSystems: - macos - ubuntu + - windows env: CODEQL_ACTION_ZSTD_BUNDLE: true steps: @@ -58,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}.` ); }