ci: fix the VA runtime path, container shm and the vcpkg binary cache
Three independent failures from the last run: - Linux undefined `vaMapBuffer2`: the runner had apt libva 2.20 while vcpkg builds shared libva 2.24.1, and the loader had no path to it. Drop the apt libva packages and put `$prefix/lib` on LD_LIBRARY_PATH for the Linux and openKylin jobs. - openKylin "render manager failed to start": a container's /dev/shm is 64 MiB, but the process pool reserves >64 MiB per worker with posix_fallocate, so segment creation fails. Run the container with `--shm-size=2g`. - macOS "no decoder for codec PNG": the vcpkg ffmpeg manifest never enabled the `png` feature the oak-cli transcode tests need. Add it. - Windows dependency install took 41 minutes: it was rebuilding FFmpeg and every codec port from source because the binary archive cache was never saved. The combined `actions/cache` step with the deprecated `save-always: true` does not save after a failed job, and the previous run failed in Build. Replace it in all four jobs with an explicit restore + `actions/cache/save (if: always() && cache-hit != 'true')`.
This commit is contained in:
+68
-15
@@ -50,7 +50,6 @@ jobs:
|
|||||||
libasound2-dev libpulse-dev libsndfile1-dev \
|
libasound2-dev libpulse-dev libsndfile1-dev \
|
||||||
libgl1-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers \
|
libgl1-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers \
|
||||||
libvulkan-dev libxkbcommon-dev libxkbcommon-x11-dev xvfb libdrm-dev \
|
libvulkan-dev libxkbcommon-dev libxkbcommon-x11-dev xvfb libdrm-dev \
|
||||||
libva2 libva-drm2 libvdpau1 \
|
|
||||||
autoconf autoconf-archive automake libtool
|
autoconf autoconf-archive automake libtool
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
@@ -69,18 +68,32 @@ jobs:
|
|||||||
|
|
||||||
# The archives dir is vcpkg's binary cache: a manifest bump then
|
# The archives dir is vcpkg's binary cache: a manifest bump then
|
||||||
# rebuilds only what changed. Same key scheme as the Windows job.
|
# rebuilds only what changed. Same key scheme as the Windows job.
|
||||||
- name: Cache vcpkg artifacts
|
- name: Restore vcpkg artifacts
|
||||||
uses: actions/cache@v4
|
id: vcpkg-cache
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
vcpkg_installed
|
vcpkg_installed
|
||||||
~/.cache/vcpkg/archives
|
~/.cache/vcpkg/archives
|
||||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
||||||
save-always: true
|
|
||||||
|
|
||||||
- name: Install dependencies (vcpkg manifest)
|
- name: Install dependencies (vcpkg manifest)
|
||||||
run: vcpkg install --triplet x64-linux
|
run: vcpkg install --triplet x64-linux
|
||||||
|
|
||||||
|
# Explicit restore/save pair: the old `save-always: true` on the
|
||||||
|
# combined step does not actually save on a failed job (the action
|
||||||
|
# deprecation warning), so a run that failed after the install left
|
||||||
|
# no binary cache and the next run rebuilt FFmpeg from source
|
||||||
|
# (~40 min on Windows).
|
||||||
|
- name: Save vcpkg artifacts
|
||||||
|
if: always() && steps.vcpkg-cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
vcpkg_installed
|
||||||
|
~/.cache/vcpkg/archives
|
||||||
|
key: ${{ steps.vcpkg-cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# Build environment
|
# Build environment
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
@@ -96,6 +109,10 @@ jobs:
|
|||||||
echo "FFMPEG_DIR=$prefix" >> "$GITHUB_ENV"
|
echo "FFMPEG_DIR=$prefix" >> "$GITHUB_ENV"
|
||||||
echo "PKG_CONFIG_PATH=$prefix/lib/pkgconfig" >> "$GITHUB_ENV"
|
echo "PKG_CONFIG_PATH=$prefix/lib/pkgconfig" >> "$GITHUB_ENV"
|
||||||
echo "$prefix/tools/pkgconf" >> "$GITHUB_PATH"
|
echo "$prefix/tools/pkgconf" >> "$GITHUB_PATH"
|
||||||
|
# vcpkg's libva/libva-drm are shared libraries that FFmpeg links
|
||||||
|
# dynamically; without this path the loader picks a system libva
|
||||||
|
# that may predate symbols FFmpeg uses (undefined vaMapBuffer2).
|
||||||
|
echo "LD_LIBRARY_PATH=$prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# Caches
|
# Caches
|
||||||
@@ -254,18 +271,30 @@ jobs:
|
|||||||
"$env:GITHUB_WORKSPACE\.cache\vcpkg" >> $env:GITHUB_PATH
|
"$env:GITHUB_WORKSPACE\.cache\vcpkg" >> $env:GITHUB_PATH
|
||||||
"VCPKG_ROOT=$env:GITHUB_WORKSPACE\.cache\vcpkg" >> $env:GITHUB_ENV
|
"VCPKG_ROOT=$env:GITHUB_WORKSPACE\.cache\vcpkg" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Cache vcpkg artifacts
|
- name: Restore vcpkg artifacts
|
||||||
uses: actions/cache@v4
|
id: vcpkg-cache
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
vcpkg_installed
|
vcpkg_installed
|
||||||
~/AppData/Local/vcpkg/archives
|
~/AppData/Local/vcpkg/archives
|
||||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
||||||
save-always: true
|
|
||||||
|
|
||||||
- name: Install dependencies (vcpkg manifest)
|
- name: Install dependencies (vcpkg manifest)
|
||||||
run: vcpkg install --triplet x64-windows
|
run: vcpkg install --triplet x64-windows
|
||||||
|
|
||||||
|
# Explicit restore/save pair (see the Linux job: `save-always` did
|
||||||
|
# not save after a failed job, so Windows rebuilt FFmpeg from source
|
||||||
|
# for ~40 minutes on every run).
|
||||||
|
- name: Save vcpkg artifacts
|
||||||
|
if: always() && steps.vcpkg-cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
vcpkg_installed
|
||||||
|
~/AppData/Local/vcpkg/archives
|
||||||
|
key: ${{ steps.vcpkg-cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# Build environment
|
# Build environment
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
@@ -354,18 +383,27 @@ jobs:
|
|||||||
|
|
||||||
# The archives dir is vcpkg's binary cache: a manifest bump then
|
# The archives dir is vcpkg's binary cache: a manifest bump then
|
||||||
# rebuilds only what changed. Same key scheme as the Windows job.
|
# rebuilds only what changed. Same key scheme as the Windows job.
|
||||||
- name: Cache vcpkg artifacts
|
- name: Restore vcpkg artifacts
|
||||||
uses: actions/cache@v4
|
id: vcpkg-cache
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
vcpkg_installed
|
vcpkg_installed
|
||||||
~/.cache/vcpkg/archives
|
~/.cache/vcpkg/archives
|
||||||
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }}
|
||||||
save-always: true
|
|
||||||
|
|
||||||
- name: Install dependencies (vcpkg manifest)
|
- name: Install dependencies (vcpkg manifest)
|
||||||
run: vcpkg install --triplet arm64-osx
|
run: vcpkg install --triplet arm64-osx
|
||||||
|
|
||||||
|
- name: Save vcpkg artifacts
|
||||||
|
if: always() && steps.vcpkg-cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
vcpkg_installed
|
||||||
|
~/.cache/vcpkg/archives
|
||||||
|
key: ${{ steps.vcpkg-cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# Build environment
|
# Build environment
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
@@ -417,7 +455,12 @@ jobs:
|
|||||||
openkylin:
|
openkylin:
|
||||||
name: Build & test (openKylin ${{ matrix.arch }})
|
name: Build & test (openKylin ${{ matrix.arch }})
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
container: openkylin/openkylin:latest
|
container:
|
||||||
|
image: openkylin/openkylin:latest
|
||||||
|
# A container's default /dev/shm is 64 MiB; the process pool reserves
|
||||||
|
# >64 MiB per worker eagerly (posix_fallocate) and the render manager
|
||||||
|
# fails to start when the reservation is refused.
|
||||||
|
options: --shm-size=2g
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -464,7 +507,6 @@ jobs:
|
|||||||
libasound2-dev libpulse-dev libsndfile1-dev \
|
libasound2-dev libpulse-dev libsndfile1-dev \
|
||||||
libgl1-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers \
|
libgl1-mesa-dev libgl1-mesa-dri mesa-vulkan-drivers \
|
||||||
libvulkan-dev libxkbcommon-dev libxkbcommon-x11-dev xvfb libdrm-dev \
|
libvulkan-dev libxkbcommon-dev libxkbcommon-x11-dev xvfb libdrm-dev \
|
||||||
libva2 libva-drm2 libvdpau1 \
|
|
||||||
gdb file autoconf autoconf-archive automake libtool
|
gdb file autoconf autoconf-archive automake libtool
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
@@ -480,8 +522,9 @@ jobs:
|
|||||||
|
|
||||||
# The archives dir is vcpkg's binary cache: a manifest bump then
|
# The archives dir is vcpkg's binary cache: a manifest bump then
|
||||||
# rebuilds only what changed.
|
# rebuilds only what changed.
|
||||||
- name: Cache vcpkg artifacts
|
- name: Restore vcpkg artifacts
|
||||||
uses: actions/cache@v4
|
id: vcpkg-cache
|
||||||
|
uses: actions/cache/restore@v4
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
vcpkg_installed
|
vcpkg_installed
|
||||||
@@ -489,11 +532,19 @@ jobs:
|
|||||||
# The arch prefix matters here: both jobs run the same distro
|
# The arch prefix matters here: both jobs run the same distro
|
||||||
# image through the same cache scope, unlike the OS jobs.
|
# image through the same cache scope, unlike the OS jobs.
|
||||||
key: vcpkg-${{ runner.os }}-${{ matrix.arch }}-openkylin-${{ hashFiles('vcpkg.json') }}
|
key: vcpkg-${{ runner.os }}-${{ matrix.arch }}-openkylin-${{ hashFiles('vcpkg.json') }}
|
||||||
save-always: true
|
|
||||||
|
|
||||||
- name: Install dependencies (vcpkg manifest)
|
- name: Install dependencies (vcpkg manifest)
|
||||||
run: vcpkg install --triplet ${{ matrix.triplet }}
|
run: vcpkg install --triplet ${{ matrix.triplet }}
|
||||||
|
|
||||||
|
- name: Save vcpkg artifacts
|
||||||
|
if: always() && steps.vcpkg-cache.outputs.cache-hit != 'true'
|
||||||
|
uses: actions/cache/save@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
vcpkg_installed
|
||||||
|
~/.cache/vcpkg/archives
|
||||||
|
key: ${{ steps.vcpkg-cache.outputs.cache-primary-key }}
|
||||||
|
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
# Build environment
|
# Build environment
|
||||||
# ------------------------------------------------------------------
|
# ------------------------------------------------------------------
|
||||||
@@ -508,6 +559,8 @@ jobs:
|
|||||||
echo "FFMPEG_DIR=$prefix" >> "$GITHUB_ENV"
|
echo "FFMPEG_DIR=$prefix" >> "$GITHUB_ENV"
|
||||||
echo "PKG_CONFIG_PATH=$prefix/lib/pkgconfig" >> "$GITHUB_ENV"
|
echo "PKG_CONFIG_PATH=$prefix/lib/pkgconfig" >> "$GITHUB_ENV"
|
||||||
echo "$prefix/tools/pkgconf" >> "$GITHUB_PATH"
|
echo "$prefix/tools/pkgconf" >> "$GITHUB_PATH"
|
||||||
|
# See the Linux job: vcpkg's shared libva must win at runtime.
|
||||||
|
echo "LD_LIBRARY_PATH=$prefix/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
# Covers the whole target/ dir plus ~/.cargo.
|
# Covers the whole target/ dir plus ~/.cargo.
|
||||||
- name: Cache cargo artifacts
|
- name: Cache cargo artifacts
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"vpx",
|
"vpx",
|
||||||
"openh264",
|
"openh264",
|
||||||
"openjpeg",
|
"openjpeg",
|
||||||
|
"png",
|
||||||
"theora",
|
"theora",
|
||||||
"webp",
|
"webp",
|
||||||
"mp3lame",
|
"mp3lame",
|
||||||
|
|||||||
Reference in New Issue
Block a user