xtask ci: the wasm check runs on one host

This commit is contained in:
aiongg committed 2026-11-25 13:25:33 +00:00
1 parent 24c8be1aa0
commit ef82a2cf6c
3 files changed
+11 -4

No files matched your search

+1 -1
View File
@@ -154,7 +154,7 @@ cargo run --release -p texturecraft-cli -- new builtin:crate crate.tcraft --samp
cargo run --release -p texturecraft-cli -- render crate.tcraft crate.png --samples 256 # path traced
cargo run --release -p texturecraft-cli -- export crate.tcraft textures # headless export
cd apps/texturecraft-web && trunk serve # web build
cargo xtask ci # fmt, clippy, tests, layering, wasm
cargo xtask ci # fmt, clippy, tests, layering, wasm (not on Windows)
```
You need Rust 1.95 or newer. The app opens with no project (**File ▸ Open sample project** loads a baked one, and **File ▸ Close** returns to the empty state).
+1 -1
View File
@@ -173,7 +173,7 @@ artwork and keep `ATTRIBUTION.md` in step. See `assets/app-icon/README.md`.
## Local checks
- `cargo xtask ci`: fmt, clippy, tests, `cargo xtask layers`, `cargo xtask wasm`.
- `cargo xtask ci`: fmt, clippy, tests, `cargo xtask layers`, `cargo xtask wasm` (not run by `ci` on Windows; the other hosts cover it).
- `bash packaging/linux/apprun-test.sh` and `bash packaging/freebsd/package.sh --dry-run` run
anywhere with bash.
- `packaging/macos/package.sh --arch aarch64` on a Mac builds an ad-hoc signed DMG.
+9 -2
View File
@@ -155,13 +155,20 @@ fn cmd_ci() -> Result<(), String> {
};
type Step = (&'static str, Box<dyn Fn() -> Result<(), String>>);
// Reject invalid dependency layering before spending time compiling and running the workspace.
let steps: Vec<Step> = vec![
let mut steps: Vec<Step> = vec![
("fmt", Box::new(cargo_step(&["fmt", "--all", "--", "--check"]))),
("layers", Box::new(cmd_layers)),
("clippy", Box::new(cargo_step(&["clippy", "--workspace", "--all-targets", "--", "-D", "warnings"]))),
("test", Box::new(cargo_step(&["test", "--workspace"]))),
("wasm", Box::new(cmd_wasm)),
];
// The check compiles for wasm32 and gives the same answer on any host, so the non-Windows legs
// cover it and the slower Windows leg skips it. A skipped step is not in the list, so the
// summary never reports it as ok.
if cfg!(windows) {
eprintln!("ci: wasm check not run on Windows (the other hosts cover it)");
} else {
steps.push(("wasm", Box::new(cmd_wasm)));
}
for (i, (name, step)) in steps.iter().enumerate() {
eprintln!("\n=== ci: {name} ===");
if let Err(e) = step() {