## Why
Installing `zstd` via Chocolatey in
`.github/workflows/rust-release-windows.yml` has been taking about a
minute on Windows release runs. This adds avoidable latency to each
release job.
Using DotSlash removes that package-manager install step and pins the
exact binary we use for compression.
## What Changed
- Added `.github/workflows/zstd`, a DotSlash wrapper that fetches
`zstd-v1.5.7-win64.zip` with pinned size and digest.
- Updated `.github/workflows/rust-release-windows.yml` to:
- install DotSlash via `facebook/install-dotslash@v2`
- replace `zstd -T0 -19 ...` with
`${GITHUB_WORKSPACE}/.github/workflows/zstd -T0 -19 ...`
- `windows-aarch64` uses the same win64 upstream zstd artifact because
upstream releases currently publish `win32` and `win64` binaries.
## Verification
- Verified the workflow now resolves the DotSlash file from
`${GITHUB_WORKSPACE}` while the job runs with `working-directory:
codex-rs`.
- Ran VS Code diagnostics on changed files:
- `.github/workflows/rust-release-windows.yml`
- `.github/workflows/zstd`
46 lines
1.3 KiB
Text
Executable file
46 lines
1.3 KiB
Text
Executable file
#!/usr/bin/env dotslash
|
|
|
|
// This DotSlash file wraps zstd for Windows runners.
|
|
// The upstream release provides win32/win64 binaries; for windows-aarch64 we
|
|
// use the win64 artifact via Windows x64 emulation.
|
|
{
|
|
"name": "zstd",
|
|
"platforms": {
|
|
"windows-x86_64": {
|
|
"size": 1747181,
|
|
"hash": "sha256",
|
|
"digest": "acb4e8111511749dc7a3ebedca9b04190e37a17afeb73f55d4425dbf0b90fad9",
|
|
"format": "zip",
|
|
"path": "zstd-v1.5.7-win64/zstd.exe",
|
|
"providers": [
|
|
{
|
|
"url": "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-v1.5.7-win64.zip"
|
|
},
|
|
{
|
|
"type": "github-release",
|
|
"repo": "facebook/zstd",
|
|
"tag": "v1.5.7",
|
|
"name": "zstd-v1.5.7-win64.zip"
|
|
}
|
|
]
|
|
},
|
|
"windows-aarch64": {
|
|
"size": 1747181,
|
|
"hash": "sha256",
|
|
"digest": "acb4e8111511749dc7a3ebedca9b04190e37a17afeb73f55d4425dbf0b90fad9",
|
|
"format": "zip",
|
|
"path": "zstd-v1.5.7-win64/zstd.exe",
|
|
"providers": [
|
|
{
|
|
"url": "https://github.com/facebook/zstd/releases/download/v1.5.7/zstd-v1.5.7-win64.zip"
|
|
},
|
|
{
|
|
"type": "github-release",
|
|
"repo": "facebook/zstd",
|
|
"tag": "v1.5.7",
|
|
"name": "zstd-v1.5.7-win64.zip"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|