Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 12 additions & 151 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,106 +59,8 @@ jobs:
echo "- Shared: ${{ steps.filter.outputs.shared == 'true' && '✅' || '❌' }}" >> $GITHUB_STEP_SUMMARY

# Note the build jobs are split into two jobs for vc6 and win32 because the replay checks
# only require the vc6 build and compiling vc6 is much faster than win32
build-generals-vc6:
name: Build Generals${{ matrix.preset && '' }}
needs: detect-changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generals == 'true' || needs.detect-changes.outputs.shared == 'true' }}
permissions:
contents: read
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-releaselog"
tools: true
extras: true
fail-fast: false
uses: ./.github/workflows/reusable-build-toolchain.yml
with:
game: "Generals"
preset: ${{ matrix.preset }}
tools: ${{ matrix.tools }}
extras: ${{ matrix.extras }}
secrets: inherit

build-generals-win32:
name: Build Generals${{ matrix.preset && '' }}
needs: detect-changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generals == 'true' || needs.detect-changes.outputs.shared == 'true' }}
permissions:
contents: read
packages: write
strategy:
matrix:
include:
- preset: "win32"
tools: true
extras: true
- preset: "win32-profile"
tools: true
extras: true
- preset: "win32-debug"
tools: true
extras: true
- preset: "win32-vcpkg"
tools: true
extras: true
- preset: "win32-vcpkg-profile"
tools: true
extras: true
- preset: "win32-vcpkg-debug"
tools: true
extras: true
fail-fast: false
uses: ./.github/workflows/reusable-build-toolchain.yml
with:
game: "Generals"
preset: ${{ matrix.preset }}
tools: ${{ matrix.tools }}
extras: ${{ matrix.extras }}
tests: true
benchmarks: ${{ matrix.preset == 'win32' }}
secrets: inherit

build-generalsmd-vc6:
name: Build GeneralsMD${{ matrix.preset && '' }}
needs: detect-changes
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generalsmd == 'true' || needs.detect-changes.outputs.shared == 'true' }}
permissions:
contents: read
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-releaselog"
tools: true
extras: true
fail-fast: false
uses: ./.github/workflows/reusable-build-toolchain.yml
with:
game: "GeneralsMD"
preset: ${{ matrix.preset }}
tools: ${{ matrix.tools }}
extras: ${{ matrix.extras }}
secrets: inherit

# only require the vc6 build and compiling vc6 is much faster than win32,
# and the rendering checks only require the win32 build.
build-generalsmd-win32:
name: Build GeneralsMD${{ matrix.preset && '' }}
needs: detect-changes
Expand All @@ -169,71 +71,30 @@ jobs:
strategy:
matrix:
include:
# Only the build that the rendering check needs, which keeps the runs of this fork short.
- preset: "win32"
# The artifact step collects the core tools, so they are built as well.
tools: true
extras: true
- preset: "win32-profile"
tools: true
extras: true
- preset: "win32-debug"
tools: true
extras: true
- preset: "win32-vcpkg"
tools: true
extras: true
ffmpeg: true
- preset: "win32-vcpkg-profile"
tools: true
extras: true
- preset: "win32-vcpkg-debug"
tools: true
extras: true
extras: false
fail-fast: false
uses: ./.github/workflows/reusable-build-toolchain.yml
with:
game: "GeneralsMD"
preset: ${{ matrix.preset }}
tools: ${{ matrix.tools }}
extras: ${{ matrix.extras }}
ffmpeg: ${{ matrix.ffmpeg || false}}
ffmpeg: false
tests: true
benchmarks: ${{ matrix.preset == 'win32' }}
secrets: inherit

replaycheck-generals:
name: Replay Check Generals${{ matrix.preset && '' }}
needs: [detect-changes, build-generals-vc6]
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generals == 'true' || needs.detect-changes.outputs.shared == 'true' }}
permissions:
contents: read
strategy:
matrix:
include:
- preset: "vc6+t+e"
- preset: "vc6-releaselog+t+e" # optimized build with logging and crashing enabled should be compatible, so we test that here.
fail-fast: false
uses: ./.github/workflows/reusable-check-replays.yml
with:
game: "Generals"
userdata: "GeneralsReplays/Generals/1.08"
preset: ${{ matrix.preset }}
benchmarks: false
secrets: inherit

replaycheck-generalsmd:
name: Replay Check GeneralsMD${{ matrix.preset && '' }}
needs: [detect-changes, build-generalsmd-vc6]
renderingcheck-generalsmd:
name: Rendering Check GeneralsMD
needs: [detect-changes, build-generalsmd-win32]
if: ${{ github.event_name == 'workflow_dispatch' || needs.detect-changes.outputs.generalsmd == 'true' || needs.detect-changes.outputs.shared == 'true' }}
permissions:
contents: read
strategy:
matrix:
include:
- preset: "vc6+t+e"
- preset: "vc6-releaselog+t+e" # optimized build with logging and crashing enabled should be compatible, so we test that here.
fail-fast: false
uses: ./.github/workflows/reusable-check-replays.yml
actions: read
uses: ./.github/workflows/reusable-check-rendering.yml
with:
game: "GeneralsMD"
userdata: "GeneralsReplays/GeneralsZH/1.04"
preset: ${{ matrix.preset }}
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/reusable-build-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,9 +178,22 @@ jobs:
- name: Test ${{ inputs.game }} with CTest Using ${{ inputs.preset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }} Preset
if: ${{ inputs.tests }}
shell: pwsh
env:
GTEST_FILTER: -RenderingTest.*
run: |
ctest --preset ${{ inputs.preset }} --verbose

# For the rendering check in ci.yml.
- name: Upload Rendering Test Executable
if: ${{ inputs.tests && inputs.preset == 'win32' }}
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: ${{ inputs.game }}-win32-rendering-tests
path: build/${{ inputs.preset }}/Tests/Google/Release/${{ inputs.game == 'Generals' && 'g' || 'z' }}_googletest.exe
# Pull requests compare their rendering with main.
retention-days: ${{ github.ref == 'refs/heads/main' && 90 || 7 }}
if-no-files-found: error

- name: Collect ${{ inputs.game }} ${{ inputs.preset }}${{ inputs.tools && '+t' || '' }}${{ inputs.extras && '+e' || '' }} Artifact
shell: pwsh
run: |
Expand Down
Loading
Loading