forked from themrdemonized/xray-monolith
-
Notifications
You must be signed in to change notification settings - Fork 0
388 lines (325 loc) · 21.1 KB
/
msbuild.yml
File metadata and controls
388 lines (325 loc) · 21.1 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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: MSBuild
on:
push:
branches: [ "all-in-one-vs2022-wpo" ]
pull_request:
branches: [ "all-in-one-vs2022-wpo" ]
permissions: write-all
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: src/engine-vs2022.sln
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
DX11: DX11
DX10: DX10
DX9: DX9
DX8: DX8
DX11AVX: DX11-AVX
DX10AVX: DX10-AVX
DX9AVX: DX9-AVX
DX8AVX: DX8-AVX
PACK_GAMEDATA_NAME: 00_modded_exes_gamedata.db0
jobs:
pack_gamedata:
name: pack_gamedata
runs-on: windows-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Pack gamedata
run: |
new-item -path "./compressor/gamedata" -itemtype directory -force
copy-item -path "./gamedata/*" -destination "./compressor/gamedata" -recurse -force
cd ./compressor
start-process -filepath "./! compress_gamedata.cmd" -Wait
rename-item -path gamedata.db0 -newname ${{env.PACK_GAMEDATA_NAME}}
- name: Upload gamedata
uses: actions/upload-artifact@v4.6.0
with:
# Artifact name
name: ${{env.PACK_GAMEDATA_NAME}}
# A file, directory or wildcard pattern that describes what to upload
path: ./compressor/${{env.PACK_GAMEDATA_NAME}}
# The desired behavior if no files are found using the provided path. Available Options:
# warn: Output a warning but do not fail the action
# error: Fail the action with an error message
# ignore: Do not output any warnings or errors, the action does not fail
if-no-files-found: "error"
# Duration after which artifact will expire in days. 0 means using default retention. Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
retention-days: 1
build:
name: build-job
runs-on: windows-latest
strategy:
matrix:
buildconf: ["DX11", "DX10", "DX9", "DX8", "DX11-AVX", "DX10-AVX", "DX9-AVX", "DX8-AVX"]
steps:
- name: Configure Pagefile
# You may pin to the exact commit or the version.
# uses: al-cheb/configure-pagefile-action@86589fd789a4de3e62ba628dda2cb10027b66d67
uses: al-cheb/configure-pagefile-action@v1.3
with:
# Set minimum size of Pagefile
minimum-size: 8GB
# Set maximum size of Pagefile
maximum-size: 8GB
# Set disk root where pagefile.sys will be located
disk-root: "C:"
- name: Checkout repo
uses: actions/checkout@v4
# with:
# ref: all-in-one-vs2022
- name: Init submodules
uses: snickerbockers/submodules-init@v4
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1.3.1
with:
# Version of Visual Studio to search; defaults to latest if not specified
# vs-version: '[17.6, 17.7)'
# The preferred processor architecture of MSBuild. Can be either "x86", "x64", or "arm64". "x64" is only available from Visual Studio version 17.0 and later.
msbuild-architecture: "x64"
- name: Add Dependencies
run: |
cd "C:\Program Files (x86)\Microsoft Visual Studio\Installer"
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.ATLMFC","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.14.36.17.6.ATL","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.14.36.17.6.MFC","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Windows10SDK","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Windows11SDK.22000","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Windows10SDK.20348","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.Component.VC.Runtime.UCRTSDK","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.ASAN","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.ATL","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Vcpkg","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# - name: Fake Build ${{matrix.buildconf}}
# working-directory: ${{env.GITHUB_WORKSPACE}}
# run: |
# New-Item -Type Directory -Path "./_build/_game/bin_dbg"
# New-Item -Path "./_build/_game/bin_dbg/${{matrix.buildconf}}.exe"
# New-Item -Path "./_build/_game/bin_dbg/${{matrix.buildconf}}.pdb"
- name: Build ${{matrix.buildconf}}
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /p:Configuration=${{matrix.buildconf}} ${{env.SOLUTION_FILE_PATH}}
- name: Upload Exe
uses: actions/upload-artifact@v4.6.0
with:
# Artifact name
name: ${{matrix.buildconf}}_exe
# A file, directory or wildcard pattern that describes what to upload
path: ./_build/_game/bin_dbg/*.exe
# The desired behavior if no files are found using the provided path. Available Options:
# warn: Output a warning but do not fail the action
# error: Fail the action with an error message
# ignore: Do not output any warnings or errors, the action does not fail
if-no-files-found: "error"
# Duration after which artifact will expire in days. 0 means using default retention. Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
retention-days: 1
- name: Zip PDB
run: |
cd ./_build/_game/bin_dbg
compress-archive -DestinationPath "STALKER-Anomaly-modded-exes_${{matrix.buildconf}}_pdb.zip" -Path "./*.pdb"
- name: Upload PDB
uses: actions/upload-artifact@v4.6.0
with:
# Artifact name
name: ${{matrix.buildconf}}_pdb
# A file, directory or wildcard pattern that describes what to upload
path: ./_build/_game/bin_dbg/*.zip
# The desired behavior if no files are found using the provided path. Available Options:
# warn: Output a warning but do not fail the action
# error: Fail the action with an error message
# ignore: Do not output any warnings or errors, the action does not fail
if-no-files-found: "error"
# Duration after which artifact will expire in days. 0 means using default retention. Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
retention-days: 1
build_mt:
name: build-mt-job
runs-on: windows-latest
strategy:
matrix:
buildconf: ["DX11", "DX10", "DX9", "DX8", "DX11-AVX", "DX10-AVX", "DX9-AVX", "DX8-AVX"]
steps:
- name: Configure Pagefile
# You may pin to the exact commit or the version.
# uses: al-cheb/configure-pagefile-action@86589fd789a4de3e62ba628dda2cb10027b66d67
uses: al-cheb/configure-pagefile-action@v1.3
with:
# Set minimum size of Pagefile
minimum-size: 8GB
# Set maximum size of Pagefile
maximum-size: 8GB
# Set disk root where pagefile.sys will be located
disk-root: "C:"
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: all-in-one-vs2022-wpo-mt
- name: Init submodules
uses: snickerbockers/submodules-init@v4
- name: setup-msbuild
uses: microsoft/setup-msbuild@v1.3.1
with:
# Version of Visual Studio to search; defaults to latest if not specified
# vs-version: '[17.6, 17.7)'
# The preferred processor architecture of MSBuild. Can be either "x86", "x64", or "arm64". "x64" is only available from Visual Studio version 17.0 and later.
msbuild-architecture: "x64"
- name: Add Dependencies
run: |
cd "C:\Program Files (x86)\Microsoft Visual Studio\Installer"
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.ATLMFC","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.14.36.17.6.x86.x64","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.14.36.17.6.ATL","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.14.36.17.6.MFC","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Windows10SDK","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Windows11SDK.22000","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Windows10SDK.20348","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.Component.VC.Runtime.UCRTSDK","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.ASAN","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.ATL","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.Redist.14.Latest","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.VC.Tools.x86.x64","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# Start-Process -FilePath .\setup.exe -ArgumentList "modify","--add","Microsoft.VisualStudio.Component.Vcpkg","--includeRecommended","--includeOptional","--channelId","VisualStudio.17.Release","--productId","Microsoft.VisualStudio.Product.Enterprise","--quiet","--norestart" -Wait -PassThru
# - name: Fake Build ${{matrix.buildconf}}
# working-directory: ${{env.GITHUB_WORKSPACE}}
# run: |
# New-Item -Type Directory -Path "./_build/_game/bin_dbg"
# New-Item -Path "./_build/_game/bin_dbg/${{matrix.buildconf}}_mt.exe"
# New-Item -Path "./_build/_game/bin_dbg/${{matrix.buildconf}}_mt.pdb"
- name: Build ${{matrix.buildconf}}
working-directory: ${{env.GITHUB_WORKSPACE}}
# Add additional options to the MSBuild command line here (like platform or verbosity level).
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
run: msbuild /p:Configuration=${{matrix.buildconf}} ${{env.SOLUTION_FILE_PATH}}
- name: Upload Exe
uses: actions/upload-artifact@v4.6.0
with:
# Artifact name
name: ${{matrix.buildconf}}_mt_exe
# A file, directory or wildcard pattern that describes what to upload
path: ./_build/_game/bin_dbg/*.exe
# The desired behavior if no files are found using the provided path. Available Options:
# warn: Output a warning but do not fail the action
# error: Fail the action with an error message
# ignore: Do not output any warnings or errors, the action does not fail
if-no-files-found: "error"
# Duration after which artifact will expire in days. 0 means using default retention. Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
retention-days: 1
- name: Zip PDB
run: |
cd ./_build/_game/bin_dbg
compress-archive -DestinationPath "STALKER-Anomaly-modded-exes_${{matrix.buildconf}}_mt_pdb.zip" -Path "./*.pdb"
- name: Upload PDB
uses: actions/upload-artifact@v4.6.0
with:
# Artifact name
name: ${{matrix.buildconf}}_mt_pdb
# A file, directory or wildcard pattern that describes what to upload
path: ./_build/_game/bin_dbg/*.zip
# The desired behavior if no files are found using the provided path. Available Options:
# warn: Output a warning but do not fail the action
# error: Fail the action with an error message
# ignore: Do not output any warnings or errors, the action does not fail
if-no-files-found: "error"
# Duration after which artifact will expire in days. 0 means using default retention. Minimum 1 day. Maximum 90 days unless changed from the repository settings page.
retention-days: 1
release:
needs: [pack_gamedata, build, build_mt]
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# with:
# ref: all-in-one-vs2022
- name: Get Datetime
id: datetime
run: echo "::set-output name=today::$(date +'%-Y.%-m.%-d')"
# Use the output from the `datetime` step
- name: Get Version
run: echo "VERSION ${{steps.datetime.outputs.today}}"
env:
VERSION: "${{steps.datetime.outputs.today}}"
- name: Download artifacts
uses: actions/download-artifact@v4.1.8
- name: Zip Exe folder
run: |
mkdir release
mkdir release/bin
mkdir release/db
mkdir release/db/mods
mkdir release_mt
mkdir release_mt/bin
mkdir release_mt/db
mkdir release_mt/db/mods
cp ${{env.PACK_GAMEDATA_NAME}}/*.db0 release/db/mods
mv ${{env.PACK_GAMEDATA_NAME}}/*.db0 release_mt/db/mods
mv ${{env.DX11}}_exe/*.exe release/bin
mv ${{env.DX10}}_exe/*.exe release/bin
mv ${{env.DX9}}_exe/*.exe release/bin
mv ${{env.DX8}}_exe/*.exe release/bin
mv ${{env.DX11AVX}}_exe/*.exe release/bin
mv ${{env.DX10AVX}}_exe/*.exe release/bin
mv ${{env.DX9AVX}}_exe/*.exe release/bin
mv ${{env.DX8AVX}}_exe/*.exe release/bin
mv ${{env.DX11}}_mt_exe/*.exe release_mt/bin
mv ${{env.DX10}}_mt_exe/*.exe release_mt/bin
mv ${{env.DX9}}_mt_exe/*.exe release_mt/bin
mv ${{env.DX8}}_mt_exe/*.exe release_mt/bin
mv ${{env.DX11AVX}}_mt_exe/*.exe release_mt/bin
mv ${{env.DX10AVX}}_mt_exe/*.exe release_mt/bin
mv ${{env.DX9AVX}}_mt_exe/*.exe release_mt/bin
mv ${{env.DX8AVX}}_mt_exe/*.exe release_mt/bin
cd release
zip -r 'STALKER-Anomaly-modded-exes_${{steps.datetime.outputs.today}}.zip' ./*
mv 'STALKER-Anomaly-modded-exes_${{steps.datetime.outputs.today}}.zip' ../
cd ..
cd release_mt
zip -r 'STALKER-Anomaly-modded-exes-MT-TEST_${{steps.datetime.outputs.today}}.zip' ./*
mv 'STALKER-Anomaly-modded-exes-MT-TEST_${{steps.datetime.outputs.today}}.zip' ../
cd ..
env:
RELEASE_NAME_FULL: "${{steps.datetime.outputs.today}}"
- name: Move PDBs to folder
run: |
mkdir pdb
mv ${{env.DX11}}_pdb/*.zip pdb
mv ${{env.DX10}}_pdb/*.zip pdb
mv ${{env.DX9}}_pdb/*.zip pdb
mv ${{env.DX8}}_pdb/*.zip pdb
mv ${{env.DX11AVX}}_pdb/*.zip pdb
mv ${{env.DX10AVX}}_pdb/*.zip pdb
mv ${{env.DX9AVX}}_pdb/*.zip pdb
mv ${{env.DX8AVX}}_pdb/*.zip pdb
mv ${{env.DX11}}_mt_pdb/*.zip pdb
mv ${{env.DX10}}_mt_pdb/*.zip pdb
mv ${{env.DX9}}_mt_pdb/*.zip pdb
mv ${{env.DX8}}_mt_pdb/*.zip pdb
mv ${{env.DX11AVX}}_mt_pdb/*.zip pdb
mv ${{env.DX10AVX}}_mt_pdb/*.zip pdb
mv ${{env.DX9AVX}}_mt_pdb/*.zip pdb
mv ${{env.DX8AVX}}_mt_pdb/*.zip pdb
- name: Publish
uses: softprops/action-gh-release@v2.3.2
with:
files: |
*.zip
pdb/*.zip
tag_name: "${{steps.datetime.outputs.today}}"
generate_release_notes: true
token: "${{ secrets.GITHUB_TOKEN }}"
- name: Remove artifacts
# You may pin to the exact commit or the version.
# uses: c-hive/gha-remove-artifacts@24dc23384a1fa6a058b79c73727ae0cb2200ca4c
uses: c-hive/gha-remove-artifacts@v1.2.0
with:
# Artifacts older than this will be deleted (e.g. "2 months", "1 day"). Parsed by moment.
age: "1 second"