Skip to content

Commit 3681426

Browse files
committed
Support windows arm64
1 parent 641956d commit 3681426

File tree

4 files changed

+64
-6
lines changed

4 files changed

+64
-6
lines changed
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Windows Build Combine
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build-windows-combined:
8+
name: Combine Windows binaries
9+
timeout-minutes: 15
10+
runs-on: windows-latest
11+
steps:
12+
- name: Fetch x64 build
13+
uses: actions/download-artifact@v4
14+
with:
15+
name: librealm-windows-x64
16+
path: packages/realm_dart/binary/windows
17+
18+
- name: Fetch arm64 build
19+
uses: actions/download-artifact@v4
20+
with:
21+
name: librealm-windows-arme64
22+
path: packages/realm_dart/binary/windows
23+
24+
- name: Store combined artifact
25+
uses: actions/upload-artifact@v4
26+
with:
27+
name: librealm-windows
28+
path: packages/realm_dart/binary/windows
29+
retention-days: 1
30+
31+
- name: Delete individual build artifacts
32+
uses: geekyeggo/delete-artifact@v4
33+
with:
34+
name: |
35+
librealm-windows-x64
36+
librealm-windows-arm64
37+
failOnError: false

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
with:
2222
runner: windows-latest
2323
binary: windows
24-
build: '["windows"]'
24+
build: '["windows-x64", "windows-arm64"]'
2525

2626
build-macos:
2727
name: Build MacOS

packages/realm_dart/CMakePresets.json

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,22 @@
2828
"name": "windows",
2929
"inherits": "default",
3030
"generator": "Visual Studio 17 2022",
31-
"architecture": "x64",
3231
"condition": {
3332
"lhs": "${hostSystemName}",
3433
"type": "equals",
3534
"rhs": "Windows"
3635
}
3736
},
37+
{
38+
"name": "windows-x64",
39+
"inherits": "windows",
40+
"architecture": "x64"
41+
},
42+
{
43+
"name": "windows-arm64",
44+
"inherits": "windows",
45+
"architecture": "ARM64"
46+
},
3847
{
3948
"name": "macos",
4049
"displayName": "macOS",
@@ -125,11 +134,17 @@
125134
"configuration": "Debug"
126135
},
127136
{
128-
"name": "windows",
129-
"configurePreset": "windows",
137+
"name": "windows-x64",
138+
"configurePreset": "windows-x64",
130139
"displayName": "x64",
131140
"configuration": "Debug"
132141
},
142+
{
143+
"name": "windows-arm64",
144+
"configurePreset": "windows-arm64",
145+
"displayName": "arm64",
146+
"configuration": "Debug"
147+
},
133148
{
134149
"name": "android-x86_64",
135150
"configurePreset": "android-x86_64",

packages/realm_dart/scripts/build.bat

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,11 @@
77
pushd "%~dp0.."
88
echo %CD%
99

10-
cmake --preset windows
11-
cmake --build --preset windows --config MinSizeRel
10+
@REM only building for x64 if no arguments
11+
set ABIS=x64 arm64
12+
if [%1]==[] set ABIS=x64
13+
14+
(for %%a in (%ABIS%) do (
15+
cmake --preset windows-%%a
16+
cmake --build --preset windows-%%a --config MinSizeRel
17+
))

0 commit comments

Comments
 (0)