OXYGENHUB
# 5e4e2ef26abb oxygen / .flow / pipeline.kdl
2.1 KiB · last changed Pin the build image that vendors the tree-sitter crates 1 month ago source blame history raw
This file is in conflict in this state; the markers below are the conflict. All conflicts
1
// Oxygen's own 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.
4
schema-version 1
5
6
// The OxygenFlow build image: Rust with rustfmt and clippy, Node, and every
7
// crate of Cargo.lock vendored (oxygenflow/images/rust). Rebuild and re-pin
8
// it when Cargo.lock changes.
9
sandbox "rust" {
10
    runtime "microvm"
11
    rootfs "cas://blob/9d76e1aef3ab096c57dfdab6ed2cfb4de1dc70e67ca0e7f299e087f7abb7e61a"
12
    memory-limit "8GiB"
13
    cpu-limit 4
14
    // Tests serve and connect on 127.0.0.1; nothing leaves the guest.
15
    network "loopback"
16
}
17
18
sandbox "rust-small" {
19
    runtime "microvm"
20
    rootfs "cas://blob/9d76e1aef3ab096c57dfdab6ed2cfb4de1dc70e67ca0e7f299e087f7abb7e61a"
21
    memory-limit "1GiB"
22
    cpu-limit 1
23
    network "isolated"
24
}
25
26
job "fmt" {
27
    sandbox "rust-small"
28
    exec "cargo" "fmt" "--all" "--check"
29
}
30
31
job "clippy" {
32
    sandbox "rust"
33
    depends-on "fmt"
34
    mount {
35
        source "ephemeral://disk"
36
        target "/src/target"
37
        size "24GiB"
38
    }
39
<<<<<<< oxy conflict 1 of 1, side 1 of 2: change 110a6605 "OxygenFlow pipeline: fmt, then clippy -D warnings, tests and a release build in microVMs on Earth, on every push"
40
    env {
41
        CARGO_INCREMENTAL "0"
42
    }
43
======= oxy conflict 1 of 1, side 2 of 2: change 116da477 "CI starts from the build image's prebuilt dependencies"
44
    exec "sh" ".flow/warm-target.sh" "cargo" "clippy" "--workspace" "--all-targets" "--locked" "--" "-D" "warnings"
45
>>>>>>> oxy conflict 1 of 1 end
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 "sh" ".flow/warm-target.sh" "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 "sh" ".flow/warm-target.sh" "cargo" "build" "--release" "--locked"
74
}