Skip to content

Commit ebb7afc

Browse files
[GITHUB] Fix core tools compilation on GitHub CI (#717)
Co-authored-by: Stephan Vedder <stephan.vedder@gmail.com>
1 parent 8e5bb95 commit ebb7afc

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/build-toolchain.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,12 @@ jobs:
111111
)
112112
113113
$gamePrefix = "${{ inputs.game == 'Generals' && 'GENERALS' || 'ZEROHOUR' }}"
114+
$buildFlags += "-DRTS_BUILD_CORE_TOOLS=${{ inputs.tools && 'ON' || 'OFF' }}"
114115
$buildFlags += "-DRTS_BUILD_${gamePrefix}_TOOLS=${{ inputs.tools && 'ON' || 'OFF' }}"
116+
$buildFlags += "-DRTS_BUILD_CORE_EXTRAS=${{ inputs.extras && 'ON' || 'OFF' }}"
115117
$buildFlags += "-DRTS_BUILD_${gamePrefix}_EXTRAS=${{ inputs.extras && 'ON' || 'OFF' }}"
116118
117-
Write-Host "Build flags: $buildFlags"
119+
Write-Host "Build flags: $($buildFlags -join ' | ')"
118120
119121
cmake --preset ${{ inputs.preset }} $buildFlags
120122
@@ -132,9 +134,9 @@ jobs:
132134
if ("${{ inputs.preset }}" -like "win32*") {
133135
# For win32 preset, look in config-specific subdirectories
134136
$configToUse = if ("${{ inputs.preset }}" -eq "win32dbg") { "Debug" } else { "Release" }
135-
$files = Get-ChildItem -Path "$buildDir\${{ inputs.game }}\$configToUse" -File | Where-Object { $_.Extension -in @(".exe", ".dll", ".pdb") } -Verbose
137+
$files = Get-ChildItem -Path "$buildDir\Core\$configToUse","$buildDir\${{ inputs.game }}\$configToUse" -File | Where-Object { $_.Extension -in @(".exe", ".dll", ".pdb") } -Verbose
136138
} else {
137-
$files = Get-ChildItem -Path "$buildDir\${{ inputs.game }}" -File | Where-Object { $_.Extension -in @(".exe", ".dll", ".pdb") } -Verbose
139+
$files = Get-ChildItem -Path "$buildDir\Core","$buildDir\${{ inputs.game }}" -File | Where-Object { $_.Extension -in @(".exe", ".dll", ".pdb") } -Verbose
138140
}
139141
$files | Move-Item -Destination $artifactsDir -Verbose
140142

Core/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ target_link_libraries(corei_always INTERFACE
1616

1717
# Do we want to build extra SDK stuff or just the game binary?
1818
option(RTS_BUILD_CORE_TOOLS "Build core tools" ON)
19-
add_feature_info(CoreTools GENZH_BUILD_ZEROHOUR_TOOLS "Build Core Mod Tools")
19+
add_feature_info(CoreTools RTS_BUILD_CORE_TOOLS "Build Core Mod Tools")
2020
option(RTS_BUILD_CORE_EXTRAS "Build core extra tools/tests" OFF)
21-
add_feature_info(CoreExtras GENZH_BUILD_ZEROHOUR_EXTRAS "Build Core Extra Tools/Tests")
21+
add_feature_info(CoreExtras RTS_BUILD_CORE_EXTRAS "Build Core Extra Tools/Tests")
2222

2323
# Set where the build results will end up
2424
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})

0 commit comments

Comments
 (0)