Install gettext on Windows CI #264
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 ] | |
pull_request: | |
branches: [ master ] | |
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: >- | |
-Ddefault_library=static | |
--force-fallback-for=zlib,harfbuzz,freetype2,fribidi,libpng | |
-Dfreetype2:harfbuzz=disabled | |
-Dharfbuzz:freetype=disabled | |
-Dharfbuzz:cairo=disabled | |
-Dharfbuzz:icu=disabled | |
-Dharfbuzz:glib=disabled | |
-Dharfbuzz:gobject=disabled | |
-Dharfbuzz:tests=disabled | |
-Dharfbuzz:docs=disabled | |
-Dfribidi:tests=false | |
-Dfribidi:docs=false | |
-Dlibass:fontconfig=disabled | |
#- { | |
# name: Windows MinGW, | |
# os: windows-latest, | |
# msvc: false | |
#} | |
- { | |
name: Ubuntu Debug, | |
os: ubuntu-latest, | |
buildtype: debugoptimized, | |
args: '' | |
} | |
- { | |
name: Ubuntu Release, | |
os: ubuntu-latest, | |
buildtype: release, | |
args: '' | |
} | |
- { | |
name: macOS Debug, | |
os: macos-latest, | |
buildtype: debugoptimized, | |
args: -Ddefault_library=static -Dbuild_osx_bundle=true -Dlocal_boost=true --force-fallback-for=ffms2 | |
} | |
- { | |
name: macOS Release, | |
os: macos-latest, | |
buildtype: release, | |
args: -Ddefault_library=static -Dbuild_osx_bundle=true -Dlocal_boost=true --force-fallback-for=ffms2 | |
} | |
steps: | |
- uses: actions/checkout@v3 | |
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 | |
$moonscripturl = "https://github.com/leafo/moonscript/releases/download/win32-v0.5.0/moonscript-187bac54ee5a7450013e9c38e005a0e671b76f45.zip" | |
mkdir moonscript | |
Invoke-WebRequest -Uri $moonscripturl -OutFile ".\moonscript\moonscript.zip" | |
pushd moonscript | |
7z e moonscript.zip | |
Get-Location | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
popd | |
$gettexturl = "https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-static-64.zip" | |
Invoke-WebRequest -Uri $gettexturl -OutFile ".\gettext.zip" | |
Expand-Archive ".\gettext.zip" -DestinationPath gettext | |
pushd gettext/bin | |
Get-Location | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
popd | |
- name: Install dependencies (MacOS) | |
if: matrix.config.os == 'macos-latest' | |
run: | | |
export HOMEBREW_NO_INSTALL_CLEANUP=1 | |
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 | |
# Skip brew update for now, see https://github.com/actions/setup-python/issues/577 | |
# brew update | |
brew install luarocks ninja | |
luarocks install luafilesystem 1.8.0 | |
luarocks install moonscript --dev | |
brew install libass zlib ffms2 fftw hunspell | |
brew install pulseaudio # NO OpenAL in github CI | |
- name: Install dependencies (Linux) | |
if: matrix.config.os == 'ubuntu-latest' | |
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 | |
- name: Configure | |
run: meson build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }} | |
- 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 |