mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-05 05:37:09 +00:00
* ci: install a pinned static ffmpeg on linux instead of apt * ci: run the jobs that use a shared action when that action changes * ci: drop the ffmpeg cache so the install is bounded by the download alone * ci: cap ffmpeg download retries so a Retry-After header cannot stretch the install
38 lines
1.4 KiB
YAML
38 lines
1.4 KiB
YAML
name: Install ffmpeg (Linux)
|
|
description: >-
|
|
Put a pinned static ffmpeg and ffprobe from BtbN/FFmpeg-Builds on PATH. No
|
|
apt: its mirror has taken up to 10 minutes.
|
|
|
|
inputs:
|
|
release-url:
|
|
description: >-
|
|
BtbN/FFmpeg-Builds linux64 tarball. Bump the tag, filename and sha256
|
|
together.
|
|
required: false
|
|
default: https://github.com/BtbN/FFmpeg-Builds/releases/download/autobuild-2026-04-30-13-44/ffmpeg-n7.1.3-46-g957b06a788-linux64-gpl-7.1.tar.xz
|
|
sha256:
|
|
description: sha256 of the tarball, from the release's checksums.sha256.
|
|
required: false
|
|
default: 15a62cc3facdacfa5ce1fbe80f898fc77f159bdd5f3ed6b60dd2c970d52b3f19
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Install ffmpeg
|
|
shell: bash
|
|
env:
|
|
URL: ${{ inputs.release-url }}
|
|
SHA256: ${{ inputs.sha256 }}
|
|
run: |
|
|
set -euo pipefail
|
|
archive="$RUNNER_TEMP/${URL##*/}"
|
|
# Two attempts of at most 20 s keep the install under a minute.
|
|
curl -fsSL --retry 1 --retry-all-errors --retry-max-time 25 --connect-timeout 10 --max-time 20 \
|
|
--speed-limit 5000000 --speed-time 10 -o "$archive" "$URL"
|
|
sha256sum -c --quiet <<<"$SHA256 $archive"
|
|
bin="$RUNNER_TEMP/ffmpeg-bin"
|
|
mkdir -p "$bin"
|
|
tar -xJf "$archive" -C "$bin" --strip-components=2 --wildcards '*/bin/ffmpeg' '*/bin/ffprobe'
|
|
echo "$bin" >> "$GITHUB_PATH"
|
|
"$bin/ffmpeg" -version | head -1
|