1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
language: rust
env:
CARGO_TERM_COLOR: always
# Cargo commands run from this project root (packages/pond); the workspace
# lockfile, workspace manifest, and toolchain pin stay at the repo root,
# referenced workspace-relative with a leading '/'.
#
# Every file that changes the compiled output belongs here, or moon serves a
# cached result for a tree that would build differently: SKILL.md is embedded
# via include_str!, and the root manifest carries every [profile.*] (cargo
# honors profiles only at the workspace root).
fileGroups:
sources:
- 'src/**/*'
- 'build.rs'
- 'SKILL.md'
- 'Cargo.toml'
- '/Cargo.toml'
- '/Cargo.lock'
- '/rust-toolchain.toml'
# The msvc rustflags (+crt-static) live here, and a moon fingerprint that
# omits them lets a rustflags change be served from a cache entry built with
# the old ones - lint-msvc and test-msvc are exactly the tasks that carry
# them. kache's own keys already include the flags, so adding this costs one
# moon run and no cold cache.
- '/.cargo/config.toml'
tests:
- 'tests/**/*'
- 'benches/**/*'
tasks:
format:
command: 'cargo fmt --check'
inputs:
lint:
command: 'cargo clippy --locked -- -D warnings'
inputs:
test:
command: 'cargo test --locked'
inputs:
# The Windows leg. A separate task, not `test` run on a Windows runner:
# moon's fingerprint carries no OS, so sharing one task would hit the hash
# the Linux runner already cached and report "cached" without compiling
# anything on Windows. The differing command is what keeps the two apart.
# Same OS-fingerprint reasoning as test-msvc: `lint` runs on Linux and never
# sees a cfg(windows) block, so Windows-only code was ungated until this task.
lint-msvc:
command: 'cargo clippy --locked --target x86_64-pc-windows-msvc --all-targets --features windows-launcher -- -D warnings'
inputs:
test-msvc:
# windows-launcher so pondw.exe is compiled here on every PR; the job that
# builds it for the zip is release-gated, too late to learn it is broken.
command: 'cargo test --locked --target x86_64-pc-windows-msvc --features windows-launcher'
inputs:
# Cheap packaging gate: `cargo package --list` must contain every file the
# code embeds via include_str!/include_bytes! (a full verify build is skipped
# at publish time - publish_no_verify in .github/release-plz.toml). The script
# cd's to this crate root itself, so it is cwd-independent.
#
# Takes the full sources group, not just src/ + SKILL.md: `cargo package
# --list` resolves the graph, so it reads the manifests and the lockfile too.
# Understating that let a stale Cargo.lock cache-hit this task while lint and
# test - which do take the lockfile as input - failed on it.
check-package:
command: 'bash ../../ops/scripts/check-package-contents.sh'
inputs: