Skip to content

Implement multi-platform CI sync testing #2906

@bar-discord-issue-bot

Description

@bar-discord-issue-bot

Task

Create a GitHub Actions CI workflow that runs engine sync tests on both arm64 and amd64 architectures, and compares the resulting checksums against each other and against historical "golden" runs to automatically detect sync regressions.

Context

Currently, verifying that the engine remains deterministic across different platforms requires manual testing. As we look to introduce new compiler optimizations (like enabling SSE4) or refactor core simulation code, we need automated safeguards to ensure we don't introduce desyncs between players on different hardware.

The proposed solution is to run sync tests as part of the CI pipeline on both amd64 and arm64 runners. A dependent job will then compare the outputs to ensure cross-platform determinism. However, comparing architectures against each other isn't enough, as a bug could theoretically alter the simulation deterministically across all platforms at once. To catch this, the CI must also compare the results against historical or "golden" checksums from previous revisions. We can draw inspiration from the BAR game repository's integration tests, which write results to disk in one job and evaluate them in another, potentially storing a rolling history of recent runs in a structured format.

Acceptance Criteria

  • GitHub Actions workflow is updated to run sync tests in separate jobs for both amd64 and arm64 runners.
  • A dependent CI job is created to collect and compare the checksum outputs from both architectures, failing the build if they diverge.
  • Test results are saved in a structured format (e.g., JSON or CSV containing PR/commit hash, contributor, test results, and timestamp) to maintain a history of recent runs.
  • The comparison job evaluates current checksums against historical/golden checksums to detect cross-revision sync breakages.
  • The system includes a documented mechanism to update the golden checksums when intentional changes to the simulation or sync tests are made.

Author: Bruno D
Discord: https://discord.com/channels/549281623154229250/724924957074915358/1484690181482221638
Model: gemini-3-pro-preview

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: devops/gitopsCI/CD pipelines, Docker builds, CMake build system, and repository infrastructurearea: toolsAuxiliary engine tools and developer/server tooling (e.g. pr-downloader)enhancementFeature request or improvement to existing behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions