Skip to content

Commit 642d5b0

Browse files
committed
ci: Cache VPC and thirdparty artifacts
1 parent 771eefc commit 642d5b0

16 files changed

+125
-12
lines changed

.github/actions/build-shared/action.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,31 @@ runs:
3030
with:
3131
arch: ${{inputs.platform-name}}
3232

33+
- name: Cache VPC output
34+
uses: actions/cache@v4
35+
id: cache-vpc
36+
with:
37+
path: .\external\vpc\out
38+
key: ${{runner.os}}-${{inputs.platform-name}}-${{ hashFiles('.git\modules\external\vpc\refs\heads\main') }}
39+
40+
- name: 'Cache dependencies output for ${{inputs.solution-name}}_${{inputs.platform-name}}.sln'
41+
uses: actions/cache@v4
42+
id: cache-dependencies
43+
with:
44+
path: .\thirdparty\**\out
45+
key: ${{runner.os}}-${{inputs.platform-name}}-${{ hashFiles('.git\modules\thirdparty\**\refs\heads\main') }}
46+
3347
- name: 'Build dependencies for ${{inputs.solution-name}}_${{inputs.platform-name}}.sln'
3448
working-directory: ${{env.GITHUB_WORKSPACE}}
49+
if: steps.cache-dependencies.outputs.cache-hit != 'true'
3550
run: .\build_game_thirdparty.bat ${{inputs.platform-name}}
3651
shell: cmd
3752

53+
- name: Generate build version information
54+
working-directory: ${{env.GITHUB_WORKSPACE}}
55+
run: .\generate_build_info.bat
56+
shell: cmd
57+
3858
- name: 'Generate solution ${{inputs.solution-name}}_${{inputs.platform-name}}.sln'
3959
working-directory: ${{env.GITHUB_WORKSPACE}}
4060
run: .\create_game_projects.bat ${{inputs.solution-name}} ${{inputs.platform-name}}

build_game_thirdparty.bat

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -332,15 +332,4 @@ if ERRORLEVEL 1 (
332332
POPD
333333

334334

335-
REM Generate version info, etc.
336-
MKDIR out
337-
PUSHD out
338-
cmake ..\CMakeLists.txt
339-
if ERRORLEVEL 1 (
340-
ECHO cmake version generation failed.
341-
EXIT /B 1
342-
)
343-
POPD
344-
345-
346335
EXIT /B 0

create_hammer_x64.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
call create_hammer.bat hammer x64
1016
if ERRORLEVEL 1 (
1117
ECHO Generating x64 hammer_x64.sln failed.

create_hammer_x86.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
call create_hammer.bat hammer x86
1016
if ERRORLEVEL 1 (
1117
ECHO Generating x86 hammer_x86.sln failed.

create_hl2_dev_x64.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
CALL create_game_projects.bat hl2 x64
1016
IF ERRORLEVEL 1 (
1117
ECHO Generating Half-Life 2 x64 hl2.sln failed.

create_hl2_dev_x86.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
CALL create_game_projects.bat hl2 x86
1016
IF ERRORLEVEL 1 (
1117
ECHO Generating Half-Life 2 x86 hl2.sln failed.

create_hl2_ep1_2_dev_x64.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
CALL create_game_projects.bat episodic x64
1016
IF ERRORLEVEL 1 (
1117
ECHO Generating Half-Life 2: Episode 1 & 2 x64 episodic.sln failed.

create_hl2_ep1_2_dev_x86.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
CALL create_game_projects.bat episodic x86
1016
IF ERRORLEVEL 1 (
1117
ECHO Generating Half-Life 2: Episode 1 & 2 x86 episodic.sln failed.

create_hl2_loastcoast_dev_x64.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
CALL create_game_projects.bat loastcoast x64
1016
IF ERRORLEVEL 1 (
1117
ECHO Generating Half-Life 2: Loast Coast x64 hl2_loastcoast.sln failed.

create_hl2_loastcoast_dev_x86.bat

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ IF ERRORLEVEL 1 (
66
EXIT /B 1
77
)
88

9+
CALL generate_build_info.bat
10+
IF ERRORLEVEL 1 (
11+
ECHO Generating build info failed.
12+
EXIT /B 1
13+
)
14+
915
CALL create_game_projects.bat loastcoast x86
1016
IF ERRORLEVEL 1 (
1117
ECHO Generating Half-Life 2: Loast Coast x86 hl2_loastcoast.sln failed.

0 commit comments

Comments
 (0)