Skip to content

Commit 0ddb06d

Browse files
committed
Add support for Windows ARM64 architecture
1 parent a5c69f3 commit 0ddb06d

File tree

3 files changed

+46
-3
lines changed

3 files changed

+46
-3
lines changed

.github/workflows/nuget.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,16 @@ jobs:
3838
cd CSFML/tools/nuget
3939
./build.win.ps1 "win-x64"
4040
41+
- name: Build ARM64
42+
shell: pwsh
43+
run: |
44+
cd CSFML/tools/nuget
45+
./build.win.ps1 "win-arm64"
46+
4147
- name: Upload Artifact
4248
uses: actions/upload-artifact@v4
4349
with:
44-
name: CSFML-win-x86-x64
50+
name: CSFML-win-x86-x64-arm64
4551
path: CSFML/tools/nuget/CSFML/runtimes
4652

4753
linux-x64:
@@ -214,7 +220,7 @@ jobs:
214220

215221
package:
216222
name: Package Builds
217-
runs-on: ubuntu-22.04
223+
runs-on: ubuntu-24.04
218224
needs:
219225
- windows
220226
- linux-x64

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,39 @@ jobs:
192192
name: CSFML-windows-64-bit
193193
path: install/CSFML
194194

195+
windows-arm64:
196+
name: Windows ARM64
197+
runs-on: windows-2025
198+
199+
steps:
200+
- name: Checkout SFML
201+
uses: actions/checkout@v4
202+
with:
203+
repository: SFML/SFML
204+
ref: 3.0.1
205+
path: SFML
206+
207+
- name: Checkout CSFML
208+
uses: actions/checkout@v4
209+
with:
210+
path: CSFML
211+
212+
- name: Build SFML
213+
run: |
214+
cmake -S SFML -B SFML-build -A ARM64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/SFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
215+
cmake --build SFML-build --config Release --target install
216+
217+
- name: Build CSFML
218+
run: |
219+
cmake -S CSFML -B CSFML-build -A ARM64 -G "Visual Studio 17 2022" -DBUILD_SHARED_LIBS=ON -DCSFML_LINK_SFML_STATICALLY=OFF -DCMAKE_BUILD_TYPE=Release -DSFML_ROOT=${{ github.workspace }}/SFML-install -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/CSFML-install -DCMAKE_VERBOSE_MAKEFILE=ON
220+
cmake --build CSFML-build --config Release --target install
221+
222+
- name: Upload Artifact
223+
uses: actions/upload-artifact@v4
224+
with:
225+
name: CSFML-windows-arm64
226+
path: install/CSFML
227+
195228
macos-x64:
196229
name: macOS x64
197230
runs-on: macos-13

tools/nuget/build.win.ps1

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,17 @@ if (-not $RID) {
1818

1919
$Generator = 'Visual Studio 17 2022'
2020

21+
# See also: https://learn.microsoft.com/en-us/dotnet/core/rid-catalog#known-rids
2122
switch ($RID) {
2223
'win-x86' {
2324
$Architecture = 'Win32'
2425
}
2526
'win-x64' {
2627
$Architecture = 'x64'
2728
}
29+
'win-arm64' {
30+
$Architecture = 'ARM64'
31+
}
2832
Default {
2933
Write-Error "Unknown RID '$RID'"
3034
exit
@@ -83,7 +87,7 @@ Push-Location "SFML"
8387

8488
$SFMLDir = (Get-Item .).FullName
8589

86-
IF ($RID -ne 'win-x86' -and $RID -ne 'win-x64') {
90+
IF ($RID -ne 'win-x86' -and $RID -ne 'win-x64' -and $RID -ne 'win-arm64') {
8791
Write-Error "Unknown RID '$RID'"
8892
exit
8993
}

0 commit comments

Comments
 (0)