Skip to content

Commit 46b7214

Browse files
committed
Add support for Windows ARM64 architecture
1 parent 973c742 commit 46b7214

File tree

3 files changed

+52
-3
lines changed

3 files changed

+52
-3
lines changed

.github/workflows/nuget.yml

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

4652
linux-x64:
@@ -213,7 +219,7 @@ jobs:
213219

214220
package:
215221
name: Package Builds
216-
runs-on: ubuntu-22.04
222+
runs-on: ubuntu-24.04
217223
needs:
218224
- windows
219225
- linux-x64

.github/workflows/release.yml

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

194+
windows-arm64:
195+
name: Windows ARM64
196+
runs-on: windows-2025
197+
198+
steps:
199+
- name: Checkout SFML
200+
uses: actions/checkout@v4
201+
with:
202+
repository: SFML/SFML
203+
ref: ${{ env.SFML_VERSION }}
204+
path: SFML
205+
206+
- name: Checkout CSFML
207+
uses: actions/checkout@v4
208+
with:
209+
path: CSFML
210+
211+
- name: Build SFML
212+
run: |
213+
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
214+
cmake --build SFML-build --config Release --target install
215+
216+
- name: Build CSFML
217+
run: |
218+
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
219+
cmake --build CSFML-build --config Release --target install
220+
221+
- name: Move Files
222+
shell: pwsh
223+
run: |
224+
New-Item -ItemType "directory" -PATH "install\CSFML"
225+
Move-Item -Path "CSFML-install\*" -Destination "install\CSFML"
226+
227+
- name: Upload Artifact
228+
uses: actions/upload-artifact@v4
229+
with:
230+
name: CSFML-windows-arm64
231+
path: install/CSFML
232+
194233
macos-x64:
195234
name: macOS x64
196235
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)