OXYGENHUB
◆ v0.16.0 oxygen-vscode / .flow / pipeline.kdl
1.3 KiB · last changed Pipeline: the package job builds the bundle first, as each job starts from a fresh workspace 1 month ago source blame history raw
1
// oxygen-vscode's pipeline (OxygenFlow, docs in the oxygenflow repository):
2
// typecheck, bundle, tests against a real oxy, and packaging, offline in a
3
// Firecracker microVM on Earth for every push.
4
schema-version 1
5
6
// The OxygenFlow build image (oxygenflow/images/rust): Node, Rust, an npm
7
// cache of this repository's package-lock.json, and the crates oxy needs.
8
// Rebuild and re-pin it when package-lock.json changes.
9
sandbox "node" {
10
    runtime "microvm"
11
    rootfs "cas://blob/85c744e509d45118942a8ca77408d56894bf7833fa806d20d08511cc90bc5024"
12
    memory-limit "6GiB"
13
    cpu-limit 4
14
    network "loopback"
15
}
16
17
// The tests drive the real oxy, built here from the pinned oxygen in deps/.
18
job "check" {
19
    sandbox "node"
20
    mount {
21
        source "ephemeral://disk"
22
        target "/src/deps/oxygen/target"
23
        size "16GiB"
24
    }
25
    env {
26
        CARGO_INCREMENTAL "0"
27
    }
28
    exec "sh" "-euc" "cargo build --locked --manifest-path deps/oxygen/Cargo.toml -p oxy && npm ci --offline --cache /opt/npm-cache --no-audit --no-fund && OXY_BIN=/src/deps/oxygen/target/debug/oxy npm run check"
29
}
30
31
job "package" {
32
    sandbox "node"
33
    depends-on "check"
34
    // A fresh workspace: nothing from check carries over, so build first.
35
    exec "sh" "-euc" "npm ci --offline --cache /opt/npm-cache --no-audit --no-fund && npm run build && npm run package"
36
}