2020-11-15 18:46:43 +01:00
|
|
|
name: Meson CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2022-11-10 15:05:00 +01:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- feature
|
2023-01-26 23:05:17 +01:00
|
|
|
- cibuilds
|
2020-11-15 18:46:43 +01:00
|
|
|
pull_request:
|
2022-11-10 15:05:00 +01:00
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- feature
|
2023-11-15 19:04:50 +01:00
|
|
|
workflow_dispatch:
|
2020-11-15 18:46:43 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: ${{ matrix.config.name }}
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
|
|
|
|
strategy:
|
2022-07-01 22:12:00 +02:00
|
|
|
fail-fast: false
|
2020-11-15 18:46:43 +01:00
|
|
|
matrix:
|
|
|
|
config:
|
2021-10-12 09:37:49 +02:00
|
|
|
- name: Windows MSVC Release
|
|
|
|
os: windows-latest
|
|
|
|
msvc: true
|
|
|
|
buildtype: release
|
|
|
|
args: >-
|
|
|
|
-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
|
2023-07-16 17:56:23 +02:00
|
|
|
-Dharfbuzz:icu=disabled
|
2021-10-12 09:37:49 +02:00
|
|
|
-Dfribidi:tests=false
|
|
|
|
-Dfribidi:docs=false
|
|
|
|
-Dlibass:fontconfig=disabled
|
2022-07-27 00:13:42 +02:00
|
|
|
-Davisynth=enabled
|
2022-08-16 21:08:20 +02:00
|
|
|
-Dbestsource=enabled
|
|
|
|
-Dvapoursynth=enabled
|
2023-07-24 20:35:38 +02:00
|
|
|
- name: Windows MSVC Release (wx master)
|
|
|
|
os: windows-latest
|
|
|
|
msvc: true
|
|
|
|
buildtype: release
|
|
|
|
args: >-
|
|
|
|
-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
|
2023-08-09 18:30:51 +02:00
|
|
|
-Davisynth=enabled
|
|
|
|
-Dbestsource=enabled
|
|
|
|
-Dvapoursynth=enabled
|
2023-07-24 20:35:38 +02:00
|
|
|
-Dwx_version='3.3.0'
|
2020-11-15 18:46:43 +01:00
|
|
|
#- {
|
|
|
|
# name: Windows MinGW,
|
|
|
|
# os: windows-latest,
|
|
|
|
# msvc: false
|
|
|
|
#}
|
|
|
|
- {
|
2021-01-10 07:59:09 +01:00
|
|
|
name: Ubuntu Debug,
|
|
|
|
os: ubuntu-latest,
|
|
|
|
buildtype: debugoptimized,
|
2021-02-28 02:21:29 +01:00
|
|
|
args: ''
|
2020-11-15 18:46:43 +01:00
|
|
|
}
|
2021-01-09 09:18:33 +01:00
|
|
|
- {
|
2021-01-10 07:59:09 +01:00
|
|
|
name: Ubuntu Release,
|
|
|
|
os: ubuntu-latest,
|
|
|
|
buildtype: release,
|
2021-02-28 02:21:29 +01:00
|
|
|
args: ''
|
2021-01-10 07:59:09 +01:00
|
|
|
}
|
2023-04-21 16:23:01 +02:00
|
|
|
- name: Ubuntu AppImage
|
|
|
|
os: ubuntu-22.04
|
|
|
|
buildtype: release
|
|
|
|
appimage: true
|
|
|
|
# distro ffms is currently broken
|
|
|
|
args: >-
|
|
|
|
--prefix=/usr
|
|
|
|
-Dbuild_appimage=true
|
|
|
|
-Ddefault_library=static
|
|
|
|
--force-fallback-for=ffms2
|
|
|
|
-Davisynth=enabled
|
|
|
|
-Dbestsource=enabled
|
|
|
|
-Dvapoursynth=enabled
|
2021-05-22 04:02:21 +02:00
|
|
|
- {
|
|
|
|
name: macOS Release,
|
|
|
|
os: macos-latest,
|
|
|
|
buildtype: release,
|
2023-04-29 21:28:36 +02:00
|
|
|
args: -Ddefault_library=static -Dbuild_osx_bundle=true -Dlocal_boost=true -Dvapoursynth=enabled --force-fallback-for=ffms2
|
2021-05-22 04:02:21 +02:00
|
|
|
}
|
2020-11-15 18:46:43 +01:00
|
|
|
|
|
|
|
steps:
|
2022-12-01 21:36:09 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-11-15 18:46:43 +01:00
|
|
|
with:
|
|
|
|
fetch-depth: '0'
|
|
|
|
|
2022-12-01 21:36:09 +01:00
|
|
|
- uses: actions/setup-python@v4
|
2020-11-15 18:46:43 +01:00
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
|
|
|
|
- name: Setup Meson
|
|
|
|
run: |
|
2023-10-18 23:29:20 +02:00
|
|
|
python -m pip install --upgrade pip setuptools
|
2020-11-15 18:46:43 +01:00
|
|
|
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'
|
2020-12-22 07:06:07 +01:00
|
|
|
run: |
|
2023-01-21 02:50:18 +01:00
|
|
|
choco install ninja innosetup
|
2020-12-22 07:06:07 +01:00
|
|
|
$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
|
2020-11-15 18:46:43 +01:00
|
|
|
|
2021-01-09 09:18:33 +01:00
|
|
|
- name: Install dependencies (MacOS)
|
|
|
|
if: matrix.config.os == 'macos-latest'
|
|
|
|
run: |
|
2021-10-12 09:37:49 +02:00
|
|
|
brew update
|
|
|
|
brew install luarocks ninja
|
2021-01-10 06:01:47 +01:00
|
|
|
luarocks install luafilesystem 1.8.0
|
2021-01-09 09:18:33 +01:00
|
|
|
luarocks install moonscript --dev
|
2021-10-12 09:37:49 +02:00
|
|
|
brew install libass zlib ffms2 fftw hunspell
|
|
|
|
brew install pulseaudio # NO OpenAL in github CI
|
2021-01-09 09:18:33 +01:00
|
|
|
|
2020-11-15 18:46:43 +01:00
|
|
|
- name: Install dependencies (Linux)
|
2023-04-21 16:23:01 +02:00
|
|
|
if: startsWith(matrix.config.os, 'ubuntu-')
|
2021-01-10 04:50:59 +01:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
2023-10-14 00:51:32 +02:00
|
|
|
sudo apt-get install ninja-build build-essential libx11-dev libwxgtk3.0-gtk3-dev libfreetype6-dev pkg-config libfontconfig1-dev libass-dev libasound2-dev libffms2-dev intltool libboost-all-dev libhunspell-dev libuchardet-dev libpulse-dev libopenal-dev libjansson-dev nasm
|
2020-11-15 18:46:43 +01:00
|
|
|
|
2021-01-10 07:59:09 +01:00
|
|
|
- name: Configure
|
2023-04-21 16:23:01 +02:00
|
|
|
run: meson setup build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }}
|
2020-11-15 18:46:43 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: meson compile -C build
|
2021-05-24 05:33:33 +02:00
|
|
|
|
|
|
|
- name: Run test
|
2021-10-12 09:37:49 +02:00
|
|
|
run: meson test -C build --verbose "gtest main"
|
2020-11-22 22:33:02 +01:00
|
|
|
|
2021-10-12 09:37:49 +02:00
|
|
|
# Windows artifacts
|
2020-12-22 07:06:07 +01:00
|
|
|
- name: Generate Windows installer
|
|
|
|
if: matrix.config.os == 'windows-latest'
|
2023-01-12 13:36:39 +01:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
run:
|
|
|
|
meson compile win-installer -C build
|
2020-12-22 07:06:07 +01:00
|
|
|
|
2021-05-23 10:37:54 +02:00
|
|
|
- name: Generate Windows portable installer
|
|
|
|
if: matrix.config.os == 'windows-latest'
|
|
|
|
run: cd build && ninja win-portable
|
|
|
|
|
|
|
|
- name: Upload artifacts - win_installer
|
2022-12-01 21:36:09 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2020-11-22 22:33:02 +01:00
|
|
|
if: matrix.config.os == 'windows-latest'
|
|
|
|
with:
|
2021-05-23 10:37:54 +02:00
|
|
|
name: ${{ matrix.config.name }} - installer
|
2021-02-28 02:21:29 +01:00
|
|
|
path: build/Aegisub-*.exe
|
2023-03-23 16:32:43 +01:00
|
|
|
if-no-files-found: error
|
2021-05-23 10:37:54 +02:00
|
|
|
|
|
|
|
- name: Upload artifacts - portable.zip
|
2022-12-01 21:36:09 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-05-23 10:37:54 +02:00
|
|
|
if: matrix.config.os == 'windows-latest'
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.config.name }} - portable
|
|
|
|
path: build/aegisub-portable-64.zip
|
2021-10-12 09:37:49 +02:00
|
|
|
|
|
|
|
# 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
|
2022-12-01 21:36:09 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-10-12 09:37:49 +02:00
|
|
|
if: matrix.config.os == 'macos-latest'
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.config.name }} - installer
|
|
|
|
path: build/Aegisub-*.dmg
|
2023-03-23 16:32:43 +01:00
|
|
|
if-no-files-found: error
|
2023-04-21 16:23:01 +02:00
|
|
|
|
|
|
|
# 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
|