| 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/836461b613019f62399a960c61a25c482eb74e30054ff2cd44d5594c3305872b" |
| 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 && npm run typecheck && npm run build && OXY_BIN=/src/deps/oxygen/target/debug/oxy npm run test:ci" |
| 29 |
// A JUnit report (kept whether or not the tests pass) and line coverage |
| 30 |
// of src/ through esbuild's source maps, for the hub's Tests and |
| 31 |
// Coverage tabs. |
| 32 |
output { |
| 33 |
artifact "junit" { |
| 34 |
path "/src/out/junit.xml" |
| 35 |
when "always" |
| 36 |
} |
| 37 |
artifact "coverage" { |
| 38 |
path "/src/out/lcov.info" |
| 39 |
} |
| 40 |
} |
| 41 |
} |
| 42 |
|
| 43 |
job "package" { |
| 44 |
sandbox "node" |
| 45 |
depends-on "check" |
| 46 |
// A fresh workspace: nothing from check carries over, so build first. |
| 47 |
exec "sh" "-euc" "npm ci --offline --cache /opt/npm-cache --no-audit --no-fund && npm run build && npm run package" |
| 48 |
} |