Skip to content

Commit c3c1355

Browse files
authored
Merge pull request #1569 from OutpostUniverse/refactorGitHubActionsWorkflow
Refactor GitHub actions Build workflow
2 parents 5da0dfa + 0efe6db commit c3c1355

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/build.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
platform: [x86, x64]
1313
runs-on: windows-latest
1414
env:
15-
PLATFORM: ${{ matrix.platform }}
16-
BUILD_CONFIGURATION: Release
17-
SOLUTION_FILE_PATH: .
15+
Platform: ${{ matrix.platform }}
16+
Configuration: Release
17+
VcpkgManifestInstall: false
1818
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
1919

2020
steps:
@@ -46,8 +46,10 @@ jobs:
4646
key: vcpkgCache-${{ runner.os }}-${{ matrix.platform }}-${{ hashFiles('vcpkg.json') }}
4747

4848
- name: Pre-install vcpkg dependencies - OPHD
49+
env:
50+
VcpkgManifestInstall: true
4951
run: |
50-
msbuild . /property:Configuration=${{env.BUILD_CONFIGURATION}} /target:appOPHD:VcpkgInstallManifestDependencies
52+
msbuild . /target:appOPHD:VcpkgInstallManifestDependencies
5153
5254
- name: Save vcpkg dependency cache
5355
uses: actions/cache/save@v4
@@ -62,8 +64,10 @@ jobs:
6264
6365
- name: Pre-install vcpkg dependencies - NAS2D
6466
working-directory: nas2d-core
67+
env:
68+
VcpkgManifestInstall: true
6569
run: |
66-
msbuild . /property:Configuration=${{env.BUILD_CONFIGURATION}} /target:NAS2D:VcpkgInstallManifestDependencies
70+
msbuild . /target:NAS2D:VcpkgInstallManifestDependencies
6771
6872
- name: Set NAS2D modification time
6973
shell: bash
@@ -88,7 +92,7 @@ jobs:
8892
# Add additional options to the MSBuild command line here (like platform or verbosity level).
8993
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
9094
run: |
91-
msbuild /maxCpuCount /warnAsError /property:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} /target:NAS2D
95+
msbuild . /maxCpuCount /warnAsError /property:RunCodeAnalysis=true /target:NAS2D
9296
9397
- name: Save build cache - NAS2D
9498
uses: actions/cache/save@v4
@@ -139,7 +143,7 @@ jobs:
139143
# Add additional options to the MSBuild command line here (like platform or verbosity level).
140144
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference
141145
run: |
142-
msbuild /maxCpuCount /warnAsError /property:RunCodeAnalysis=true /property:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
146+
msbuild . /maxCpuCount /warnAsError /property:RunCodeAnalysis=true
143147
144148
- name: Save incremental build cache - OPHD
145149
uses: actions/cache/save@v4
@@ -149,7 +153,7 @@ jobs:
149153
key: buildCache-${{ runner.os }}-${{ matrix.platform }}-${{ github.sha }}
150154

151155
- name: Run libOPHD unit tests
152-
run: .build/${{env.BUILD_CONFIGURATION}}_${{env.PLATFORM}}_testLibOPHD/testLibOPHD.exe
156+
run: .build/${{env.Configuration}}_${{env.Platform}}_testLibOPHD/testLibOPHD.exe
153157

154158
- name: Run libControl unit tests
155-
run: .build/${{env.BUILD_CONFIGURATION}}_${{env.PLATFORM}}_testLibControls/testLibControls.exe
159+
run: .build/${{env.Configuration}}_${{env.Platform}}_testLibControls/testLibControls.exe

0 commit comments

Comments
 (0)