Context
Current CI/CD pipeline is limited to single-platform Docker builds. We need a comprehensive multi-platform build matrix that:
- Builds both Generals Base and GeneralsXZH variants
- Targets Linux (current), macOS, and Windows (future)
- Runs replay validation to ensure determinism across platforms
- Captures build artifacts and logs for debugging
Goal
Implement a robust GitHub Actions workflow with:
- Path-based filtering — conditional builds based on changed files (Generals/ vs GeneralsMD/ vs Core/)
- Matrix strategy — build all platform/variant combinations efficiently
- Conditional execution — exclude combinations not yet supported (e.g., Windows, Generals on macOS)
- Artifact management — capture binaries and logs for debugging
- Determinism validation — replay checks after successful builds
- Smoke tests — basic validation (menu launch, skirmish load)
Architecture (RFC)
Check Changed Files (path-filter)
├─ Generals/ changed?
│ └─ Build Matrix [linux, macos/TBD, windows/TBD]
│ └─ Replay Check
│ └─ Smoke Tests
│
└─ GeneralsMD/ changed?
└─ Build Matrix [linux, macos, windows/TBD]
└─ Replay Check
└─ Smoke Tests
Core/ changed?
├─ Affects all builds (runs full matrix)
└─ Propagate to both Generals and GeneralsMD paths
Acceptance Criteria
Mocks/TBD Items
Currently, use GitHub Actions features to properly indicate incomplete features:
For unsupported combinations:
exclude:
- platform: windows # See: https://github.com/fbraz3/GeneralsX/issues/29
- platform: macos
game: Generals # See: https://github.com/fbraz3/GeneralsX/issues/28
For incomplete steps:
- name: Smoke Tests (TBD)
if: success() # Only run if build succeeded
continue-on-error: true
run: |
# TODO: Implement comprehensive smoke tests
# See: https://github.com/fbraz3/GeneralsX/issues/XXX
echo "Smoke tests framework TBD"
CI Responsibilities (Scope)
Per-Build Steps
- Checkout code
- Run docker-configure if Linux
- Run docker-build or native build per platform
- Upload binary artifact
- On Linux: run replay check
Per-Platform Smoke Tests (TBD)
- Menu launch (verify window appears)
- Skirmish map load (verify no immediate crash)
- Asset loading validation
- Determinism validation (replays from main should still work)
Logging & Artifacts
- Capture CMake configure logs
- Capture build output logs
- Capture replay check results
- Upload logs on failure (mandatory)
- Upload logs on success (optional, last N builds)
References
- Current build scripts:
scripts/build/linux/, scripts/build/macos/
- Related issues:
- Workflow patterns: GitHub Actions docs + existing open-source Generals projects
Implementation Strategy
Phase 1 (Skeleton):
Phase 2 (Enhancement):
Phase 3 (Polish):
Context
Current CI/CD pipeline is limited to single-platform Docker builds. We need a comprehensive multi-platform build matrix that:
Goal
Implement a robust GitHub Actions workflow with:
Architecture (RFC)
Acceptance Criteria
.github/workflows/build.ymldorny/paths-filter)excludearray with task references)Mocks/TBD Items
Currently, use GitHub Actions features to properly indicate incomplete features:
For unsupported combinations:
For incomplete steps:
CI Responsibilities (Scope)
Per-Build Steps
Per-Platform Smoke Tests (TBD)
Logging & Artifacts
References
scripts/build/linux/,scripts/build/macos/Implementation Strategy
Phase 1 (Skeleton):
Phase 2 (Enhancement):
Phase 3 (Polish):