Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/actions/install-ffmpeg-windows/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ inputs:
max-attempts:
description: Max download attempts before failing.
required: false
default: "3"
default: "8"

runs:
using: composite
Expand All @@ -44,7 +44,7 @@ runs:
} catch {
Write-Warning "Download failed: $($_.Exception.Message)"
if ($attempt -eq $maxAttempts) { throw }
Start-Sleep -Seconds (10 * $attempt)
Start-Sleep -Seconds (30 * $attempt)
}
}

Expand Down
23 changes: 23 additions & 0 deletions .github/actions/prepare-ffmpeg-bin/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Prepare FFMPEG_BIN for bun install
description: >-
Copies the system ffmpeg binary to a writable temp location and sets
FFMPEG_BIN in the environment. ffmpeg-static's postinstall script checks
whether a file already exists at FFMPEG_BIN; if it does and process.exit(0)
is respected by the runtime, the CDN download is skipped entirely. If the
runtime intercepts process.exit(0) and the download proceeds anyway, using
a writable target prevents the EACCES failure that occurs when the
destination is a system path like /usr/bin/ffmpeg.

runs:
using: composite
steps:
- name: Copy ffmpeg to writable path
shell: bash
run: |
FFMPEG=$(which ffmpeg 2>/dev/null || echo "")
if [ -z "$FFMPEG" ]; then
sudo apt-get install -y --no-install-recommends ffmpeg
FFMPEG=/usr/bin/ffmpeg
fi
cp "$FFMPEG" "$RUNNER_TEMP/hf-ffmpeg"
echo "FFMPEG_BIN=$RUNNER_TEMP/hf-ffmpeg" >> "$GITHUB_ENV"
10 changes: 10 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run build

Expand All @@ -84,6 +85,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run lint

Expand Down Expand Up @@ -117,6 +119,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- name: Run fallow audit
id: audit
Expand Down Expand Up @@ -172,6 +175,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run format:check

Expand All @@ -189,6 +193,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run build
- run: bun run --filter '*' typecheck
Expand All @@ -207,6 +212,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run test:scripts
- run: bun run --cwd packages/core build:hyperframes-runtime
Expand All @@ -226,6 +232,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run --filter @hyperframes/core test:hyperframe-runtime-ci

Expand All @@ -243,6 +250,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run --cwd packages/core build:hyperframes-runtime
- name: Start studio and check for runtime errors
Expand Down Expand Up @@ -308,6 +316,7 @@ jobs:
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
with:
node-version: 22
- uses: ./.github/actions/prepare-ffmpeg-bin
- run: bun install --frozen-lockfile
- run: bun run build

Expand Down Expand Up @@ -383,6 +392,7 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- uses: ./.github/actions/prepare-ffmpeg-bin
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build monorepo
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/windows-render.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ jobs:
- name: Install FFmpeg
uses: ./.github/actions/install-ffmpeg-windows

- name: Set FFMPEG_BIN for bun install
shell: pwsh
run: |
$path = (Get-Command ffmpeg.exe).Source
"FFMPEG_BIN=$path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

# -----------------------------------------------------------------
# Verify FFmpeg feature inventory.
#
Expand Down Expand Up @@ -394,6 +400,12 @@ jobs:
- name: Install FFmpeg
uses: ./.github/actions/install-ffmpeg-windows

- name: Set FFMPEG_BIN for bun install
shell: pwsh
run: |
$path = (Get-Command ffmpeg.exe).Source
"FFMPEG_BIN=$path" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2

Expand Down
Loading