Gate Bento releases on clippy and tests
Each recipe runs a prebuild step before build: clippy -D warnings, then the
test suite. sh_ok aborts the recipe on failure and a failed step bars publish,
so no artifact is built or shipped from code that fails either.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
3 files changed,
+21 insertions,
-0 deletions
| 13 |
13 |
|
step("checkout");
|
| 14 |
14 |
|
sh_ok(h, "cd " + r + " && git pull --ff-only");
|
| 15 |
15 |
|
|
|
16 |
+ |
// Gate: no artifact is built from code that fails clippy or its tests. It runs
|
|
17 |
+ |
// on this target's own build host, so a break confined to one platform is
|
|
18 |
+ |
// caught where it would have shipped.
|
|
19 |
+ |
step("prebuild");
|
|
20 |
+ |
sh_ok(h, "cd " + r + " && cargo clippy --workspace --all-targets " + feature_flags() + " -- -D warnings");
|
|
21 |
+ |
sh_ok(h, "cd " + r + " && cargo test --workspace " + feature_flags());
|
|
22 |
+ |
|
| 16 |
23 |
|
step("build");
|
| 17 |
24 |
|
sh_ok(h, "cd " + r + " && ./dist/build-appimage.sh");
|
| 18 |
25 |
|
sh_ok(h, "cd " + r + " && ./dist/build-deb.sh");
|
| 15 |
15 |
|
sh_ok(h, "cd " + r + " && git pull --ff-only");
|
| 16 |
16 |
|
|
| 17 |
17 |
|
// build-macos.sh: build + sign + notarize + staple, DMG into dist/.
|
|
18 |
+ |
// Gate: no artifact is built from code that fails clippy or its tests. It runs
|
|
19 |
+ |
// on this target's own build host, so a break confined to one platform is
|
|
20 |
+ |
// caught where it would have shipped.
|
|
21 |
+ |
step("prebuild");
|
|
22 |
+ |
sh_ok(h, "cd " + r + " && cargo clippy --workspace --all-targets " + feature_flags() + " -- -D warnings");
|
|
23 |
+ |
sh_ok(h, "cd " + r + " && cargo test --workspace " + feature_flags());
|
|
24 |
+ |
|
| 18 |
25 |
|
step("build");
|
| 19 |
26 |
|
sh_ok(h, "cd " + r + " && ./dist/build-macos.sh");
|
| 20 |
27 |
|
|
| 15 |
15 |
|
step("checkout");
|
| 16 |
16 |
|
sh_ok(h, "powershell -Command \"cd " + win_repo + "; git pull --ff-only\"");
|
| 17 |
17 |
|
|
|
18 |
+ |
// Gate: no artifact is built from code that fails clippy or its tests. It runs
|
|
19 |
+ |
// on this target's own build host, so a break confined to one platform is
|
|
20 |
+ |
// caught where it would have shipped.
|
|
21 |
+ |
step("prebuild");
|
|
22 |
+ |
sh_ok(h, "powershell -Command \"cd " + win_repo + "; cargo clippy --workspace --all-targets " + feature_flags() + " -- -D warnings\"");
|
|
23 |
+ |
sh_ok(h, "powershell -Command \"cd " + win_repo + "; cargo test --workspace " + feature_flags() + "\"");
|
|
24 |
+ |
|
| 18 |
25 |
|
step("build");
|
| 19 |
26 |
|
sh_ok(h, "powershell -Command \"cd " + win_repo + "; pwsh -File dist\\build-msi-native.ps1\"");
|
| 20 |
27 |
|
|