Aegisub/.github/workflows/ci.yml

92 lines
2.7 KiB
YAML

name: Meson CI
on:
push:
branches: [ meson-vs2019 ]
pull_request:
branches: [ meson-vs2019 ]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
- {
name: Windows MSVC,
os: windows-latest,
msvc: true
}
#- {
# name: Windows MinGW,
# os: windows-latest,
# msvc: false
#}
- {
name: "Ubuntu",
os: ubuntu-latest
}
#- {
# name: "macOS",
# os: macos-latest
#}
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Setup Meson
run: |
python -m pip install --upgrade pip
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
$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
- name: Install dependencies (Linux)
if: matrix.config.os == 'ubuntu-latest'
run: 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
- name: Configure (Windows)
if: matrix.config.os == 'windows-latest'
# -Dfreetype2:png=enabled is a workaround for https://savannah.nongnu.org/bugs/?59458
run: meson build -Ddefault_library=static --force-fallback-for=zlib,harfbuzz -Dfreetype2:zlib=system -Dfreetype2:png=enabled -Dfreetype2:default_library=static -Dbuildtype=release
- name: Configure (Linux)
if: matrix.config.os == 'ubuntu-latest'
run: meson build
- name: Build
run: meson compile -C build
- name: Generate Windows installer
if: matrix.config.os == 'windows-latest'
run: meson compile win-installer -C build
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: matrix.config.os == 'windows-latest'
with:
name: ${{ matrix.config.name }}
path: |
build/Aegisub-*.exe