Skip to content

Commit 48816a5

Browse files
committed
fix(ci): use GCC Toolset 12 on Rocky, install Alpine FFmpeg deps
Linux glibc (Rocky 8): - Install gcc-toolset-12 for C++20 support (Rocky 8 default GCC 8.x lacks -std=c++20) - Source toolset enable script before build Linux musl (Alpine 3.20): - Install all FFmpeg transitive dependencies required by pkg-config - Alpine's FFmpeg is compiled with many optional features, all need their dev packages
1 parent dc8c6cf commit 48816a5

1 file changed

Lines changed: 23 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@ jobs:
7272
# Enable EPEL and CRB (PowerTools) repositories
7373
dnf install -y epel-release
7474
dnf config-manager --set-enabled powertools || dnf config-manager --set-enabled crb || true
75-
# Install build tools (Python 3.9 for node-gyp compatibility)
76-
dnf install -y gcc-c++ make python39 git pkgconfig
75+
# Install GCC Toolset 12 for C++20 support (Rocky 8 default GCC is 8.x)
76+
dnf install -y gcc-toolset-12 make python39 git pkgconfig
7777
alternatives --set python3 /usr/bin/python3.9 || true
7878
# Install FFmpeg via RPMFusion (EPEL doesn't have ffmpeg-devel for Rocky 8)
7979
dnf install -y https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm || true
@@ -91,7 +91,10 @@ jobs:
9191
run: npm install --omit=optional
9292

9393
- name: Build
94-
run: npm run build
94+
run: |
95+
# Enable GCC Toolset 12 for C++20 support
96+
source /opt/rh/gcc-toolset-12/enable
97+
npm run build
9598
9699
- name: Test
97100
run: npm test
@@ -105,7 +108,23 @@ jobs:
105108
node: [20, 22]
106109
steps:
107110
- name: Install system dependencies
108-
run: apk add --no-cache ffmpeg-dev build-base python3 pkgconfig git nodejs npm
111+
run: |
112+
# Install build tools and Node.js
113+
apk add --no-cache build-base python3 pkgconfig git nodejs npm
114+
# Install FFmpeg and all transitive dependencies required by pkg-config
115+
# Alpine's FFmpeg is compiled with many optional features, all need their dev packages
116+
apk add --no-cache \
117+
ffmpeg-dev ffmpeg-libs \
118+
x264-dev x265-dev libvpx-dev opus-dev libvorbis-dev lame-dev \
119+
dav1d-dev aom-dev libtheora-dev libwebp-dev svt-av1-dev rav1e-dev \
120+
libjxl-dev libogg-dev \
121+
harfbuzz-dev fribidi-dev fontconfig-dev freetype-dev libass-dev \
122+
zlib-dev bzip2-dev openssl-dev libxml2-dev \
123+
soxr-dev libdrm-dev \
124+
lilv-dev libplacebo-dev vidstab-dev zeromq-dev zimg-dev \
125+
libva-dev vdpau-dev libX11-dev \
126+
librist-dev srt-dev libssh-dev libbluray-dev openmpt-dev \
127+
onevpl-dev || true
109128
110129
- name: Checkout
111130
uses: actions/checkout@v4

0 commit comments

Comments
 (0)