From 1a207ff84d45c143892d38768551e63d66a6f9ef Mon Sep 17 00:00:00 2001 From: 0tkl <118708188+0tkl@users.noreply.github.com> Date: Tue, 10 Jun 2025 18:00:18 +0800 Subject: [PATCH 1/3] ci: Add Windows ARM64 build configuration --- .github/workflows/ci.yml | 36 +++++++++++++++++++++++++++++------- 1 file changed, 29 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 50049abda9..ae0bab4762 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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: >- @@ -35,6 +36,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, @@ -80,11 +100,13 @@ jobs: pip install meson - name: Setup MSVC - if: matrix.config.os == 'windows-latest' && matrix.config.msvc == true + if: startsWith(matrix.config.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: startsWith(matrix.config.os, 'windows-') run: | choco install ninja innosetup @@ -131,19 +153,19 @@ jobs: # Windows artifacts - name: Generate Windows installer - if: matrix.config.os == 'windows-latest' + if: startsWith(matrix.config.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: startsWith(matrix.config.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: startsWith(matrix.config.os, 'windows-') with: name: ${{ matrix.config.name }} - installer path: build/Aegisub-*.exe @@ -151,7 +173,7 @@ jobs: - name: Upload artifacts - portable.zip uses: actions/upload-artifact@v4 - if: matrix.config.os == 'windows-latest' + if: startsWith(matrix.config.os, 'windows-') with: name: ${{ matrix.config.name }} - portable path: build/aegisub-portable-64.zip From ee4254022fe0487eda8d433a3700ad6504a1bdfa Mon Sep 17 00:00:00 2001 From: 0tkl <118708188+0tkl@users.noreply.github.com> Date: Tue, 10 Jun 2025 18:29:16 +0800 Subject: [PATCH 2/3] ci: dav1d requires gaspp on Win ARM build gas-preprocessor.pl --- .github/workflows/ci.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ae0bab4762..71b433f0b9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -142,6 +142,18 @@ jobs: 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' || '' }} From c4f4d1ebf5bb93557f1f42809c66132701649956 Mon Sep 17 00:00:00 2001 From: 0tkl <118708188+0tkl@users.noreply.github.com> Date: Wed, 11 Jun 2025 18:09:27 +0800 Subject: [PATCH 3/3] ci: use runner.os for generic OS detection Use the built-in runner.os context variable when we only need to identify the category and do not care about the specific image used under the category. --- .github/workflows/ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71b433f0b9..8989c54986 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -100,13 +100,13 @@ jobs: pip install meson - name: Setup MSVC - if: startsWith(matrix.config.os, 'windows-') && 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: startsWith(matrix.config.os, 'windows-') + if: runner.os == 'Windows' run: | choco install ninja innosetup @@ -126,7 +126,7 @@ jobs: 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 @@ -137,7 +137,7 @@ 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 @@ -165,19 +165,19 @@ jobs: # Windows artifacts - name: Generate Windows installer - if: startsWith(matrix.config.os, 'windows-') + if: runner.os == 'Windows' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: meson compile win-installer -C build - name: Generate Windows portable installer - if: startsWith(matrix.config.os, 'windows-') + if: runner.os == 'Windows' run: cd build && ninja win-portable - name: Upload artifacts - win_installer uses: actions/upload-artifact@v4 - if: startsWith(matrix.config.os, 'windows-') + if: runner.os == 'Windows' with: name: ${{ matrix.config.name }} - installer path: build/Aegisub-*.exe @@ -185,21 +185,21 @@ jobs: - name: Upload artifacts - portable.zip uses: actions/upload-artifact@v4 - if: startsWith(matrix.config.os, 'windows-') + 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 @@ -207,7 +207,7 @@ jobs: # 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 @@ -221,7 +221,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