OXYGENHUB
# bf3d07541368 oxygenhub / .flow / pipeline.kdl
2.0 KiB · last changed oxygen and oxygenflow as pinned subrepos in deps/ (make pins moves them), and an OxygenFlow pipeline: fmt of this workspace, then clippy, tests and a release build against the pins 1 month ago source blame history raw
1
// OxygenHub's pipeline (OxygenFlow, docs in the oxygenflow repository).
2
// Every push to a bookmark on OxygenHub runs it in Firecracker microVMs on
3
// Earth; the jobs appear as checks on the change. oxygen and oxygenflow come
4
// from the pinned subrepos in deps/, which the runner puts in the workspace.
5
schema-version 1
6
7
// The OxygenFlow build image: Rust with rustfmt and clippy, Node, and every
8
// crate of Cargo.lock vendored (oxygenflow/images/rust). Rebuild and re-pin
9
// it when Cargo.lock changes.
10
sandbox "rust" {
11
    runtime "microvm"
12
    rootfs "cas://blob/3ba0779a55b1d66fce10adf5a01585624c9aab089f590d228368c38fd3e65a46"
13
    memory-limit "8GiB"
14
    cpu-limit 4
15
    // Tests serve and connect on 127.0.0.1; nothing leaves the guest.
16
    network "loopback"
17
}
18
19
sandbox "rust-small" {
20
    runtime "microvm"
21
    rootfs "cas://blob/3ba0779a55b1d66fce10adf5a01585624c9aab089f590d228368c38fd3e65a46"
22
    memory-limit "1GiB"
23
    cpu-limit 1
24
    network "isolated"
25
}
26
27
job "fmt" {
28
    sandbox "rust-small"
29
    // Only this workspace's packages: --all would also check the path
30
    // dependencies in deps/, which follow their own formatting.
31
    exec "cargo" "fmt" "--check" "-p" "oxygenhub" "-p" "hub-api"
32
}
33
34
job "clippy" {
35
    sandbox "rust"
36
    depends-on "fmt"
37
    mount {
38
        source "ephemeral://disk"
39
        target "/src/target"
40
        size "24GiB"
41
    }
42
    env {
43
        CARGO_INCREMENTAL "0"
44
    }
45
    exec "cargo" "clippy" "--workspace" "--all-targets" "--locked" "--" "-D" "warnings"
46
}
47
48
job "test" {
49
    sandbox "rust"
50
    depends-on "fmt"
51
    mount {
52
        source "ephemeral://disk"
53
        target "/src/target"
54
        size "24GiB"
55
    }
56
    env {
57
        CARGO_INCREMENTAL "0"
58
    }
59
    exec "cargo" "test" "--workspace" "--locked"
60
}
61
62
job "build" {
63
    sandbox "rust"
64
    depends-on "fmt"
65
    mount {
66
        source "ephemeral://disk"
67
        target "/src/target"
68
        size "24GiB"
69
    }
70
    env {
71
        CARGO_INCREMENTAL "0"
72
    }
73
    exec "cargo" "build" "--release" "--locked"
74
}