-
-
Notifications
You must be signed in to change notification settings - Fork 3
155 lines (133 loc) · 8.62 KB
/
vs-build-on-windows.yaml
File metadata and controls
155 lines (133 loc) · 8.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
name: Build release on Windows
on:
workflow_dispatch:
jobs:
build:
runs-on: windows-2025-vs2026
strategy:
matrix:
configuration: [Debug, Release]
platform: [x64, x86]
steps:
- uses: actions/checkout@v6
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v3
with:
vs-version: "18.0" # VS 2026
msbuild-architecture: x64
- name: Build SDL3
run: msbuild ".\vendor\SDL3\VisualC\SDL.sln" /t:SDL3:Rebuild /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform == 'x86' && 'Win32' || matrix.platform }}
- name: Build solution
run: msbuild ".\vc\InputFusion.sln" /t:"InputFusion:Rebuild;GameInput:Rebuild;XInput:Rebuild;DInput8:Rebuild;DInput:Rebuild;WinMM:Rebuild" /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
- name: Upload build outputs
uses: actions/upload-artifact@v6
with:
name: build-${{ matrix.configuration }}-${{ matrix.platform }}
path: build/**/output/**/*.dll
compression-level: 0
package:
runs-on: windows-latest
needs: build
steps:
- uses: actions/checkout@v6
- name: Download all build artifacts
uses: actions/download-artifact@v8
with:
pattern: build-*
merge-multiple: true
path: build
- name: Install 7-Zip
run: choco install 7zip -y
- name: Create 7z Archive
id: create-archive
shell: powershell
run: |
$name = "${{ github.repository }}" -split '/' | Select-Object -Last 1
$archivePath = ".\build\$name.7z"
$tmp = ".\build\release"
Remove-Item $tmp -Recurse -Force -ErrorAction SilentlyContinue
New-Item -ItemType Directory -Path $tmp | Out-Null
# InputFusion
New-Item -ItemType Directory -Path "$tmp\InputFusion" | Out-Null
New-Item -ItemType Directory -Path "$tmp\InputFusion\x64" | Out-Null
New-Item -ItemType Directory -Path "$tmp\InputFusion\x64\Debug" | Out-Null
New-Item -ItemType Directory -Path "$tmp\InputFusion\x86" | Out-Null
New-Item -ItemType Directory -Path "$tmp\InputFusion\x86\Debug" | Out-Null
Copy-Item ".\build\InputFusion\output\x64\Release\InputFusion.dll" "$tmp\InputFusion\x64" -Force
Copy-Item ".\build\InputFusion\output\x64\Release\InputFusion.dll" "$tmp\InputFusion\x64\InputFusion.asi" -Force
Copy-Item ".\build\InputFusion\output\x64\Debug\InputFusion.dll" "$tmp\InputFusion\x64\Debug" -Force
Copy-Item ".\build\InputFusion\output\x64\Debug\InputFusion.dll" "$tmp\InputFusion\x64\Debug\InputFusion.asi" -Force
Copy-Item ".\build\InputFusion\output\Win32\Release\InputFusion.dll" "$tmp\InputFusion\x86" -Force
Copy-Item ".\build\InputFusion\output\Win32\Release\InputFusion.dll" "$tmp\InputFusion\x86\InputFusion.asi" -Force
Copy-Item ".\build\InputFusion\output\Win32\Debug\InputFusion.dll" "$tmp\InputFusion\x86\Debug" -Force
Copy-Item ".\build\InputFusion\output\Win32\Debug\InputFusion.dll" "$tmp\InputFusion\x86\Debug\InputFusion.asi" -Force
# GameInput
New-Item -ItemType Directory -Path "$tmp\GameInput" | Out-Null
New-Item -ItemType Directory -Path "$tmp\GameInput\x64" | Out-Null
New-Item -ItemType Directory -Path "$tmp\GameInput\x64\Debug" | Out-Null
New-Item -ItemType Directory -Path "$tmp\GameInput\x86" | Out-Null
New-Item -ItemType Directory -Path "$tmp\GameInput\x86\Debug" | Out-Null
Copy-Item ".\build\GameInput\output\x64\Release\gameinput.dll" "$tmp\GameInput\x64" -Force
Copy-Item ".\build\GameInput\output\x64\Debug\gameinput.dll" "$tmp\GameInput\x64\Debug" -Force
Copy-Item ".\build\GameInput\output\Win32\Release\gameinput.dll" "$tmp\GameInput\x86" -Force
Copy-Item ".\build\GameInput\output\Win32\Debug\gameinput.dll" "$tmp\GameInput\x86\Debug" -Force
# XInput
New-Item -ItemType Directory -Path "$tmp\XInput" | Out-Null
New-Item -ItemType Directory -Path "$tmp\XInput\x64" | Out-Null
New-Item -ItemType Directory -Path "$tmp\XInput\x64\Debug" | Out-Null
New-Item -ItemType Directory -Path "$tmp\XInput\x86" | Out-Null
New-Item -ItemType Directory -Path "$tmp\XInput\x86\Debug" | Out-Null
Copy-Item ".\build\XInput\output\x64\Release\xinput1_4.dll" "$tmp\XInput\x64\xinput9_1_0.dll" -Force
Copy-Item ".\build\XInput\output\x64\Release\xinput1_4.dll" "$tmp\XInput\x64\xinput1_3.dll" -Force
Copy-Item ".\build\XInput\output\x64\Release\xinput1_4.dll" "$tmp\XInput\x64\xinput1_4.dll" -Force
Copy-Item ".\build\XInput\output\x64\Debug\xinput1_4.dll" "$tmp\XInput\x64\Debug\xinput9_1_0.dll" -Force
Copy-Item ".\build\XInput\output\x64\Debug\xinput1_4.dll" "$tmp\XInput\x64\Debug\xinput1_3.dll" -Force
Copy-Item ".\build\XInput\output\x64\Debug\xinput1_4.dll" "$tmp\XInput\x64\Debug\xinput1_4.dll" -Force
Copy-Item ".\build\XInput\output\Win32\Release\xinput1_4.dll" "$tmp\XInput\x86\xinput9_1_0.dll" -Force
Copy-Item ".\build\XInput\output\Win32\Release\xinput1_4.dll" "$tmp\XInput\x86\xinput1_3.dll" -Force
Copy-Item ".\build\XInput\output\Win32\Release\xinput1_4.dll" "$tmp\XInput\x86\xinput1_4.dll" -Force
Copy-Item ".\build\XInput\output\Win32\Debug\xinput1_4.dll" "$tmp\XInput\x86\Debug\xinput9_1_0.dll" -Force
Copy-Item ".\build\XInput\output\Win32\Debug\xinput1_4.dll" "$tmp\XInput\x86\Debug\xinput1_3.dll" -Force
Copy-Item ".\build\XInput\output\Win32\Debug\xinput1_4.dll" "$tmp\XInput\x86\Debug\xinput1_4.dll" -Force
# DInput 8
New-Item -ItemType Directory -Path "$tmp\DInput8" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput8\x64" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput8\x64\Debug" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput8\x86" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput8\x86\Debug" | Out-Null
Copy-Item ".\build\DInput8\output\x64\Release\dinput8.dll" "$tmp\DInput8\x64" -Force
Copy-Item ".\build\DInput8\output\x64\Debug\dinput8.dll" "$tmp\DInput8\x64\Debug" -Force
Copy-Item ".\build\DInput8\output\Win32\Release\dinput8.dll" "$tmp\DInput8\x86" -Force
Copy-Item ".\build\DInput8\output\Win32\Debug\dinput8.dll" "$tmp\DInput8\x86\Debug" -Force
# DInput 1-7
New-Item -ItemType Directory -Path "$tmp\DInput 1-7" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput 1-7\x64" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput 1-7\x64\Debug" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput 1-7\x86" | Out-Null
New-Item -ItemType Directory -Path "$tmp\DInput 1-7\x86\Debug" | Out-Null
Copy-Item ".\build\DInput\output\x64\Release\dinput.dll" "$tmp\DInput 1-7\x64" -Force
Copy-Item ".\build\DInput\output\x64\Debug\dinput.dll" "$tmp\DInput 1-7\x64\Debug" -Force
Copy-Item ".\build\DInput\output\Win32\Release\dinput.dll" "$tmp\DInput 1-7\x86" -Force
Copy-Item ".\build\DInput\output\Win32\Debug\dinput.dll" "$tmp\DInput 1-7\x86\Debug" -Force
# WinMM
New-Item -ItemType Directory -Path "$tmp\WinMM" | Out-Null
New-Item -ItemType Directory -Path "$tmp\WinMM\x64" | Out-Null
New-Item -ItemType Directory -Path "$tmp\WinMM\x64\Debug" | Out-Null
New-Item -ItemType Directory -Path "$tmp\WinMM\x86" | Out-Null
New-Item -ItemType Directory -Path "$tmp\WinMM\x86\Debug" | Out-Null
Copy-Item ".\build\WinMM\output\x64\Release\winmm.dll" "$tmp\WinMM\x64" -Force
Copy-Item ".\build\WinMM\output\x64\Debug\winmm.dll" "$tmp\WinMM\x64\Debug" -Force
Copy-Item ".\build\WinMM\output\Win32\Release\winmm.dll" "$tmp\WinMM\x86" -Force
Copy-Item ".\build\WinMM\output\Win32\Debug\winmm.dll" "$tmp\WinMM\x86\Debug" -Force
# Misc
Copy-Item ".\README.md" $tmp -Force
Copy-Item ".\LICENSE" $tmp -Force
& "C:\Program Files\7-Zip\7z.exe" a $archivePath "$tmp\*"
Remove-Item $tmp -Recurse -Force
Write-Output "filepath=$archivePath" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8
- name: Upload release
uses: actions/upload-artifact@v6
with:
name: release
path: ${{ steps.create-archive.outputs.filepath }}
compression-level: 0