5454 - uses : actions/checkout@v4
5555
5656 - name : Add MSBuild to PATH
57- uses : microsoft/ setup-msbuild@v1.1
57+ uses : compnerd/gha- setup-vsdevenv@v6
5858
5959 - name : Enable VS2022
6060 working-directory : ' ${{inputs.branch}}/src/vpc_scripts'
@@ -77,108 +77,40 @@ jobs:
7777
7878 # --------------------------------------------------------------------
7979
80- # "I'm invoking msbuild for each project individually, which looks a bit odd considering there is a solution file which should be able to invoke the builds in their proper order automatically, but passing the solution to msbuild doesn't seem to work."
81- # https://github.com/mapbase-source/source-sdk-2013/pull/162
82-
83- - name : Build mathlib
80+ - name : Build
8481 # if: steps.filter.outputs.game == 'true'
8582 working-directory : ' ${{inputs.branch}}/src'
8683 shell : cmd
8784 run : |
88- msbuild -m -p:Configuration=${{inputs.configuration}} mathlib\mathlib.vcxproj || exit /b
89-
90- - name : Build Base Libraries
91- if : inputs.project-group == 'all' || inputs.project-group == 'game' || inputs.project-group == 'maptools'
92- working-directory : ' ${{inputs.branch}}/src'
93- shell : cmd
94- run : |
95- msbuild -m -p:Configuration=${{inputs.configuration}} raytrace\raytrace.vcxproj || exit /b
96- msbuild -m -p:Configuration=${{inputs.configuration}} tier1\tier1.vcxproj || exit /b
97- msbuild -m -p:Configuration=${{inputs.configuration}} vscript\vscript.vcxproj || exit /b
98-
99- - name : Build Map Tools
100- if : inputs.project-group == 'all' || inputs.project-group == 'maptools'
101- working-directory : ' ${{inputs.branch}}/src'
102- shell : cmd
103- run : |
104- msbuild -m -p:Configuration=${{inputs.configuration}} fgdlib\fgdlib.vcxproj || exit /b
105- msbuild -m -p:Configuration=${{inputs.configuration}} utils\vbsp\vbsp.vcxproj || exit /b
106- msbuild -m -p:Configuration=${{inputs.configuration}} utils\vvis\vvis_dll.vcxproj || exit /b
107- msbuild -m -p:Configuration=${{inputs.configuration}} utils\vvis_launcher\vvis_launcher.vcxproj || exit /b
108- msbuild -m -p:Configuration=${{inputs.configuration}} utils\vrad\vrad_dll.vcxproj || exit /b
109- msbuild -m -p:Configuration=${{inputs.configuration}} utils\vrad_launcher\vrad_launcher.vcxproj || exit /b
110-
111- - name : Build Shaders
112- if : inputs.project-group == 'shaders'
113- working-directory : ' ${{inputs.branch}}/src'
114- shell : cmd
115- run : |
116- msbuild -m -p:Configuration=${{inputs.configuration}} materialsystem\stdshaders\game_shader_dx9_${{inputs.game}}.vcxproj || exit /b
117-
118- - name : Build Game
119- if : inputs.project-group == 'game'
120- working-directory : ' ${{inputs.branch}}/src'
121- shell : cmd
122- run : |
123- msbuild -m -p:Configuration=${{inputs.configuration}} vgui2\vgui_controls\vgui_controls.vcxproj || exit /b
124- msbuild -m -p:Configuration=${{inputs.configuration}} responserules\runtime\responserules.vcxproj || exit /b
125- msbuild -m -p:Configuration=${{inputs.configuration}} game\client\client_${{inputs.game}}.vcxproj || exit /b
126- msbuild -m -p:Configuration=${{inputs.configuration}} game\server\server_${{inputs.game}}.vcxproj || exit /b
127-
128- # TODO: Hook to game naming?
129- - name : Build everything
130- if : inputs.project-group == 'all'
131- working-directory : ' ${{inputs.branch}}/src'
132- shell : cmd
133- run : |
134- msbuild -m -p:Configuration=${{inputs.configuration}} vgui2\vgui_controls\vgui_controls.vcxproj || exit /b
135- msbuild -m -p:Configuration=${{inputs.configuration}} responserules\runtime\responserules.vcxproj || exit /b
136- msbuild -m -p:Configuration=${{inputs.configuration}} materialsystem\stdshaders\game_shader_dx9_episodic.vcxproj || exit /b
137- msbuild -m -p:Configuration=${{inputs.configuration}} materialsystem\stdshaders\game_shader_dx9_hl2.vcxproj || exit /b
138- msbuild -m -p:Configuration=${{inputs.configuration}} game\client\client_episodic.vcxproj || exit /b
139- msbuild -m -p:Configuration=${{inputs.configuration}} game\client\client_hl2.vcxproj || exit /b
140- msbuild -m -p:Configuration=${{inputs.configuration}} game\server\server_episodic.vcxproj || exit /b
141- msbuild -m -p:Configuration=${{inputs.configuration}} game\server\server_hl2.vcxproj || exit /b
85+ devenv ${{inputs.solution-name}}.sln /upgrade
86+ msbuild -m -t:Rebuild -p:Configuration=${{inputs.configuration}};Platform=x86 ${{inputs.solution-name}}.sln
14287
14388 # --------------------------------------------------------------------
14489
145- - name : Publish Windows game DLLs
146- if : inputs.project-group == 'game'
147- uses : actions/upload-artifact@v3
148- with :
149- name : ' Windows Game DLLs (server & client.dll) [${{ inputs.configuration }}]'
150- path : |
151- ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/client.dll
152- ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/server.dll
153- if-no-files-found : error
154-
155- - name : Publish Windows shader DLL
156- if : inputs.project-group == 'shaders'
157- uses : actions/upload-artifact@v3
90+ - name : Publish game binaries
91+ if : inputs.project-group == 'game' || inputs.project-group == 'shaders'
92+ uses : actions/upload-artifact@v4
15893 with :
159- name : ' Windows Shader DLL (game_shader_dx9.dll) [ ${{ inputs.configuration }}] '
94+ name : ' ${{inputs.project-group}}_ ${{inputs.game}}_win32_${{ inputs.configuration }}'
16095 path : |
161- ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/game_shader_dx9 .dll
96+ ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/* .dll
16297 if-no-files-found : error
16398
164- - name : Publish Windows map tools
99+ - name : Publish map tools
165100 if : inputs.project-group == 'maptools'
166- uses : actions/upload-artifact@v3
101+ uses : actions/upload-artifact@v4
167102 with :
168- name : ' Windows Map Tools [ ${{ inputs.configuration }}] '
103+ name : ' ${{inputs.project-group}}_win32_${{ inputs.configuration }}'
169104 path : |
170- ${{inputs.branch}}/game/bin/vbsp.exe
171- ${{inputs.branch}}/game/bin/vvis.exe
172- ${{inputs.branch}}/game/bin/vvis_dll.dll
173- ${{inputs.branch}}/game/bin/vrad.exe
174- ${{inputs.branch}}/game/bin/vrad_dll.dll
105+ ${{inputs.branch}}/game/bin/*.exe
106+ ${{inputs.branch}}/game/bin/*.dll
175107 if-no-files-found : error
176108
177- - name : Publish everything (Windows)
109+ - name : Publish everything
178110 if : inputs.project-group == 'all'
179- uses : actions/upload-artifact@v3
111+ uses : actions/upload-artifact@v4
180112 with :
181- name : ' Everything (Windows) [ ${{ inputs.configuration }}] '
113+ name : ' everything_win32_ ${{ inputs.configuration }}'
182114 path : |
183115 ${{inputs.branch}}/game/bin
184116 ${{inputs.branch}}/game/mod_*/bin
@@ -225,30 +157,21 @@ jobs:
225157
226158 # --------------------------------------------------------------------
227159
228- - name : Publish Linux game SOs
229- if : inputs.project-group == 'game'
230- uses : actions/upload-artifact@v3
231- with :
232- name : ' Linux Game SOs (server & client.so) [${{ inputs.configuration }}]'
233- path : |
234- ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/client.so
235- ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/server.so
236- if-no-files-found : error
237-
238- - name : Publish Linux shader SO
239- if : inputs.project-group == 'shaders'
240- uses : actions/upload-artifact@v3
160+ - name : Publish game binaries
161+ if : inputs.project-group == 'game' || inputs.project-group == 'shaders'
162+ uses : actions/upload-artifact@v4
241163 with :
242- name : ' Linux Shader SO (game_shader_dx9.so) [ ${{ inputs.configuration }}] '
164+ name : ' ${{inputs.project-group}}_ ${{inputs.game}}_linux32_${{ inputs.configuration }}'
243165 path : |
244- ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/game_shader_dx9.so
166+ ${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*.so
167+ !${{inputs.branch}}/game/mod_${{inputs.game}}/bin/*_srv.so
245168 if-no-files-found : error
246169
247- # - name: Publish Linux map tools
170+ # - name: Publish map tools
248171 # if: inputs.project-group == 'maptools'
249- # uses: actions/upload-artifact@v3
172+ # uses: actions/upload-artifact@v4
250173 # with:
251- # name: 'Linux Map Tools [ ${{ inputs.configuration }}] '
174+ # name: '${{inputs.project-group}}_linux32_${{ inputs.configuration }}'
252175 # path: |
253176 # ${{inputs.branch}}/game/bin/vbsp
254177 # ${{inputs.branch}}/game/bin/vvis
@@ -259,11 +182,11 @@ jobs:
259182
260183 # For now, don't publish the .dbg files even though we publish .pdb files on Windows
261184 # (they're too big)
262- - name : Publish everything (Linux)
185+ - name : Publish everything
263186 if : inputs.project-group == 'all'
264- uses : actions/upload-artifact@v3
187+ uses : actions/upload-artifact@v4
265188 with :
266- name : ' Everything (Linux) [ ${{ inputs.configuration }}] '
189+ name : ' everything_linux32_ ${{ inputs.configuration }}'
267190 path : |
268191 ${{inputs.branch}}/game/bin/*.so
269192 !${{inputs.branch}}/game/bin/*_srv.so
0 commit comments