2020-11-15 18:46:43 +01:00
|
|
|
name: Meson CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2021-01-10 09:09:34 +01:00
|
|
|
branches: [ master ]
|
2020-11-15 18:46:43 +01:00
|
|
|
pull_request:
|
2021-01-10 09:09:34 +01:00
|
|
|
branches: [ master ]
|
2020-11-15 18:46:43 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
name: ${{ matrix.config.name }}
|
|
|
|
runs-on: ${{ matrix.config.os }}
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
config:
|
2020-11-15 19:10:21 +01:00
|
|
|
- {
|
2021-01-10 07:59:09 +01:00
|
|
|
name: Windows MSVC Release,
|
2020-11-15 19:10:21 +01:00
|
|
|
os: windows-latest,
|
2021-01-10 07:59:09 +01:00
|
|
|
msvc: true,
|
|
|
|
buildtype: release,
|
|
|
|
args: -Ddefault_library=static --force-fallback-for=zlib,harfbuzz
|
2020-11-15 19:10:21 +01:00
|
|
|
}
|
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,
|
|
|
|
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,
|
|
|
|
args: ""
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: macOS Debug,
|
|
|
|
os: macos-latest,
|
|
|
|
buildtype: debugoptimized,
|
|
|
|
args: -Ddefault_library=static
|
|
|
|
}
|
|
|
|
- {
|
|
|
|
name: macOS Release,
|
|
|
|
os: macos-latest,
|
|
|
|
buildtype: release,
|
|
|
|
args: -Ddefault_library=static
|
2021-01-09 09:18:33 +01:00
|
|
|
}
|
2020-11-15 18:46:43 +01:00
|
|
|
|
|
|
|
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'
|
2020-12-22 07:06:07 +01:00
|
|
|
run: |
|
2020-12-23 11:07:02 +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: |
|
|
|
|
brew install luarocks nasm 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
|
|
|
|
|
2020-11-15 18:46:43 +01:00
|
|
|
- name: Install dependencies (Linux)
|
|
|
|
if: matrix.config.os == 'ubuntu-latest'
|
2021-01-10 04:50:59 +01:00
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
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
|
2020-11-15 18:46:43 +01:00
|
|
|
|
2021-01-10 07:59:09 +01:00
|
|
|
- name: Configure
|
|
|
|
run: meson build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }}
|
2020-11-15 18:46:43 +01:00
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: meson compile -C build
|
2020-11-22 22:33:02 +01:00
|
|
|
|
2020-12-22 07:06:07 +01:00
|
|
|
- name: Generate Windows installer
|
|
|
|
if: matrix.config.os == 'windows-latest'
|
2020-12-23 11:07:02 +01:00
|
|
|
run: meson compile win-installer -C build
|
2020-12-22 07:06:07 +01:00
|
|
|
|
2020-11-22 22:33:02 +01:00
|
|
|
- name: Upload artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: matrix.config.os == 'windows-latest'
|
|
|
|
with:
|
|
|
|
name: ${{ matrix.config.name }}
|
|
|
|
path: |
|
|
|
|
build/Aegisub-*.exe
|