Skip to content

Commit

Permalink
update distro.yml
Browse files Browse the repository at this point in the history
switch to c++17
bestsource bump
install tree on the last step
debian unstable and fedora rawhide have ffms2 5.0 now
  • Loading branch information
0tkl committed Jun 2, 2024
1 parent 468bba7 commit e574a58
Showing 1 changed file with 85 additions and 54 deletions.
139 changes: 85 additions & 54 deletions .github/workflows/distro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,26 @@ jobs:
- "ubuntu:noble"
- "fedora:latest"
- "fedora:rawhide"
- "opensuse/leap:latest"
- "opensuse/leap:15.5"
- "opensuse/leap:15.6"
- "opensuse/tumbleweed:latest"
buildtype: [release, debug]
buildtype: [release, debug, debugoptimized]
include:
- cpp-std: "c++14"
- cpp-std: "c++17"
- avisynthplus: false
- lua52compat: false
# I assumed that the above distros do not often freeze specific packages at
# older versions, and packages in younger distributions will never older than
# those in older distributions. So we can get rid of setting version switches
# for each necessary packages. I use an abstract "age" instead.
# ffms2 ≥ 5.0 requires age ≤ 1; age ≥ 2 infers ffms2 < 5.0
# ffmpeg ≥ 6.1 requires age ≤ 2; age ≥ 3 infers ffmpeg < 6.1
# meson ≥ 1.0 requires age ≤ 3; age ≥ 4 infers meson < 1.0
# wxWidgets ≥ 3.1 requires age ≤ 4; age ≥ 5 infers wxWidgets < 3.1
# xxHash ≥ 0.8 requires age ≤ 5; age ≥ 6 infers xxHash < 0.8
- age: 2
# ffms2 ≥ 5.0 requires age ≤ 0; age ≥ 1 infers ffms2 < 5.0
# libass ≥ 0.17.2 requires age ≤ 1; age ≥ 2 infers libass < 0.17.2
# ffmpeg ≥ 6.1 requires age ≤ 2; age ≥ 3 infers ffmpeg < 6.1
# meson ≥ 1.0 requires age ≤ 3; age ≥ 4 infers meson < 1.0
# wxWidgets ≥ 3.1 requires age ≤ 4; age ≥ 5 infers wxWidgets < 3.1
# xxHash ≥ 0.8 requires age ≤ 5; age ≥ 6 infers xxHash < 0.8
- name: Archlinux
- group: arch
name: Archlinux
container: archlinux:base-devel
avisynthplus: true
- group: deb
Expand All @@ -73,6 +77,7 @@ jobs:
- group: deb
name: Debian Unstable
container: debian:unstable-slim
age: 1
- group: deb
name: Ubuntu 20.04
container: ubuntu:focal
Expand All @@ -93,6 +98,7 @@ jobs:
name: Fedora Rawhide
container: fedora:rawhide
lua52compat: true
age: 1
- group: suse
name: openSUSE Leap 15.5
container: opensuse/leap:15.5
Expand Down Expand Up @@ -126,7 +132,7 @@ jobs:
if: contains(matrix.container, 'archlinux')
run: pacman --noconfirm -Syu cmake git

- name: Add Git PPA for Ubuntu 20.04
- name: Add Git PPA (Ubuntu 20.04)
if: matrix.name == 'Ubuntu 20.04'
run: |
DEBIAN_FRONTEND=noninteractive apt-get update
Expand All @@ -142,7 +148,14 @@ jobs:
--no-install-recommends -y cmake git curl \
ca-certificates sudo build-essential \
autoconf automake libtool gettext libgettextpo-dev
- name: Add RPM Fusion repo (Fedora)
if: matrix.name == 'Fedora Rawhide'
run: |
dnf -y clean all
dnf -y update
dnf -y install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
- name: Prerequisites (Fedora)
if: matrix.group == 'rh'
run: |
Expand All @@ -151,7 +164,7 @@ jobs:
dnf -y group install --skip-broken c-development
dnf -y install cmake git curl sudo libtool gettext
- name: Add Repos (openSUSE Leap)
- name: Add repos (openSUSE Leap)
if: startsWith(matrix.container, 'opensuse/leap')
env:
VER: ${{ matrix.version }}
Expand Down Expand Up @@ -193,15 +206,16 @@ jobs:
uses: actions/checkout@v4
with:
repository: vapoursynth/bestsource
ref: R4
ref: R5
path: subprojects/bestsource
submodules: recursive

- name: Checkout FFMS2 repo
if: matrix.age >= 2
uses: actions/checkout@v4
with:
repository: FFMS/ffms2
ref: 5.0
ref: "5.0"
path: subprojects/ffms2
submodules: recursive

Expand All @@ -221,17 +235,18 @@ jobs:
fontconfig hunspell libass libglvnd meson openal portaudio \
python pulseaudio uchardet vapoursynth wxwidgets-gtk3
- name: Install meson from pip (Old)
if: ${{ matrix.group == 'deb' && matrix.age >= 4 }}
- name: Install meson (Debian/Ubuntu)
if: matrix.group == 'deb'
run: |
apt-get install -y python3 python3-pip
pip install meson
- name: Install meson from apt (New)
if: ${{ matrix.group == 'deb' && matrix.age <= 3 }}
run: apt-get install --no-install-recommends -y meson

