Skip to content

ci: skip ffmpeg-static CDN download on ubuntu; retry Windows FFmpeg install#1275

Open
vanceingalls wants to merge 2 commits into
mainfrom
06-08-ci_skip_ffmpeg-static_cdn_download_on_ubuntu_retry_windows_ffmpeg_install
Open

ci: skip ffmpeg-static CDN download on ubuntu; retry Windows FFmpeg install#1275
vanceingalls wants to merge 2 commits into
mainfrom
06-08-ci_skip_ffmpeg-static_cdn_download_on_ubuntu_retry_windows_ffmpeg_install

Conversation

@vanceingalls
Copy link
Copy Markdown
Collaborator

@vanceingalls vanceingalls commented Jun 8, 2026

What

Prevent CI failures caused by ffmpeg-static@5.3.0's postinstall script downloading a binary from GitHub releases CDN. When that CDN is unavailable (504/connection errors), bun install --frozen-lockfile fails across all Linux jobs and the Windows test job.

Three-part fix:

  1. Linux (ci.yml) — set FFMPEG_BIN: /usr/bin/ffmpeg at workflow level. ubuntu-24.04 runners ship with /usr/bin/ffmpeg pre-installed. ffmpeg-static's install.js checks the FFMPEG_BIN env var (documented via binary-path-env-var in its package.json metadata) and skips the download entirely when it's set.

  2. Windows retries (install-ffmpeg-windows/action.yml) — increase max-attempts from 3 → 8 and backoff from 10 × attempt seconds to 30 × attempt seconds for the BtbN/FFmpeg-Builds zip download.

  3. Windows bun install (windows-render.yml) — after installing FFmpeg via the composite action, set FFMPEG_BIN to the installed ffmpeg.exe path in $GITHUB_ENV. Applied to both the render job and test-windows job so bun install skips ffmpeg-static's download in both.

Why

All PRs in the R1 stack had CI failures traced to this error in bun install logs:

Error: Failed to download ffmpeg b6.1.1 from https://github.com/eugeneware/ffmpeg-static/releases/download/b6.1.1/linux-x64

The eugeneware/ffmpeg-static GitHub releases CDN went down around 07:50 UTC on 2026-06-07, causing every bun install --frozen-lockfile step to fail. We don't need ffmpeg-static to download anything on CI — we already install a known-good ffmpeg before bun install runs.

Test plan

  • CI passes on this PR (Linux + Windows jobs both reach bun install without the download error)

…nstall

ubuntu-24.04 runners ship /usr/bin/ffmpeg. Set FFMPEG_BIN so ffmpeg-static's
postinstall script skips its GitHub-release binary download, preventing bun
install failures when that CDN is unavailable.

For Windows: increase BtbN/FFmpeg-Builds download max-attempts 3→8 with
longer backoff (30×attempt s) and set FFMPEG_BIN after install so bun install
also skips ffmpeg-static's download in both render and test jobs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Collaborator Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

/usr/bin/ffmpeg is not writable by the runner user. When bun runs
ffmpeg-static's postinstall script in a context where process.exit(0) is
intercepted, the skip-if-exists check has no effect and the download proceeds
to the destination path. Pointing FFMPEG_BIN at a system path (/usr/bin/ffmpeg)
therefore causes EACCES even when the CDN returns 200.

Replace the top-level env var with a prepare-ffmpeg-bin composite action that
copies the system ffmpeg to $RUNNER_TEMP (writable). Call it before every
bun install step in the CI workflow. Whether the postinstall script skips or
overwrites, the write target is now writable and the job succeeds.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant