Skip to content

Commit 6261644

Browse files
committed
build: remove FFmpeg prebuild workflows, use npm packages
Remove internal FFmpeg build infrastructure and consume FFmpeg development packages from pproenca/webcodecs-ffmpeg via npm. Removed: - .github/workflows/build-ffmpeg.yml (449 lines) - docker/Dockerfile.linux-x64 and docker/Dockerfile.linux-x64-glibc - scripts/ci/build-ffmpeg-workflow.ts (916 lines) Changed: - CI now installs @pproenca/webcodecs-ffmpeg-dev-* from npm - Removed resolve-deps job (no longer needed) - Added install-ffmpeg command to ci-workflow.ts This simplifies the repository by delegating FFmpeg builds to a dedicated repository, following the sharp-libvips pattern.
1 parent 80a1049 commit 6261644

14 files changed

Lines changed: 467 additions & 2312 deletions

File tree

.github/workflows/build-ffmpeg.yml

Lines changed: 0 additions & 448 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 11 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,10 @@ on:
1515

1616
permissions: {}
1717

18-
# DEPS_VERSION is resolved dynamically in the resolve-deps job
19-
# No hardcoded version here - always uses latest deps-* release
18+
# FFmpeg dependencies are installed from npm packages (@pproenca/webcodecs-ffmpeg-*)
19+
# from the pproenca/webcodecs-ffmpeg repository
2020

2121
jobs:
22-
# ============================================================================
23-
# Resolve latest FFmpeg dependencies release
24-
# This eliminates the need to manually bump DEPS_VERSION
25-
# ============================================================================
26-
resolve-deps:
27-
name: "Resolve Dependencies"
28-
runs-on: ubuntu-24.04
29-
permissions:
30-
contents: read
31-
outputs:
32-
deps_version: ${{ steps.deps.outputs.version }}
33-
steps:
34-
- uses: actions/checkout@v6
35-
- uses: actions/setup-node@v6
36-
with:
37-
node-version: "22"
38-
- run: npm install --ignore-scripts
39-
- name: Find latest deps release
40-
id: deps
41-
env:
42-
GH_TOKEN: ${{ github.token }}
43-
run: npx tsx scripts/ci/ci-workflow.ts resolve-deps --repo "${{ github.repository }}"
4422

4523

4624
# ============================================================================
@@ -66,7 +44,7 @@ jobs:
6644
test-native:
6745
permissions:
6846
contents: read
69-
needs: [lint, resolve-deps]
47+
needs: [lint]
7048
runs-on: ubuntu-24.04
7149
steps:
7250
- uses: actions/checkout@v6
@@ -88,17 +66,8 @@ jobs:
8866
pkg-config \
8967
lcov
9068
91-
- name: Download FFmpeg from Release
92-
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # v1.1.2
93-
with:
94-
repo: ${{ github.repository }}
95-
version: tags/deps-${{ needs.resolve-deps.outputs.deps_version }}
96-
file: ffmpeg-linux-x64-glibc.tar.gz
97-
target: ffmpeg-linux-x64.tar.gz
98-
token: ${{ secrets.GITHUB_TOKEN }}
99-
100-
- name: Extract FFmpeg and Set Environment
101-
run: npx tsx scripts/ci/ci-workflow.ts extract-ffmpeg --archive "ffmpeg-linux-x64.tar.gz" --out ffmpeg-install
69+
- name: Install FFmpeg development package
70+
run: npx tsx scripts/ci/ci-workflow.ts install-ffmpeg --platform linux-x64-glibc --variant non-free
10271

10372
- name: Build and test with sanitizers
10473
run: |
@@ -151,7 +120,7 @@ jobs:
151120
contents: read
152121
id-token: write # For OIDC attestation
153122
attestations: write # For build provenance
154-
needs: [lint, resolve-deps]
123+
needs: [lint]
155124
name: "build-${{ matrix.platform }}"
156125
runs-on: ${{ matrix.os }}
157126
container: ${{ matrix.container }}
@@ -198,21 +167,8 @@ jobs:
198167
if: runner.os == 'Linux'
199168
run: npx tsx scripts/ci/ci-workflow.ts install-build-tools --os linux
200169

