From 44a12574aedf07da41b87cf466d46bf5c2670684 Mon Sep 17 00:00:00 2001 From: parhelia512 <0011d3@gmail.com> Date: Sat, 20 Sep 2025 13:09:45 +0800 Subject: [PATCH] ci: add Windows on Arm build --- .github/workflows/build.yml | 38 +++++++++++++++++++++++++++++++------ script/deploy_woa.sh | 22 +++++++++++++++++++++ 2 files changed, 54 insertions(+), 6 deletions(-) create mode 100644 script/deploy_woa.sh diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 17eefa0..4e8b1a2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,25 +17,28 @@ jobs: include: - cross_os: windows cross_arch: amd64 - go_version: "1.25.0" + go_version: "1.25.1" + - cross_os: windows + cross_arch: arm64 + go_version: "1.25.1" - cross_os: linux cross_arch: amd64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: linux cross_arch: arm64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: darwin cross_arch: amd64 go_version: "1.24.7" - cross_os: darwin cross_arch: arm64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: windowslegacy cross_arch: amd64 - go_version: "1.25.0" + go_version: "1.25.1" - cross_os: windowslegacy cross_arch: 386 - go_version: "1.25.0" + go_version: "1.25.1" fail-fast: false runs-on: ubuntu-latest steps: @@ -94,6 +97,9 @@ jobs: - platform: windows-latest qt_version: "6.9.0" target: x86_64 + - platform: windows-11-arm + qt_version: "6.9.0" + target: arm64 - platform: ubuntu-22.04 qt_version: "6.9.0" target: amd64 @@ -130,6 +136,11 @@ jobs: uses: bwoodsend/setup-winlibs-action@v1.15 with: architecture: ${{ matrix.target }} + - name: Install MSVC compiler + if: matrix.platform == 'windows-11-arm' + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: arm64 - name: Download Artifacts uses: actions/download-artifact@v4.3.0 with: @@ -184,6 +195,17 @@ jobs: ninja -j2 cd .. ./script/deploy_windows.sh ${{ matrix.target }} + - name: WOA - Generate MakeFile and Build + shell: bash + if: matrix.platform == 'windows-11-arm' + run: | + mkdir build + cd build + curl -fLso srslist.h "https://raw.githubusercontent.com/throneproj/routeprofiles/rule-set/srslist.h" + cmake -GNinja -DCMAKE_BUILD_TYPE=Release .. + ninja -j2 + cd .. + ./script/deploy_woa.sh - name: Build Installer with NSIS shell: cmd if: matrix.platform == 'windows-latest' && matrix.qt_version != '6.2.12' @@ -286,6 +308,10 @@ jobs: zip -9 -r $version_standalone-windowslegacy64.zip Throne rm -rf Throne #### + mv windows-arm64 Throne + zip -9 -r $version_standalone-windows-arm64.zip Throne + rm -rf Throne + #### mkdir Throne mv macos-arm64/Throne.app Throne/Throne.app zip -9 --symlinks -r $version_standalone-macos-arm64.zip Throne diff --git a/script/deploy_woa.sh b/script/deploy_woa.sh new file mode 100644 index 0000000..88e8060 --- /dev/null +++ b/script/deploy_woa.sh @@ -0,0 +1,22 @@ +#!/bin/bash +set -e + +source script/env_deploy.sh +DEST=$DEPLOYMENT/windows-arm64 +rm -rf $DEST +mkdir -p $DEST + +#### copy exe #### +cp $BUILD/Throne.exe $DEST + +cd download-artifact +cd *windows-arm64 +tar xvzf artifacts.tgz -C ../../ +cd ../.. + +#### deploy qt & DLL runtime #### +pushd $DEST +windeployqt Throne.exe --no-translations --no-system-d3d-compiler --no-opengl-sw --no-svg --verbose 2 +popd + +rm -rf $DEST/dxcompiler.dll $DEST/dxil.dll