diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ed86c978b3..559681ee47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,6 +8,7 @@ on: push: branches: - main + - ci-replays pull_request: branches: - main @@ -41,8 +42,7 @@ jobs: generalsmd: - 'GeneralsMD/**' shared: - - '.github/workflows/build-toolchain.yml' - - '.github/workflows/ci.yml' + - '.github/workflows/**' - 'CMakeLists.txt' - 'CMakePresets.json' - 'cmake/**' @@ -63,15 +63,15 @@ jobs: strategy: matrix: include: - - preset: "vc6" - tools: true - extras: true - - preset: "vc6-profile" - tools: true - extras: true - - preset: "vc6-debug" - tools: true - extras: true + # - preset: "vc6" + # tools: true + # extras: true + # - preset: "vc6-profile" + # tools: true + # extras: true + # - preset: "vc6-debug" + # tools: true + # extras: true - preset: "win32" tools: true extras: true @@ -107,15 +107,15 @@ jobs: strategy: matrix: include: - - preset: "vc6" - tools: true - extras: true - - preset: "vc6-profile" - tools: true - extras: true - - preset: "vc6-debug" - tools: true - extras: true + # - preset: "vc6" + # tools: true + # extras: true + # - preset: "vc6-profile" + # tools: true + # extras: true + # - preset: "vc6-debug" + # tools: true + # extras: true - preset: "win32" tools: true extras: true @@ -125,6 +125,9 @@ jobs: - preset: "win32-debug" tools: true extras: true + - preset: "win32-debuglog" + tools: true + extras: true # vcpkg builds have been disabled for now due to excessive build times of 30 minutes per preset # - preset: "win32-vcpkg" # tools: true @@ -143,3 +146,50 @@ jobs: tools: ${{ matrix.tools }} extras: ${{ matrix.extras }} secrets: inherit + + replay-test: + name: Replay Compatibility Test${{ matrix.preset && '' }} + needs: build-generalsmd + if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generalsmd == 'true' || needs.detect-changes.outputs.shared == 'true' }} + runs-on: windows-latest + strategy: + matrix: + include: + - preset: "win32" + - preset: "win32-profile" + - preset: "win32-debug" + steps: + - name: Checkout Code + uses: actions/checkout@v4 + - name: Download Game Artifact + uses: actions/download-artifact@v4 + with: + name: GeneralsMD-${{ matrix.preset }}+t+e + path: build + - name: Move Replay files to correct folder + shell: pwsh + run: | + $source = "GeneralsMD\Replays" + $destination = "$env:USERPROFILE\Documents\Command and Conquer Generals Zero Hour\Replays" + + New-Item -ItemType Directory -Path $destination -Force | Out-Null + Get-ChildItem -Path $source -File | Move-Item -Destination $destination + - name: Run Replay Compatibility Tests + shell: pwsh + run: | + $exePath = "build\generalszh.exe" + + Write-Host "Checking if executable exists at: $exePath" + if (-not (Test-Path $exePath)) { + Write-Host "ERROR: Executable not found at $exePath" + exit 1 + } + + $process = Start-Process -FilePath $exePath -ArgumentList "-jobs 2 -headless -replay *.rep" -Wait -PassThru + $exitCode = $process.ExitCode + + # Handle non-zero exit code + if ($exitCode -ne 0) { + Write-Host "Process failed with exit code $exitCode" + throw "Executable failed with exit code $exitCode" + } diff --git a/CMakePresets.json b/CMakePresets.json index 3813bbdff3..96ceda37af 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -119,6 +119,15 @@ "RTS_BUILD_OPTION_DEBUG": "ON" } }, + { + "name": "win32-debuglog", + "inherits": "win32", + "displayName": "Windows 32bit Debug Logging", + "cacheVariables": { + "RTS_DEBUG_LOGGING": "ON", + "RTS_DEBUG_CRASHING": "ON" + } + }, { "name": "win32-vcpkg", "inherits": "default-vcpkg", @@ -221,6 +230,13 @@ "description": "Build Windows 32bit Debug", "configuration": "Debug" }, + { + "name": "win32-debuglog", + "configurePreset": "win32-debuglog", + "displayName": "Build Windows 32bit Debug Logging", + "description": "Build Windows 32bit Debug Logging", + "configuration": "Debug" + }, { "name": "win32-vcpkg", "configurePreset": "win32-vcpkg", @@ -362,6 +378,19 @@ } ] }, + { + "name": "win32-debuglog", + "steps": [ + { + "type": "configure", + "name": "win32-debuglog" + }, + { + "type": "build", + "name": "win32-debuglog" + } + ] + }, { "name": "win32-vcpkg", "steps": [ @@ -428,4 +457,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/GeneralsMD/Replays/00-03-45_2v6_PC03_ss_HardAI_HardAI_HardAI_HardAI_HardAI_HardAI.rep b/GeneralsMD/Replays/00-03-45_2v6_PC03_ss_HardAI_HardAI_HardAI_HardAI_HardAI_HardAI.rep new file mode 100644 index 0000000000..58b70ca6a8 Binary files /dev/null and b/GeneralsMD/Replays/00-03-45_2v6_PC03_ss_HardAI_HardAI_HardAI_HardAI_HardAI_HardAI.rep differ diff --git a/GeneralsMD/Replays/00-31-22_2v2_Derky_DESKTOPJ_HardAI_HardAI.rep b/GeneralsMD/Replays/00-31-22_2v2_Derky_DESKTOPJ_HardAI_HardAI.rep new file mode 100644 index 0000000000..733f18c3c0 Binary files /dev/null and b/GeneralsMD/Replays/00-31-22_2v2_Derky_DESKTOPJ_HardAI_HardAI.rep differ diff --git a/GeneralsMD/Replays/00-41-30_2v2_Nic_BOMD2MAS_HardAI_HardAI.rep b/GeneralsMD/Replays/00-41-30_2v2_Nic_BOMD2MAS_HardAI_HardAI.rep new file mode 100644 index 0000000000..ada69d2fde Binary files /dev/null and b/GeneralsMD/Replays/00-41-30_2v2_Nic_BOMD2MAS_HardAI_HardAI.rep differ diff --git a/GeneralsMD/Replays/05-01-50_2v2_amoor123_beshr_HardAI_HardAI.rep b/GeneralsMD/Replays/05-01-50_2v2_amoor123_beshr_HardAI_HardAI.rep new file mode 100644 index 0000000000..e0b2d0ce8e Binary files /dev/null and b/GeneralsMD/Replays/05-01-50_2v2_amoor123_beshr_HardAI_HardAI.rep differ diff --git a/GeneralsMD/Replays/11-25-57_2v2_Kana_HardAI_Erbolat_Hulk.rep b/GeneralsMD/Replays/11-25-57_2v2_Kana_HardAI_Erbolat_Hulk.rep new file mode 100644 index 0000000000..9cb7f4c2dc Binary files /dev/null and b/GeneralsMD/Replays/11-25-57_2v2_Kana_HardAI_Erbolat_Hulk.rep differ diff --git a/GeneralsMD/Replays/15-07-24_2v2v2_Emkill_haker_HardAI_HardAI_HardAI_HardAI.rep b/GeneralsMD/Replays/15-07-24_2v2v2_Emkill_haker_HardAI_HardAI_HardAI_HardAI.rep new file mode 100644 index 0000000000..3e378a5fd5 Binary files /dev/null and b/GeneralsMD/Replays/15-07-24_2v2v2_Emkill_haker_HardAI_HardAI_HardAI_HardAI.rep differ diff --git a/GeneralsMD/Replays/18-13-02_3v3_Supremac_Loonen_JB_HardAI_HardAI_HardAI.rep b/GeneralsMD/Replays/18-13-02_3v3_Supremac_Loonen_JB_HardAI_HardAI_HardAI.rep new file mode 100644 index 0000000000..794ad80978 Binary files /dev/null and b/GeneralsMD/Replays/18-13-02_3v3_Supremac_Loonen_JB_HardAI_HardAI_HardAI.rep differ diff --git a/GeneralsMD/Replays/366648.rep b/GeneralsMD/Replays/366648.rep new file mode 100644 index 0000000000..0b73174d34 Binary files /dev/null and b/GeneralsMD/Replays/366648.rep differ diff --git a/GeneralsMD/Replays/Golden Replay #1.rep b/GeneralsMD/Replays/Golden Replay #1.rep new file mode 100644 index 0000000000..f14c534367 Binary files /dev/null and b/GeneralsMD/Replays/Golden Replay #1.rep differ