- name: Install some dependencies (Debian & Ubuntu)
if [ ${{ matrix.age }} -le 3 ]
then
apt-get install --no-install-recommends -y meson
else
apt-get install -y python3 python3-pip
pip install meson
fi
- name: Install some dependencies (Debian/Ubuntu)
if: matrix.group == 'deb'
run: |
apt-get install -y pkg-config
Expand All @@ -241,35 +256,45 @@ jobs:
libboost-all-dev libhunspell-dev libuchardet-dev \
libpulse-dev libopenal-dev libfftw3-dev libopus-dev
- name: Install ffmpeg 6.1+ (Debian 13+, Ubuntu 24.04+)
if: ${{ matrix.group == 'deb' && matrix.age <= 2 }}
- name: Install FFmpeg 6.1+ (Debian 13+, Ubuntu 24.04+)
if: matrix.group == 'deb' && matrix.age <= 2
run: |
apt-get install -y \
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev \
libavutil-dev libpostproc-dev libswresample-dev libswscale-dev
- name: Install wxWidgets 3.0 (Old)
if: ${{ matrix.group == 'deb' && matrix.age >= 5 }}
run: apt-get install -y libwxgtk3.0-gtk3-dev wx3.0-i18n

- name: Install wxWidgets 3.2 (New)
if: ${{ matrix.group == 'deb' && matrix.age <= 4 }}
run: apt-get install -y libwxgtk3.2-dev wx3.2-i18n
- name: Install FFMS2 (Debian Unstable)
if: matrix.group == 'deb' && matrix.age <= 1
run: apt-get install -y libffms2-dev

- name: Install xxHash (Very Old Debian/Ubuntu)
if: ${{ matrix.group == 'deb' && matrix.age <= 5 }}
- name: Install wxWidgets (Debian/Ubuntu)
if: matrix.group == 'deb'
run: |
if [ ${{ matrix.age }} -le 4 ]
then
apt-get install -y libwxgtk3.2-dev wx3.2-i18n
else
apt-get install -y libwxgtk3.0-gtk3-dev wx3.0-i18n
fi
- name: Install xxHash (Ubuntu 20.04)
if: matrix.group == 'deb' && matrix.age <= 5
run: apt-get install -y libxxhash-dev

- name: Install dependencies (Fedora)
if: matrix.group == 'rh'
run: |
dnf -y install pkgconf-pkg-config
dnf -y install --skip-broken meson ninja-build libX11 freetype nasm \
dnf install -y pkgconf-pkg-config
dnf install -y --skip-broken meson ninja-build libX11 freetype nasm \
fontconfig-devel libnotify-devel libass-devel intltool zlib-devel \
boost-devel hunspell-devel uchardet-devel pulseaudio-libs-devel \
fftw-devel openal-soft xxhash-devel luajit-devel wxGTK-devel \
ffmpeg-free-devel opus-devel
- name: Install FFMS2 (Fedora Rawhide)
if: matrix.group == 'rh' && matrix.age <= 1
run: dnf install -y ffms2-devel

- name: Install dependencies (openSUSE)
if: matrix.group == 'suse'
run: |
Expand Down Expand Up @@ -299,24 +324,21 @@ jobs:
if: ${{ ! matrix.avisynthplus }}
run: meson subprojects packagefiles --apply avisynth

- name: Add meson.build to BestSource and FFMS2
run: |
cd subprojects/bestsource
git reset --hard 9d7e218
cd ..
patch --directory=./bestsource --forward --strip=1 < ./packagefiles/bestsource/0001.patch
cd ..
meson subprojects packagefiles --apply bestsource
meson subprojects packagefiles --apply ffms2
- name: Add meson.build to BestSource
run: meson subprojects packagefiles --apply bestsource

- name: Download FFmpeg
if: matrix.age > 1
- name: Add meson.build to FFMS2
if: matrix.age >= 2
run: meson subprojects packagefiles --apply ffms2

- name: Download FFmpeg, add meson.build to FFmpeg
if: matrix.age >= 3
run: |
cd subprojects
sudo -u user1 git clone --depth=1 -b meson-6.1 https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg.git
git clone --depth=1 -b meson-6.1 https://gitlab.freedesktop.org/gstreamer/meson-ports/ffmpeg.git
patch --directory=./ffmpeg --forward --strip=1 < ./packagefiles/ffmpeg/0001.patch
cd ..
sudo -u user1 meson subprojects packagefiles --apply ffmpeg
meson subprojects packagefiles --apply ffmpeg
- name: Add meson.build to LuaJIT
if: ${{ ! matrix.lua52compat }}
Expand All @@ -340,14 +362,23 @@ jobs:

# TODO: Looking for openSUSE Leap users to fix it
- name: Run test
env:
IGNORE_ERROR: ${{ startsWith(matrix.container, 'opensuse/leap') && '|| true' || ''}}
run: |
sudo -u $USERNAME meson test -C build --verbose "gtest main"$IGNORE_ERROR
if ${{ startsWith(matrix.container, 'opensuse/leap') }}
then
sudo -u $USERNAME meson test -C build --verbose "gtest main" || true
else
sudo -u $USERNAME meson test -C build --verbose "gtest main"
fi
chown -R root:root /__w/Aegisub/Aegisub
- name: Generate Package
run: |
mkdir -p pkgdir
meson install -C build --destdir=../pkgdir
case ${{ matrix.group }} in
arch) pacman --noconfirm -Sy tree ;;
deb) apt-get install -y tree ;;
rh) dnf install -y tree ;;
suse) zypper install -y tree ;;
esac
tree pkgdir

0 comments on commit e574a58

Please sign in to comment.