Skip to content

Commit 85e7c31

Browse files
committed
ci: add native Windows ARM64 build. Fix #506
1 parent d2df2e9 commit 85e7c31

2 files changed

Lines changed: 36 additions & 10 deletions

File tree

.github/workflows/build.windows.workflow.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
jobs:
1919
build:
2020
name: "Build: Windows ${{ matrix.arch }}-${{ matrix.config }}"
21-
runs-on: windows-latest
21+
runs-on: ${{ matrix.os }}
2222
env:
2323
VCPKG_FEATURE_FLAGS: manifests,binarycaching
2424
VCPKG_BINARY_SOURCES: ${{ format('clear;nuget,https://nuget.pkg.github.com/{0}/index.json,{1}', github.repository_owner, github.event_name == 'pull_request' && 'read' || 'readwrite') }}
@@ -29,17 +29,18 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
arch: [x64]
32+
arch: [x64,arm64]
3333
config: [Release]
3434
include:
3535
- arch: x64
36-
arch_name: 64-bit
37-
arch_suffix: "64"
36+
os: windows-latest
37+
- arch: arm64
38+
os: windows-11-arm
3839
steps:
3940
- name: Remove Perl Strawberry installation
4041
# Removes conflicting headers from include paths
4142
run: |
42-
Remove-Item -Recurse -Force C:/Strawberry
43+
Remove-Item -Recurse -Force C:/Strawberry -ErrorAction SilentlyContinue
4344
4445
- name: Checkout Git Repo
4546
uses: actions/checkout@v5
@@ -78,7 +79,7 @@ jobs:
7879
- name: Start sccache
7980
uses: mozilla-actions/sccache-action@v0.0.9
8081

81-
- name: Build CEmu ${{ matrix.config }} on Windows ${{ matrix.arch_name }}
82+
- name: Build CEmu ${{ matrix.config }} on Windows ${{ matrix.arch }}
8283
uses: lukka/run-cmake@67c73a83a46f86c4e0b96b741ac37ff495478c38 # latest as of 2025-10-04
8384
with:
8485
cmakeListsTxtPath: '${{ github.workspace }}/gui/qt/CMakeLists.txt'
@@ -87,19 +88,19 @@ jobs:
8788
buildPreset: 'Win-${{ matrix.arch }}-${{ matrix.config }}'
8889
env:
8990
VCPKG_DEFAULT_TRIPLET: ${{ matrix.arch }}-windows
90-
VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-static-release
91+
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.arch }}-windows-static-release
9192
VCPKG_FORCE_SYSTEM_BINARIES: 1
9293

93-
- name: Upload ${{ matrix.arch_name }} ${{ matrix.config }} EXE
94+
- name: Upload ${{ matrix.arch }} ${{ matrix.config }} EXE
9495
uses: actions/upload-artifact@v4
9596
with:
96-
name: CEmu_win${{ matrix.arch_suffix }}_master
97+
name: CEmu_win-${{ matrix.arch }}_master
9798
path: ${{ github.workspace }}/gui/qt/CEmu.build/Win-${{ matrix.arch }}/${{ matrix.config }}/CEmu.exe
9899

99100
- name: Prepare binary for release upload
100101
if: ${{ matrix.config == 'Release' }}
101102
run: |
102-
$ReleaseName = "CEmu-nightly_win${{ matrix.arch_suffix }}-msvc.exe"
103+
$ReleaseName = "CEmu-nightly_win-${{ matrix.arch }}-msvc.exe"
103104
Rename-Item -Path "${{ github.workspace }}/gui/qt/CEmu.build/Win-${{ matrix.arch }}/${{ matrix.config }}/CEmu.exe" -NewName $ReleaseName
104105
echo "RELEASE_NAME=$ReleaseName" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
105106

gui/qt/CMakePresets.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@
8787
}
8888
}
8989
},
90+
{
91+
"name": "Win-arm64",
92+
"inherits": [ "ninja-vcpkg-arm64", "win-only" ],
93+
"cacheVariables": {
94+
"VCPKG_TARGET_TRIPLET": {
95+
"type": "STRING",
96+
"value": "arm64-windows-static"
97+
}
98+
}
99+
},
90100
{
91101
"name": "Mac-x64",
92102
"inherits": [ "ninja-vcpkg-x64", "mac-only" ],
@@ -144,6 +154,21 @@
144154
"configurePreset": "Win-x64",
145155
"configuration": "Release"
146156
},
157+
{
158+
"name": "Win-arm64-Debug",
159+
"configurePreset": "Win-arm64",
160+
"configuration": "Debug"
161+
},
162+
{
163+
"name": "Win-arm64-RelWithDebInfo",
164+
"configurePreset": "Win-arm64",
165+
"configuration": "RelWithDebInfo"
166+
},
167+
{
168+
"name": "Win-arm64-Release",
169+
"configurePreset": "Win-arm64",
170+
"configuration": "Release"
171+
},
147172
{
148173
"name": "Mac-x64-Debug",
149174
"configurePreset": "Mac-x64",

0 commit comments

Comments
 (0)