Skip to content

ci: Add Windows ARM64 build configuration #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 48 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ jobs:
fail-fast: false
matrix:
config:
- name: Windows MSVC Release
- name: Windows MSVC x64 Release
os: windows-latest
arch: x64
msvc: true
buildtype: release
args: >-
Expand All @@ -34,6 +35,25 @@ jobs:
-Dfribidi:tests=false
-Dfribidi:docs=false
-Dlibass:fontconfig=disabled
- name: Windows MSVC ARM64 Release
os: windows-11-arm
arch: arm64
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
-Dfribidi:tests=false
-Dfribidi:docs=false
-Dlibass:fontconfig=disabled
-Dlibass:asm=disabled
#- {
# name: Windows MinGW,
# os: windows-latest,
Expand Down Expand Up @@ -79,11 +99,13 @@ jobs:
pip install meson==1.7.2

- name: Setup MSVC
if: matrix.config.os == 'windows-latest' && matrix.config.msvc == true
if: runner.os == 'Windows' && matrix.config.msvc == true
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.config.arch }}

- name: Install dependencies (Windows)
if: matrix.config.os == 'windows-latest'
if: runner.os == 'Windows'
run: |
choco install ninja innosetup

Expand All @@ -95,15 +117,15 @@ jobs:
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"
$gettexturl = "https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.25-v1.17/gettext0.25-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: Install dependencies (MacOS)
if: startsWith(matrix.config.os, 'macos-')
if: runner.os == 'macOS'
run: |
export HOMEBREW_NO_INSTALL_CLEANUP=1
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
Expand All @@ -114,11 +136,23 @@ jobs:
brew install pulseaudio # NO OpenAL in github CI

- name: Install dependencies (Linux)
if: startsWith(matrix.config.os, 'ubuntu-')
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ninja-build build-essential libx11-dev libfreetype6-dev pkg-config libfontconfig1-dev libass-dev libasound2-dev libffms2-dev intltool libboost-all-dev libhunspell-dev libcurl4-openssl-dev libuchardet-dev libgtest-dev libgmock-dev libwxgtk3.2-dev

- name: Checkout gas-preprocessor (Windows ARM64)
if: matrix.config.os == 'windows-11-arm'
uses: actions/checkout@v4
with:
repository: FFmpeg/gas-preprocessor
path: gas-preprocessor

- name: Add gas-preprocessor to path (Windows ARM64)
if: matrix.config.os == 'windows-11-arm'
run: |
echo "$PWD\gas-preprocessor" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append

- name: Configure
run: meson setup build ${{ matrix.config.args }} -Dbuildtype=${{ matrix.config.buildtype }} ${{ github.ref_type == 'tag' && '-Dofficial_release=true' || '' }}

Expand All @@ -130,49 +164,49 @@ jobs:

# Windows artifacts
- name: Generate Windows installer
if: matrix.config.os == 'windows-latest'
if: runner.os == 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
meson compile win-installer -C build

- name: Generate Windows portable installer
if: matrix.config.os == 'windows-latest'
if: runner.os == 'Windows'
run: cd build && ninja win-portable

- name: Upload artifacts - win_installer
uses: actions/upload-artifact@v4
if: matrix.config.os == 'windows-latest'
if: runner.os == 'Windows'
with:
name: ${{ matrix.config.name }} - installer
path: build/Aegisub-*.exe
if-no-files-found: error

- name: Upload artifacts - portable.zip
uses: actions/upload-artifact@v4
if: matrix.config.os == 'windows-latest'
if: runner.os == 'Windows'
with:
name: ${{ matrix.config.name }} - portable
path: build/aegisub-portable-64.zip

# macOS artifacts
- name: Generate macOS installer
if: startsWith(matrix.config.os, 'macos-')
if: runner.os == 'macOS'
run: |
meson compile osx-bundle -C build
meson compile osx-build-dmg -C build

- name: Upload artifacts - macOS dmg
uses: actions/upload-artifact@v4
if: startsWith(matrix.config.os, 'macos-')
if: runner.os == 'macOS'
with:
name: ${{ matrix.config.name }} - installer
path: build/Aegisub-*.dmg
if-no-files-found: error

# Tarball
- name: Generate tarball
if: matrix.config.os == 'ubuntu-latest' && matrix.config.buildtype == 'release'
if: runner.os == 'Linux' && matrix.config.buildtype == 'release'
run: |
set -e

Expand All @@ -186,7 +220,7 @@ jobs:

- name: Upload artifacts - tarball
uses: actions/upload-artifact@v4
if: matrix.config.os == 'ubuntu-latest' && matrix.config.buildtype == 'release'
if: runner.os == 'Linux' && matrix.config.buildtype == 'release'
with:
name: Source Tarball
path: build/meson-dist/*.tar.xz
Expand Down
Loading