Windows Build & Package #133
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: Windows Build & Package | |
on: | |
push: | |
branches: | |
- master | |
- feature | |
- cibuilds | |
paths: | |
- '**' | |
- '!.github/workflows/**' | |
- '.github/workflows/windows.yml' | |
- '!docs/**' | |
- '!packages/**' | |
- 'packages/meson.build' | |
- 'packages/desktop/**' | |
- '!packages/desktop/aegisub.appdata**' | |
- '!packages/desktop/aegisub.desktop**' | |
- 'packages/win_installer/**' | |
- '!src/osx/**' | |
- '!tools/osx-**' | |
pull_request: | |
branches: | |
- master | |
- feature | |
paths: | |
- '**' | |
- '!.github/workflows/**' | |
- '.github/workflows/windows.yml' | |
- '!docs/**' | |
- '!packages/**' | |
- 'packages/meson.build' | |
- 'packages/desktop/**' | |
- '!packages/desktop/aegisub.appdata**' | |
- '!packages/desktop/aegisub.desktop**' | |
- 'packages/win_installer/**' | |
- '!src/osx/**' | |
- '!tools/osx-**' | |
workflow_dispatch: | |
jobs: | |
build: | |
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ', wx master' }}) | |
runs-on: windows-2025 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: ['x86', 'x64', 'arm64'] | |
compiler-flag: ['-Dvsenv=true'] | |
extra-args: ['', "-Dwx_version='3.3.0'"] | |
include: | |
- 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 | |
-Dffmpeg:libdav1d=enabled | |
-Davisynth=enabled | |
-Dbestsource=enabled | |
-Dvapoursynth=enabled | |
- name: Windows MSVC Release | |
msvc: true | |
#- { | |
# name: Windows MinGW, | |
# os: windows-latest, | |
# msvc: false | |
#} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Setup Meson | |
run: pipx install meson | |
- name: Setup MSVC | |
if: matrix.msvc == true | |
uses: microsoft/setup-msbuild@v2 | |
with: | |
msbuild-architecture: ${{ matrix.arch }} | |
- name: Install dependencies | |
run: | | |
choco install ninja innosetup nasm | |
$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.23-v1.17/gettext0.23-iconv1.17-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: Configure | |
run: | | |
meson setup build ${{ matrix.args }} ${{ matrix.compiler-flag }} ${{ matrix.extra-args }} -Dbuildtype=${{ matrix.buildtype }} | |
meson configure build | |
- name: Build | |
run: meson compile -C build | |
- name: Run test | |
run: meson test -C build --verbose "gtest main" | |
# Windows artifacts | |
- name: Generate Windows installer | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | |
meson compile win-installer -C build | |
- name: Generate Windows portable installer | |
run: cd build && ninja win-portable | |
- name: Upload artifacts - win_installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ' wx master' }}) ${{ github.actor }} - installer | |
path: build/Aegisub-*.exe | |
if-no-files-found: error | |
- name: Upload artifacts - portable.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ' wx master' }}) ${{ github.actor }} - portable | |
path: build/aegisub-portable/ | |
- name: Upload artifacts - portable slim.zip | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }} (${{ matrix.arch }}${{ matrix.extra-args && ' wx master' }}) ${{ github.actor }} - portable slim | |
path: | | |
build/aegisub-portable/ | |
!build/aegisub-portable/Microsoft.CRT | |
!build/aegisub-portable/Redist |