Skip to content

Latest commit

 

History

History
36 lines (22 loc) · 2.7 KB

development.md

File metadata and controls

36 lines (22 loc) · 2.7 KB

Development

Testing and checks

# Core and regression tests that do not need a GPU: network and save checks use loopback services, synthetic inputs and temporary files, so no game resources are needed
cargo test --release --workspace --lib -- --test-threads=1

# Version consistency and open-source boundary checks
python tools/version/check.py
node tools/boundary/check.mjs

Commit conventions

Commit messages follow Conventional Commits. commitlint checks pull request titles and commits against commitlint.config.mjs.

Continuous integration

GitHub Actions runs version consistency checks (including that CHANGELOG.md has a section for the current version), JavaScript syntax checks, open-source boundary checks and commit whitespace checks on pushes, pull requests and manual triggers. These checks do not compile or package anything, and they do not need game resources.

The native programs and the web backends are built by the reusable build.yml workflow. Every compiler invocation goes through sccache with the GitHub Actions cache as storage, so crates whose inputs are unchanged are not compiled again. A run can read the caches of its own ref and of the default branch, so the Build cache workflow builds every target on master (on pushes that change Rust code, and every five days so the caches do not expire) and release tags read those caches. Each build job ends with sccache --show-stats.

Versioning and releases

The version is defined once, in [workspace.package] in Cargo.toml; all crates inherit it. The settings panel shows the current version, and moly-app --version can be queried without loading resources.

Commits that bump the version also update CHANGELOG.md, which git-cliff generates from the commit history according to cliff.toml:

git cliff --unreleased --tag v<version> --prepend CHANGELOG.md

When the v<version> tag is pushed, the release workflow first runs the checks above and verifies that the tag matches the workspace version. It then builds the native programs for Windows x64, Linux x64 and macOS arm64, and the WebGPU and WebGL2 web backends. It attaches each platform's package (game, server and launcher), the separate server packages, the web packages (the pkg/ directory) and SHA256SUMS to a draft release. The release notes are the section for that version generated by git-cliff with the same configuration. If the repository contains release-notes/v<version>.md, that file is used instead. A manual run only produces workflow artifacts and does not create a release.

Release packages do not contain any game resources.