Commit

Author:

Hash:

Timestamp:

+58 -0 +/-1 browse

Kevin Schoon [me@kevinschoon.com]

1d306f0d8e722c0199ff7193c930f8fa36c8283f

Wed, 26 Aug 2026 17:39:04 +0000 (2 weeks ago)

add basic ayllu build script
1diff --git a/.ayllu-build.jsonnet b/.ayllu-build.jsonnet
2new file mode 100644
3index 0000000..0e8ec00
4--- /dev/null
5+++ b/.ayllu-build.jsonnet
6 @@ -0,0 +1,58 @@
7+ local build_image = 'ayllu-arch';
8+ local cargo_target_dir = '/home/ayllu/cargo-target';
9+
10+ local cargo_cache = {
11+ name: 'cargo-cache',
12+ path: '/home/ayllu/.cargo/registry',
13+ };
14+
15+ local build_cache = {
16+ name: 'build-cache',
17+ path: cargo_target_dir,
18+ transient: true,
19+ };
20+
21+ local short_step(name, input) = {
22+ name: name,
23+ input: input,
24+ environment: {
25+ CARGO_TARGET_DIR: cargo_target_dir,
26+ },
27+ };
28+
29+ {
30+ workflows: [
31+ {
32+ name: 'Lint',
33+ image: build_image,
34+ steps: [
35+ short_step('Cargo Lint', 'cargo fmt --check'),
36+ ],
37+ cache: [cargo_cache, build_cache],
38+ },
39+ {
40+ name: 'Metadata',
41+ image: build_image,
42+ networking: true,
43+ steps: [
44+ short_step('Fetch', 'cargo fetch --locked'),
45+ short_step('Metadata', 'cargo metadata > metadata.json'),
46+ ],
47+ cache: [cargo_cache, build_cache],
48+ outputs: [{
49+ path: 'metadata.json',
50+ sha256sum: null,
51+ }],
52+ depends_on: ['Lint'],
53+ },
54+ {
55+ name: 'Test',
56+ image: build_image,
57+ steps: [
58+ short_step('Cargo Test', 'cargo test --frozen --release'),
59+ ],
60+ cache: [cargo_cache, build_cache],
61+ depends_on: ['Lint', 'Metadata'],
62+ },
63+ ],
64+ }