Skip to content
Merged
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
7 changes: 3 additions & 4 deletions .github/workflows/build-and-push-engine.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Build and Push Bomberland Engine

# Public repo: this runs on GitHub-hosted runners (ubuntu-latest), never the
# self-hosted homeserver runners, so untrusted fork PRs can't execute on our
# infrastructure. Pull requests build only (no registry login, no push); the
# image is pushed to Docker Hub only on push to master.
# Runs on GitHub-hosted runners (ubuntu-latest). Pull requests build only
# (no registry login, no push); the image is pushed to Docker Hub only on
# push to master.

on:
# Every merge/commit to master builds and pushes the engine image.
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/test-go-agent.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Test Go Starter Kit

# Public repo: this runs on GitHub-hosted runners (ubuntu-latest), never the
# self-hosted homeserver runners, so untrusted fork PRs can't execute on our
# infrastructure.
# Runs on GitHub-hosted runners (ubuntu-latest).
#
# The engine's JSON schema is the source of truth for the wire protocol. This
# workflow validates the Go starter kit's fixtures against that schema, and is
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/test-rust-agent.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Test Rust Starter Kit

# Runs on GitHub-hosted runners (ubuntu-latest).
#
# The engine's JSON schema is the source of truth for the wire protocol. This
# workflow validates the Rust starter kit's fixtures against that schema, and is
# triggered whenever the schema changes — so a protocol update to the engine
# surfaces any drift in the Rust kit immediately.

on:
push:
branches:
- master
pull_request:
branches:
- master
paths:
- "agents/rust/**"
- "engine/bomberland-engine/src/runtime-validation/validation.schema.json"
- ".github/workflows/test-rust-agent.yaml"
workflow_dispatch:

concurrency:
group: test-rust-agent-${{ github.ref }}
cancel-in-progress: true

env:
ENGINE_SCHEMA: engine/bomberland-engine/src/runtime-validation/validation.schema.json

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install stable Rust
run: |
rustup toolchain install stable --profile minimal --no-self-update
rustup default stable
rustc --version

- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
agents/rust/target
key: cargo-${{ runner.os }}-${{ hashFiles('agents/rust/Cargo.lock') }}
restore-keys: cargo-${{ runner.os }}-

# The engine schema is the source of truth. Fail if the kit's bundled copy has
# drifted from it — that copy is what the Docker build and standalone clones use,
# since they don't have the engine tree available.
- name: Check bundled schema is in sync with engine
run: |
if ! cmp -s "$ENGINE_SCHEMA" agents/rust/validation.schema.json; then
echo "::error::agents/rust/validation.schema.json is out of sync with $ENGINE_SCHEMA"
echo "Re-sync with: cp $ENGINE_SCHEMA agents/rust/validation.schema.json"
diff -u agents/rust/validation.schema.json "$ENGINE_SCHEMA" || true
exit 1
fi

# Validate fixtures against the engine's live schema (not just the bundled copy),
# so fixture/protocol drift fails CI even before the copy is re-synced.
- name: Run Rust tests against engine schema
working-directory: agents/rust
env:
BOMBERLAND_SCHEMA_PATH: ${{ github.workspace }}/engine/bomberland-engine/src/runtime-validation/validation.schema.json
run: cargo test --locked
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ docker-compose up --abort-on-container-exit --force-recreate
| TypeScript-fwd | [Link](https://github.com/CoderOneHQ/bomberland/tree/master/agents/typescript) | Includes example for using forward model simulator | ❌ | Coder One |
| Go | [Link](https://github.com/CoderOneHQ/bomberland/tree/master/agents/go) | Basic Go starter | ✅ | [dtitov](https://github.com/dtitov) |
| C++ | [Link](https://github.com/CoderOneHQ/bomberland/tree/master/agents/cpp) | Basic C++ starter | ✅ | [jfbogusz](https://github.com/jfbogusz) |
| Rust | [Link](https://github.com/CoderOneHQ/bomberland/tree/master/agents/rust) | Basic Rust starter | | [K-JBoon](https://github.com/K-JBoon) |
| Rust | [Link](https://github.com/CoderOneHQ/bomberland/tree/master/agents/rust) | Basic Rust starter | | [K-JBoon](https://github.com/K-JBoon) |

## Discussion and Questions

Expand Down
Loading
Loading