OXYGENHUB
◆ push-uses-login oxygenflow / .flow / pipeline.kdl
2.5 KiB · last changed Build image: coverage tools; recipe copies any vendor/ 1 month ago source blame history raw
1
// OxygenFlow's own pipeline (docs/m0.md). Runs in Firecracker microVMs on
2
// Earth for every push to a bookmark; see the Flow tab on OxygenHub.
3
schema-version 1
4
5
sandbox "alpine" {
6
    runtime "microvm"
7
    // Alpine 3.24.2 minirootfs, imported on Earth with `flow rootfs import`.
8
    rootfs "cas://blob/e95d22fb2380b67193f2640a12c2f8c7bae485f6fd14330bdb0c7157faa588dc"
9
    memory-limit "256MiB"
10
    cpu-limit 1
11
    network "isolated"
12
}
13
14
job "layout" {
15
    sandbox "alpine"
16
    exec "sh" "-eu" ".flow/jobs/layout.sh"
17
}
18
19
job "todos" {
20
    sandbox "alpine"
21
    scope "crates/**"
22
    exec "sh" "-eu" ".flow/jobs/todos.sh"
23
}
24
25
job "size" {
26
    sandbox "alpine"
27
    scope "crates/**"
28
    exec "sh" "-eu" ".flow/jobs/size.sh"
29
}
30
31
job "isolation" {
32
    sandbox "alpine"
33
    exec "sh" "-eu" ".flow/jobs/isolation.sh"
34
}
35
36
// The build image (images/rust): Rust with rustfmt and clippy, Node, and the
37
// vendored crates. oxygen comes from the pinned subrepo in deps/.
38
sandbox "rust" {
39
    runtime "microvm"
40
    rootfs "cas://blob/7705d699a4fc06862e4297b7069396cf3b5b35b1d3f15191c46dc2031af17133"
41
    memory-limit "8GiB"
42
    cpu-limit 4
43
    network "loopback"
44
    // CI builds are thrown away: no incremental state and no debug info,
45
    // so less to compile, link and write (as in oxygenhub's pipeline).
46
    env {
47
        CARGO_INCREMENTAL "0"
48
        CARGO_PROFILE_DEV_DEBUG "0"
49
        CARGO_PROFILE_TEST_DEBUG "0"
50
        CARGO_PROFILE_RELEASE_DEBUG "0"
51
    }
52
}
53
54
sandbox "rust-small" {
55
    runtime "microvm"
56
    rootfs "cas://blob/7705d699a4fc06862e4297b7069396cf3b5b35b1d3f15191c46dc2031af17133"
57
    memory-limit "1GiB"
58
    cpu-limit 1
59
    network "isolated"
60
}
61
62
job "fmt" {
63
    sandbox "rust-small"
64
    // This workspace only: --all would reach the pinned oxygen in deps/.
65
    exec "cargo" "fmt" "--check" "-p" "flow" "-p" "flow-core" "-p" "flow-init" "-p" "flow-casfs"
66
}
67
68
job "clippy" {
69
    sandbox "rust"
70
    depends-on "fmt"
71
    mount {
72
        source "ephemeral://disk"
73
        target "/src/target"
74
        size "16GiB"
75
    }
76
    exec "sh" ".flow/warm-target.sh" "cargo" "clippy" "--workspace" "--all-targets" "--locked" "--" "-D" "warnings"
77
}
78
79
job "test" {
80
    sandbox "rust"
81
    depends-on "fmt"
82
    mount {
83
        source "ephemeral://disk"
84
        target "/src/target"
85
        size "16GiB"
86
    }
87
    exec "sh" ".flow/warm-target.sh" "cargo" "test" "--workspace" "--locked"
88
}
89
90
job "summary" {
91
    sandbox "alpine"
92
    depends-on "layout" "todos" "size" "isolation" "clippy" "test"
93
    env {
94
        PROJECT "OxygenFlow"
95
    }
96
    exec "sh" "-eu" ".flow/jobs/summary.sh"
97
}