OXYGENHUB
# ba1731bba530 oxygen / .flow / pipeline.kdl
2.1 KiB · last changed CI starts from the build image's prebuilt dependencies 1 month ago source blame history raw
This file is in conflict in this state; the markers below are the conflict. All conflicts
2b668d92 Andy McCall 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"
ba1731bb Andy McCall ↶ 11
    rootfs "cas://blob/169de040f406eec3ec4af81400cff8736d0966c7532e73a44cdcf7d35cda05a4"
2b668d92 Andy McCall 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"
ba1731bb Andy McCall ↶ 20
    rootfs "cas://blob/169de040f406eec3ec4af81400cff8736d0966c7532e73a44cdcf7d35cda05a4"
2b668d92 Andy McCall 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"
ba1731bb Andy McCall ↶ 42
    }
2b668d92 Andy McCall 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
    }
ba1731bb Andy McCall ↶ 56
    env {
2b668d92 Andy McCall 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
    }
ba1731bb Andy McCall ↶ 70
    env {
2b668d92 Andy McCall 71
        CARGO_INCREMENTAL "0"
72
    }
73
    exec "sh" ".flow/warm-target.sh" "cargo" "build" "--release" "--locked"
74
}