|
1 | | -name: Build |
| 1 | +name: 'Build' |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | push: |
|
7 | 7 | branches: [ "master" ] |
8 | 8 |
|
9 | 9 | env: |
10 | | - HL2_SOLUTION_NAME_BASE: hl2 |
11 | | - HL2_LOASTCOAST_SOLUTION_NAME_BASE: loastcoast |
12 | | - HL2_EPISODIC_SOLUTION_NAME_BASE: episodic |
13 | | - HL2_MP_SOLUTION_NAME_BASE: hl2mp |
14 | | - PORTAL_SOLUTION_NAME_BASE: portal |
| 10 | + HL2_SOLUTION_NAME: hl2 |
| 11 | + HL2_LOASTCOAST_SOLUTION_NAME: loastcoast |
| 12 | + HL2_EPISODIC_SOLUTION_NAME: episodic |
| 13 | + HL2_DEATHMATCH_SOLUTION_NAME: hl2mp |
| 14 | + PORTAL_SOLUTION_NAME: portal |
15 | 15 |
|
16 | 16 | permissions: |
17 | 17 | contents: read |
18 | 18 |
|
19 | 19 | jobs: |
20 | 20 | build_hl2: |
21 | | - name: Build Half-Life 2 |
| 21 | + name: 'Build Half-Life 2' |
22 | 22 | runs-on: windows-latest |
23 | 23 | strategy: |
24 | 24 | matrix: |
25 | 25 | platform: [x86, x64] |
26 | 26 | configuration: [Debug, Release] |
27 | 27 |
|
28 | 28 | steps: |
29 | | - - name: Checkout repository and submodules |
| 29 | + - name: 'Checkout Half-Life 2 repo & submodules' |
30 | 30 | uses: actions/checkout@v4 |
31 | 31 | with: |
32 | 32 | submodules: recursive |
33 | 33 |
|
34 | | - - name: Add MSBuild to PATH |
35 | | - uses: microsoft/setup-msbuild@v2 |
| 34 | + - name: 'Setup & build' |
| 35 | + uses: ./.github/actions/build-shared |
36 | 36 | with: |
37 | | - msbuild-architecture: ${{matrix.platform}} |
38 | | - |
39 | | - - name: Add cmake / nmake to PATH |
40 | | - uses: ilammy/msvc-dev-cmd@v1 |
41 | | - with: |
42 | | - arch: ${{matrix.platform}} |
43 | | - |
44 | | - - name: Build dependencies & generate solution |
45 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
46 | | - run: .\create_hl2_dev_${{matrix.platform}}.bat |
47 | | - |
48 | | - - name: Build app |
49 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
50 | | - run: msbuild ${{env.HL2_SOLUTION_NAME_BASE}}_${{matrix.platform}}.sln /m -verbosity:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} |
| 37 | + platform-name: ${{matrix.platform}} |
| 38 | + configuration-name: ${{matrix.configuration}} |
| 39 | + solution-name: ${{env.HL2_SOLUTION_NAME}} |
51 | 40 |
|
52 | 41 | build_hl2_loastcoast: |
53 | | - name: Build Half-Life 2 Loast Coast |
| 42 | + name: 'Build Half-Life 2: Loast Coast' |
54 | 43 | runs-on: windows-latest |
55 | 44 | strategy: |
56 | 45 | matrix: |
57 | 46 | platform: [x86, x64] |
58 | 47 | configuration: [Debug, Release] |
59 | 48 |
|
60 | 49 | steps: |
61 | | - - name: Checkout repository and submodules |
| 50 | + - name: 'Checkout Half-Life 2: Loast Coast repo & submodules' |
62 | 51 | uses: actions/checkout@v4 |
63 | 52 | with: |
64 | 53 | submodules: recursive |
65 | 54 |
|
66 | | - - name: Add MSBuild to PATH |
67 | | - uses: microsoft/setup-msbuild@v2 |
68 | | - with: |
69 | | - msbuild-architecture: ${{matrix.platform}} |
70 | | - |
71 | | - - name: Add cmake / nmake to PATH |
72 | | - uses: ilammy/msvc-dev-cmd@v1 |
| 55 | + - name: 'Setup & build' |
| 56 | + uses: ./.github/actions/build-shared |
73 | 57 | with: |
74 | | - arch: ${{matrix.platform}} |
75 | | - |
76 | | - - name: Build dependencies & generate solution |
77 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
78 | | - run: .\create_hl2_loastcoast_dev_${{matrix.platform}}.bat |
79 | | - |
80 | | - - name: Build app |
81 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
82 | | - run: msbuild ${{env.HL2_LOASTCOAST_SOLUTION_NAME_BASE}}_${{matrix.platform}}.sln /m -verbosity:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} |
| 58 | + platform-name: ${{matrix.platform}} |
| 59 | + configuration-name: ${{matrix.configuration}} |
| 60 | + solution-name: ${{env.HL2_LOASTCOAST_SOLUTION_NAME}} |
83 | 61 |
|
84 | 62 | build_hl2_episodic: |
85 | | - name: Build Half-Life 2 Episode 1 & 2 |
| 63 | + name: 'Build Half-Life 2: Episode 1 & 2' |
86 | 64 | runs-on: windows-latest |
87 | 65 | strategy: |
88 | 66 | matrix: |
89 | 67 | platform: [x86, x64] |
90 | 68 | configuration: [Debug, Release] |
91 | 69 |
|
92 | 70 | steps: |
93 | | - - name: Checkout repository and submodules |
| 71 | + - name: 'Checkout Half-Life 2: Episode 1 & 2 repo & submodules' |
94 | 72 | uses: actions/checkout@v4 |
95 | 73 | with: |
96 | 74 | submodules: recursive |
97 | 75 |
|
98 | | - - name: Add MSBuild to PATH |
99 | | - uses: microsoft/setup-msbuild@v2 |
| 76 | + - name: 'Setup & build' |
| 77 | + uses: ./.github/actions/build-shared |
100 | 78 | with: |
101 | | - msbuild-architecture: ${{matrix.platform}} |
102 | | - |
103 | | - - name: Add cmake / nmake to PATH |
104 | | - uses: ilammy/msvc-dev-cmd@v1 |
105 | | - with: |
106 | | - arch: ${{matrix.platform}} |
107 | | - |
108 | | - - name: Build dependencies & generate solution |
109 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
110 | | - run: .\create_hl2_ep1_2_dev_${{matrix.platform}}.bat |
| 79 | + platform-name: ${{matrix.platform}} |
| 80 | + configuration-name: ${{matrix.configuration}} |
| 81 | + solution-name: ${{env.HL2_EPISODIC_SOLUTION_NAME}} |
111 | 82 |
|
112 | | - - name: Build app |
113 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
114 | | - run: msbuild ${{env.HL2_EPISODIC_SOLUTION_NAME_BASE}}_${{matrix.platform}}.sln /m -verbosity:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} |
115 | | - |
116 | | - build_hl2_mp: |
117 | | - name: Build Half-Life 2 Deathmatch |
| 83 | + build_hl2_deathmatch: |
| 84 | + name: 'Build Half-Life 2: Deathmatch' |
118 | 85 | runs-on: windows-latest |
119 | 86 | strategy: |
120 | 87 | matrix: |
121 | 88 | platform: [x86, x64] |
122 | 89 | configuration: [Debug, Release] |
123 | 90 |
|
124 | 91 | steps: |
125 | | - - name: Checkout repository and submodules |
| 92 | + - name: 'Checkout Half-Life 2: Deathmatch repo & submodules' |
126 | 93 | uses: actions/checkout@v4 |
127 | 94 | with: |
128 | 95 | submodules: recursive |
129 | 96 |
|
130 | | - - name: Add MSBuild to PATH |
131 | | - uses: microsoft/setup-msbuild@v2 |
132 | | - with: |
133 | | - msbuild-architecture: ${{matrix.platform}} |
134 | | - |
135 | | - - name: Add cmake / nmake to PATH |
136 | | - uses: ilammy/msvc-dev-cmd@v1 |
| 97 | + - name: 'Setup & build' |
| 98 | + uses: ./.github/actions/build-shared |
137 | 99 | with: |
138 | | - arch: ${{matrix.platform}} |
139 | | - |
140 | | - - name: Build dependencies & generate solution |
141 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
142 | | - run: .\create_hl2_mp_dev_${{matrix.platform}}.bat |
143 | | - |
144 | | - - name: Build app |
145 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
146 | | - run: msbuild ${{env.HL2_MP_SOLUTION_NAME_BASE}}_${{matrix.platform}}.sln /m -verbosity:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} |
| 100 | + platform-name: ${{matrix.platform}} |
| 101 | + configuration-name: ${{matrix.configuration}} |
| 102 | + solution-name: ${{env.HL2_DEATHMATCH_SOLUTION_NAME}} |
147 | 103 |
|
148 | 104 | build_portal: |
149 | | - name: Build Portal |
| 105 | + name: 'Build Portal' |
150 | 106 | runs-on: windows-latest |
151 | 107 | strategy: |
152 | 108 | matrix: |
153 | 109 | platform: [x86, x64] |
154 | 110 | configuration: [Debug, Release] |
155 | 111 |
|
156 | 112 | steps: |
157 | | - - name: Checkout repository and submodules |
| 113 | + - name: 'Checkout Portal repo & submodules' |
158 | 114 | uses: actions/checkout@v4 |
159 | 115 | with: |
160 | 116 | submodules: recursive |
161 | 117 |
|
162 | | - - name: Add MSBuild to PATH |
163 | | - uses: microsoft/setup-msbuild@v2 |
| 118 | + - name: 'Setup & build' |
| 119 | + uses: ./.github/actions/build-shared |
164 | 120 | with: |
165 | | - msbuild-architecture: ${{matrix.platform}} |
166 | | - |
167 | | - - name: Add cmake / nmake to PATH |
168 | | - uses: ilammy/msvc-dev-cmd@v1 |
169 | | - with: |
170 | | - arch: ${{matrix.platform}} |
171 | | - |
172 | | - - name: Build dependencies & generate solution |
173 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
174 | | - run: .\create_portal_dev_${{matrix.platform}}.bat |
175 | | - |
176 | | - - name: Build app |
177 | | - working-directory: ${{env.GITHUB_WORKSPACE}} |
178 | | - run: msbuild ${{env.PORTAL_SOLUTION_NAME_BASE}}_${{matrix.platform}}.sln /m -verbosity:minimal /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} |
179 | | - |
| 121 | + platform-name: ${{matrix.platform}} |
| 122 | + configuration-name: ${{matrix.configuration}} |
| 123 | + solution-name: ${{env.PORTAL_SOLUTION_NAME}} |
0 commit comments