From 55388cb1b66511b04e21226bd4c9dd65e207d125 Mon Sep 17 00:00:00 2001 From: webadderall <131426131+webadderall@users.noreply.github.com> Date: Mon, 27 Apr 2026 17:09:33 +1000 Subject: [PATCH] Fix CI ffmpeg bundling for release builds --- .github/workflows/build.yml | 23 +++++++++++++++++++++-- .github/workflows/release.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d79a2b24..2060a534 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install bundled FFmpeg binary + run: node node_modules/ffmpeg-static/install.js + + - name: Verify bundled FFmpeg binary + run: | + node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);" + - name: Install app dependencies run: npx electron-builder install-app-deps @@ -56,6 +63,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install bundled FFmpeg binary + run: node node_modules/ffmpeg-static/install.js + + - name: Verify bundled FFmpeg binary + run: | + node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);" + - name: Install app dependencies run: npx electron-builder install-app-deps @@ -90,6 +104,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install bundled FFmpeg binary + run: node node_modules/ffmpeg-static/install.js + + - name: Verify bundled FFmpeg binary + run: | + node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);" + - name: Install Linux native build dependencies run: | sudo apt-get update @@ -116,5 +137,3 @@ jobs: release/**/*.AppImage release/latest-linux.yml retention-days: 30 - - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd5ec255..7cbb2c18 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -129,6 +129,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install bundled FFmpeg binary + run: node node_modules/ffmpeg-static/install.js + + - name: Verify bundled FFmpeg binary + run: | + node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);" + - name: Install app dependencies run: npx electron-builder install-app-deps @@ -209,6 +216,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install bundled FFmpeg binary + run: node node_modules/ffmpeg-static/install.js + + - name: Verify bundled FFmpeg binary + run: | + node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);" + - name: Install app dependencies run: npx electron-builder install-app-deps @@ -347,6 +361,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install bundled FFmpeg binary + run: node node_modules/ffmpeg-static/install.js + + - name: Verify bundled FFmpeg binary + run: | + node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);" + - name: Remove stale uiohook build output shell: pwsh run: | @@ -406,6 +427,13 @@ jobs: - name: Install dependencies run: npm ci --ignore-scripts + - name: Install bundled FFmpeg binary + run: node node_modules/ffmpeg-static/install.js + + - name: Verify bundled FFmpeg binary + run: | + node -e "const fs=require('node:fs'); const ffmpeg=require('ffmpeg-static'); if (typeof ffmpeg !== 'string' || !fs.existsSync(ffmpeg)) { throw new Error('Bundled ffmpeg-static binary is missing: ' + ffmpeg); } console.log('Using bundled ffmpeg binary: ' + ffmpeg);" + - name: Remove stale uiohook build output run: rm -rf node_modules/uiohook-napi/build