| 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/a3b49f36a2ad1838219ea0b7985591e44ac0e6d7f92e9d993d3a3738263fe32e" |
| 41 |
memory-limit "8GiB" |
| 42 |
cpu-limit 4 |
| 43 |
network "loopback" |
| 44 |
} |
| 45 |
|
| 46 |
sandbox "rust-small" { |
| 47 |
runtime "microvm" |
| 48 |
rootfs "cas://blob/a3b49f36a2ad1838219ea0b7985591e44ac0e6d7f92e9d993d3a3738263fe32e" |
| 49 |
memory-limit "1GiB" |
| 50 |
cpu-limit 1 |
| 51 |
network "isolated" |
| 52 |
} |
| 53 |
|
| 54 |
job "fmt" { |
| 55 |
sandbox "rust-small" |
| 56 |
// This workspace only: --all would reach the pinned oxygen in deps/. |
| 57 |
exec "cargo" "fmt" "--check" "-p" "flow" "-p" "flow-core" "-p" "flow-init" "-p" "flow-casfs" |
| 58 |
} |
| 59 |
|
| 60 |
job "clippy" { |
| 61 |
sandbox "rust" |
| 62 |
depends-on "fmt" |
| 63 |
mount { |
| 64 |
source "ephemeral://disk" |
| 65 |
target "/src/target" |
| 66 |
size "16GiB" |
| 67 |
} |
| 68 |
env { |
| 69 |
CARGO_INCREMENTAL "0" |
| 70 |
} |
| 71 |
exec "sh" ".flow/warm-target.sh" "cargo" "clippy" "--workspace" "--all-targets" "--locked" "--" "-D" "warnings" |
| 72 |
} |
| 73 |
|
| 74 |
job "test" { |
| 75 |
sandbox "rust" |
| 76 |
depends-on "fmt" |
| 77 |
mount { |
| 78 |
source "ephemeral://disk" |
| 79 |
target "/src/target" |
| 80 |
size "16GiB" |
| 81 |
} |
| 82 |
env { |
| 83 |
CARGO_INCREMENTAL "0" |
| 84 |
} |
| 85 |
exec "sh" ".flow/warm-target.sh" "cargo" "test" "--workspace" "--locked" |
| 86 |
} |
| 87 |
|
| 88 |
job "summary" { |
| 89 |
sandbox "alpine" |
| 90 |
depends-on "layout" "todos" "size" "isolation" "clippy" "test" |
| 91 |
env { |
| 92 |
PROJECT "OxygenFlow" |
| 93 |
} |
| 94 |
exec "sh" "-eu" ".flow/jobs/summary.sh" |
| 95 |
} |