OpenGL update? #270
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Meson CI | |
on: | |
push: | |
branches: | |
- master | |
- feature | |
- cibuilds | |
paths-ignore: | |
- ".github/workflows/archlinux.yml" | |
pull_request: | |
branches: | |
- master | |
- feature | |
paths-ignore: | |
- ".github/workflows/archlinux.yml" | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.config.name }} | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- name: Windows MSVC Release | |
os: windows-latest | |
msvc: true | |
buildtype: release | |
args: >- | |
-Dcpp_std=c++20 | |
-Ddefault_library=static | |
--force-fallback-for=zlib,harfbuzz,freetype2,fribidi,libpng | |
-Dfreetype2:harfbuzz=disabled | |
-Dharfbuzz:freetype=disabled | |
-Dharfbuzz:cairo=disabled | |
-Dharfbuzz:glib=disabled | |
-Dharfbuzz:gobject=disabled | |
-Dharfbuzz:tests=disabled | |
-Dharfbuzz:docs=disabled | |
-Dharfbuzz:icu=disabled | |
-Dfribidi:tests=false | |
-Dfribidi:docs=false | |
-Dlibass:fontconfig=disabled | |
-Davisynth=enabled | |
-Dbestsource=enabled | |
-Dvapoursynth=enabled | |
- name: Windows MSVC Release (wx master) | |
os: windows-latest | |
msvc: true | |
buildtype: release | |
args: >- | |
-Dcpp_std=c++20 | |
-Ddefault_library=static | |
--force-fallback-for=zlib,harfbuzz,freetype2,fribidi,libpng | |
-Dfreetype2:harfbuzz=disabled | |
-Dharfbuzz:freetype=disabled | |
-Dharfbuzz:cairo=disabled | |
-Dharfbuzz:glib=disabled | |
-Dharfbuzz:gobject=disabled | |
-Dharfbuzz:tests=disabled | |
-Dharfbuzz:docs=disabled | |
-Dharfbuzz:icu=disabled | |
-Dfribidi:tests=false | |
-Dfribidi:docs=false | |
-Dlibass:fontconfig=disabled | |
-Davisynth=enabled | |
-Dbestsource=enabled | |
-Dvapoursynth=enabled | |
-Dwx_version='3.3.0' | |
- name: Ubuntu Debug | |
os: ubuntu-latest | |
buildtype: debugoptimized | |
args: '-Dcpp_std=c++20' | |
- name: Ubuntu Release | |
os: ubuntu-latest | |
buildtype: release | |
args: '-Dcpp_std=c++20' | |
- name: Ubuntu AppImage | |
os: ubuntu-latest | |
buildtype: release | |
appimage: true | |
args: >- | |
-Dcpp_std=c++20 | |
--prefix=/usr | |
-Dbuild_appimage=true | |
-Ddefault_library=static | |
-Davisynth=enabled | |
-Dbestsource=enabled | |
-Dffms2=enabled | |
-Dvapoursynth=enabled | |
- name: macOS Release | |
os: macos-latest | |
buildtype: release | |
args: >- | |
-Dcpp_std=c++20 | |
-Ddefault_library=static | |
-Dbuild_osx_bundle=true | |
-Dlocal_boost=true | |
-Dbestsource=enabled | |
-Dvapoursynth=enabled | |
-Dffms2=enabled | |
--force-fallback-for=ffms2 | |
- name: macOS Release (wx master) | |
os: macos-latest | |
buildtype: release | |
args: >- | |
-Dcpp_std=c++20 | |
-Ddefault_library=static | |
-Dbuild_osx_bundle=true | |
-Dlocal_boost=true | |
-Dbestsource=enabled | |
-Dvapoursynth=enabled | |
-Dffms2=enabled | |
--force-fallback-for=ffms2 | |
-Dwx_version='3.3.0' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: '0' | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.x' | |
- name: Setup Meson | |
run: | | |
python -m pip install --upgrade pip setuptools | |
pip install meson | |
- name: Setup MSVC | |
if: matrix.config.os == 'windows-latest' && matrix.config.msvc == true | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install dependencies (Windows) | |
if: matrix.config.os == 'windows-latest' | |
run: | | |
choco install ninja innosetup nasm | |
$url = "https://github.com/leafo/moonscript/releases/download/win32-v0.5.0/moonscript-187bac54ee5a7450013e9c38e005a0e671b76f45.zip" | |
mkdir moonscript | |
Invoke-WebRequest -Uri $url -OutFile ".\moonscript\moonscript.zip" | |
cd moonscript | |
7z e moonscript.zip | |
Get-Location | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
# brew install wxwidgets | |
- name: Install dependencies (MacOS) | |
if: matrix.config.os == 'macos-latest' | |
run: | | |
brew update | |
brew install --force --overwrite luarocks ninja | |
luarocks install luafilesystem 1.8.0 | |
luarocks install moonscript --dev | |
brew install --force --overwrite --HEAD libass ffms2 | |
brew install --force --overwrite zlib fftw hunspell | |
brew install --force --overwrite pulseaudio # NO OpenAL in github CI | |
- name: Install dependencies (Linux) | |
if: startsWith(matrix.config.os, 'ubuntu-') | |
run: | | |
sudo apt-get update | |
sudo apt-get install --no-install-recommends ninja-build libx11-dev libwxgtk3.0-gtk3-dev libfreetype6-dev pkg-config libfontconfig1-dev libass-dev libasound2-dev intltool libboost-all-dev libhunspell-dev libuchardet-dev libpulse-dev libopenal-dev libjansson-dev nasm | |
- name: Setup Multimedia Packages (Linux) | |
if: startsWith(matrix.config.os, 'ubuntu-') | |
run: | | |
git clone --depth=1 -b 3.7 https://github.com/AviSynth/AviSynthPlus.git | |
cd AviSynthPlus | |
mkdir aspbuild && cd aspbuild | |
cmake ../ -DCMAKE_INSTALL_PREFIX=/usr -DHEADERS_ONLY:bool=off | |
sudo make VersionGen install | |
cd ../.. | |
rm -rf AviSynthPlus | |
git clone --depth=1 -b release/6.1 https://github.com/FFmpeg/FFmpeg.git | |
cd FFmpeg | |
./configure --prefix=/usr --disable-debug \ | |
--disable-muxers --disable-encoders --disable-filters \ | |
--disable-hwaccels --disable-network --disable-devices \ | |
--enable-gpl --enable-nonfree --enable-version3 --enable-shared \ | |
--enable-avisynth | |
make V=1 -j2 -k | |
sudo make install | |
cd .. | |
rm -rf FFmpeg | |
git clone --depth=1 https://github.com/FFMS/ffms2.git | |
cd ffms2 | |
./autogen.sh --prefix=/usr --enable-shared --disable-static --enable-avisynth | |
make V=1 CXXFLAGS='-I/usr/include/avisynth' -j2 -k | |
sudo make install | |
cd .. | |
rm -rf ffms2 | |
- name: Configure | |
if: matrix.config.os != 'macos-latest' | |
run: meson setup build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }} | |
- name: Configure (MacOS) | |
if: matrix.config.os == 'macos-latest' | |
run: | | |
export PKG_CONFIG_PATH="/usr/local/opt/icu4c/lib/pkgconfig" | |
meson setup build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }} | |
# export CC=$(brew --prefix llvm@15)/bin/clang | |
# export CXX=$(brew --prefix llvm@15)/bin/clang++ | |
- name: Build | |
run: meson compile -C build | |
- name: Run test | |
run: meson test -C build --verbose "gtest main" | |
# Windows artifacts | |
- name: Generate Windows installer | |
if: matrix.config.os == 'windows-latest' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | |
meson compile win-installer -C build | |
- name: Generate Windows portable installer | |
if: matrix.config.os == 'windows-latest' | |
run: cd build && ninja win-portable | |
- name: Upload artifacts - win_installer | |
uses: actions/upload-artifact@v3 | |
if: matrix.config.os == 'windows-latest' | |
with: | |
name: ${{ matrix.config.name }} - installer | |
path: build/Aegisub-*.exe | |
if-no-files-found: error | |
- name: Upload artifacts - portable.zip | |
uses: actions/upload-artifact@v3 | |
if: matrix.config.os == 'windows-latest' | |
with: | |
name: ${{ matrix.config.name }} - portable | |
path: build/aegisub-portable-64.zip | |
# macOS artifacts | |
- name: Generate macOS installer | |
if: matrix.config.os == 'macos-latest' | |
run: | | |
meson compile osx-bundle -C build | |
meson compile osx-build-dmg -C build | |
- name: Upload artifacts - macOS dmg | |
uses: actions/upload-artifact@v3 | |
if: matrix.config.os == 'macos-latest' | |
with: | |
name: ${{ matrix.config.name }} - installer | |
path: build/Aegisub-*.dmg | |
if-no-files-found: error | |
# Linux artifacts (AppImage) | |
- name: Generate AppImage | |
if: matrix.config.appimage | |
run: | | |
mkdir -p appimage/appdir | |
meson install -C build --destdir=../appimage/appdir | |
cd appimage | |
sudo apt-get install libfuse2 | |
curl -L "https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20220822-1/linuxdeploy-x86_64.AppImage" -o linuxdeploy | |
curl -L "https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage" -o appimagetool | |
chmod +x linuxdeploy appimagetool | |
./linuxdeploy --appdir appdir --desktop-file=appdir/aegisub.desktop | |
./appimagetool appdir | |
- name: Upload artifacts - Linux AppImage | |
uses: actions/upload-artifact@v3 | |
if: matrix.config.appimage | |
with: | |
name: ${{ matrix.config.name }} | |
path: appimage/*.AppImage | |
if-no-files-found: error |