From d5dc1e80259b88ac05ae20f3f8df7e0c6b1bf3d7 Mon Sep 17 00:00:00 2001 From: LaserEyess Date: Sun, 25 Feb 2024 11:37:03 -0500 Subject: [PATCH] ci: add explicit build test for ffmpeg 4.4 This uses an alpine 3.15 container, which should be one of the oldest distros that mpv master can compile on and that uses ffmpeg 4.4. Some functionality is missing due to library versions being too old on alpine, e.g. wayland, mujs, and pipewire. The alpine build is also explicitly minimal, to test builds in conditions where many common mpv features may not be available. --- .github/workflows/build.yml | 52 +++++++++++++++++++++++++++++++++++++ ci/build-linux-old.sh | 17 ++++++++++++ 2 files changed, 69 insertions(+) create mode 100755 ci/build-linux-old.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 595c91f28d..58781439df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -205,6 +205,58 @@ jobs: run: | cat ./build/meson-logs/testlog.txt + linux-ffmpeg-4-4: + runs-on: ubuntu-22.04 + container: + # We want to test ffmpeg 4.4 which alpine 3.15 has exactly. + # Furthermore, this is a very minimal build of mpv without commonly + # used features to test build compatibility. Musl is a nice bonus as well + image: alpine:3.15 + steps: + - uses: actions/checkout@v4 + - name: Install dependencies + run: | + apk update + apk add \ + binutils \ + ffmpeg-dev \ + gcc \ + git \ + g++ \ + libass-dev \ + lua5.2-dev \ + pulseaudio-dev \ + libx11-dev \ + libxfixes-dev \ + libxkbcommon-dev \ + libxrandr-dev \ + libxpresent-dev \ + libxscrnsaver-dev \ + musl-dev \ + py3-pip \ + samurai + pip install meson + + - name: Build with meson + id: build + run: | + ./ci/build-linux-old.sh + + - name: Print meson log + if: ${{ failure() && steps.build.outcome == 'failure' }} + run: | + cat ./build/meson-logs/meson-log.txt + + - name: Run meson tests + id: tests + run: | + meson test -C build + + - name: Print meson test log + if: ${{ failure() && steps.tests.outcome == 'failure' }} + run: | + cat ./build/meson-logs/testlog.txt + openbsd: runs-on: ubuntu-latest # until https://github.com/actions/runner/issues/385 timeout-minutes: 30 # avoid any weirdness with the VM diff --git a/ci/build-linux-old.sh b/ci/build-linux-old.sh new file mode 100755 index 0000000000..c9dffe19ce --- /dev/null +++ b/ci/build-linux-old.sh @@ -0,0 +1,17 @@ +#!/bin/sh +set -e + +# clone exactly the oldest libplacebo we want to support +rm -rf subprojects +mkdir -p subprojects +git clone https://code.videolan.org/videolan/libplacebo.git \ + --depth 1 --branch v6.338 --recurse-submodules subprojects/libplacebo + +meson setup build \ + -Dlibplacebo:vulkan=disabled \ + -Dlibmpv=true \ + -Dlua=enabled \ + -Dtests=true + +meson compile -C build +./build/mpv -v --no-config