201-
- name: Download FFmpeg from Release
202-
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # v1.1.2
203-
with:
204-
repo: ${{ github.repository }}
205-
version: tags/deps-${{ needs.resolve-deps.outputs.deps_version }}
206-
# Map platform to FFmpeg asset name:
207-
# - linux-x64-musl → ffmpeg-linux-x64.tar.gz (musl build)
208-
# - linux-x64-glibc → ffmpeg-linux-x64-glibc.tar.gz
209-
# - darwin-* → ffmpeg-darwin-*.tar.gz
210-
file: ffmpeg-${{ matrix.platform == 'linux-x64-musl' && 'linux-x64' || matrix.platform }}.tar.gz
211-
target: ffmpeg-${{ matrix.platform }}.tar.gz
212-
token: ${{ secrets.GITHUB_TOKEN }}
213-
214-
- name: Extract FFmpeg and Set Environment
215-
run: npx tsx scripts/ci/ci-workflow.ts extract-ffmpeg --archive "ffmpeg-${{ matrix.platform }}.tar.gz" --out ffmpeg-install
170+
- name: Install FFmpeg development package
171+
run: npx tsx scripts/ci/ci-workflow.ts install-ffmpeg --platform "${{ matrix.platform }}" --variant non-free
216172

217173
- name: Build with prebuildify
218174
run: npx tsx scripts/ci/ci-workflow.ts prebuildify --arch "${{ matrix.arch }}" --platform "${{ matrix.platform }}"${{ matrix.libc && format(' --libc {0}', matrix.libc) || '' }}
@@ -258,9 +214,9 @@ jobs:
258214
fail-fast: false
259215
matrix:
260216
include:
261-
# Linux - Node 20/24 (Node 22 already tested in build-native)
262-
- { os: ubuntu-24.04, platform: linux-x64, node: "20" }
263-
- { os: ubuntu-24.04, platform: linux-x64, node: "24" }
217+
# Linux glibc - Node 20/24 (Node 22 already tested in build-native)
218+
- { os: ubuntu-24.04, platform: linux-x64-glibc, node: "20" }
219+
- { os: ubuntu-24.04, platform: linux-x64-glibc, node: "24" }
264220
# macOS Intel - Node 20/24
265221
- { os: macos-15-intel, platform: darwin-x64, node: "20" }
266222
- { os: macos-15-intel, platform: darwin-x64, node: "24" }

AGENTS.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
<!-- OPENSPEC:START -->
2+
23
# OpenSpec Instructions
34

45
These instructions are for AI assistants working in this project.
56

67
Always open `@/openspec/AGENTS.md` when the request:
8+
79
- Mentions planning or proposals (words like proposal, spec, change, plan)
810
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
911
- Sounds ambiguous and you need the authoritative spec before coding
1012

1113
Use `@/openspec/AGENTS.md` to learn:
14+
1215
- How to create and apply change proposals
1316
- Spec format and conventions
1417
- Project structure and guidelines
1518

1619
Keep this managed block so 'openspec update' can refresh the instructions.
1720

18-
<!-- OPENSPEC:END -->
21+
<!-- OPENSPEC:END -->

CLAUDE.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
<!-- OPENSPEC:START -->
2+
23
# OpenSpec Instructions
34

45
These instructions are for AI assistants working in this project.
56

67
Always open `@/openspec/AGENTS.md` when the request:
8+
79
- Mentions planning or proposals (words like proposal, spec, change, plan)
810
- Introduces new capabilities, breaking changes, architecture shifts, or big performance/security work
911
- Sounds ambiguous and you need the authoritative spec before coding
1012

1113
Use `@/openspec/AGENTS.md` to learn:
14+
1215
- How to create and apply change proposals
1316
- Spec format and conventions
1417
- Project structure and guidelines
@@ -209,5 +212,5 @@ Test GitHub Actions locally:
209212

210213
```bash
211214
act -l # List jobs
212-
act push -j build-linux-x64 --container-architecture linux/amd64 -W .github/workflows/build-ffmpeg.yml
215+
act push -j build-native --container-architecture linux/amd64 -W .github/workflows/ci.yml
213216
```

0 commit comments

Comments
 (0)