ci: add Windows on Arm build

This commit is contained in:
parhelia512 2025-09-20 13:09:45 +08:00
parent 6965ea1717
commit 44a12574ae
2 changed files with 54 additions and 6 deletions

View File

@ -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

22
script/deploy_woa.sh Normal file
View File

@ -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