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" |
|
| dfa3e8e9 Andy McCall ↶ | 11 | rootfs "cas://blob/7705d699a4fc06862e4297b7069396cf3b5b35b1d3f15191c46dc2031af17133" |
| 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" |
|
| dfa3e8e9 Andy McCall ↶ | 20 | rootfs "cas://blob/7705d699a4fc06862e4297b7069396cf3b5b35b1d3f15191c46dc2031af17133" |
| 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" |
|
| ff698768 Andy McCall ↶ | 45 | >>>>>>> oxy conflict 1 of 1 end |
| 46 | } |
|
| 47 | ||
| 2b668d92 Andy McCall | 48 | // The tests, run under cargo-nextest and cargo-llvm-cov: a test report |
| 49 | // (JUnit, kept whether or not they pass; #139) for the hub's Tests tab and |
|
| 50 | // line coverage (LCOV, oxygenhub#113) for its Coverage tab, from one run. |
|
| 51 | job "test" { |
|
| 52 | sandbox "rust" |
|
| 53 | depends-on "fmt" |
|
| 54 | mount { |
|
| 55 | source "ephemeral://disk" |
|
| 56 | target "/src/target" |
|
| 57 | size "24GiB" |
|
| 58 | } |
|
| ff698768 Andy McCall ↶ | 59 | env { |
| dfa3e8e9 Andy McCall ↶ | 60 | CARGO_INCREMENTAL "0" |
| ff698768 Andy McCall ↶ | 61 | } |
| 62 | exec "cargo" "llvm-cov" "nextest" "--workspace" "--locked" "--profile" "ci" "--lcov" "--output-path" "/src/target/lcov.info" |
|
| 63 | output { |
|
| 64 | artifact "junit" { |
|
| dfa3e8e9 Andy McCall ↶ | 65 | path "/src/target/nextest/ci/junit.xml" |
| 66 | when "always" |
|
| 67 | } |
|
| 68 | artifact "coverage" { |
|
| 2b668d92 Andy McCall | 69 | path "/src/target/lcov.info" |
| 70 | } |
|
| 71 | } |
|
| 72 | } |
|
| 73 | ||
| 74 | job "build" { |
|
| 75 | sandbox "rust" |
|
| 76 | depends-on "fmt" |
|
| 77 | mount { |
|
| 78 | source "ephemeral://disk" |
|
| 79 | target "/src/target" |
|
| 80 | size "24GiB" |
|
| 81 | } |
|
| ba1731bb Andy McCall ↶ | 82 | env { |
| 2b668d92 Andy McCall | 83 | CARGO_INCREMENTAL "0" |
| b66a5c47 Andy McCall ↶ | 84 | } |
| 85 | exec "sh" ".flow/warm-target.sh" "cargo" "build" "--release" "--locked" |
|
| 86 | } |
|
| 87 | ||
| 88 | // Release files for every platform (oxygen#59): scripts/dist.sh in the |
|
| 89 | // build image's cross toolchains. A push runs it only when it touches |
|
| 90 | // these paths (a release moves Cargo.toml's version); "Run pipeline" and |
|
| 91 | // reruns always do. The files are kept as this run's artifacts, named by |
|
| 92 | // its signed receipt, and attached to the release from there, so the |
|
| 93 | // release's trust page shows each as built here. |
|
| 94 | job "dist" { |
|
| 95 | sandbox "rust" |
|
| 96 | depends-on "fmt" |
|
| 97 | scope "Cargo.toml" "scripts/dist.sh" "packaging/**" |
|
| 98 | mount { |
|
| 99 | source "ephemeral://disk" |
|
| 100 | target "/src/target" |
|
| 101 | size "24GiB" |
|
| 102 | } |
|
| 103 | env { |
|
| 104 | DIST_FLAT "/src/target/dist-flat" |
|
| 105 | ZIG_GLOBAL_CACHE_DIR "/src/target/zig-cache" |
|
| 106 | } |
|
| 107 | exec "bash" "scripts/dist.sh" |
|
| 108 | output { |
|
| 109 | artifact "oxy-linux-x86_64.tar.gz" { |
|
| 110 | path "/src/target/dist-flat/oxy-linux-x86_64.tar.gz" |
|
| 111 | } |
|
| 112 | artifact "oxy-linux-arm64.tar.gz" { |
|
| 113 | path "/src/target/dist-flat/oxy-linux-arm64.tar.gz" |
|
| 114 | } |
|
| 115 | artifact "oxy-linux-riscv64.tar.gz" { |
|
| 116 | path "/src/target/dist-flat/oxy-linux-riscv64.tar.gz" |
|
| 117 | } |
|
| 118 | artifact "oxy-macos-x86_64.tar.gz" { |
|
| 119 | path "/src/target/dist-flat/oxy-macos-x86_64.tar.gz" |
|
| 120 | } |
|
| 121 | artifact "oxy-macos-arm64.tar.gz" { |
|
| 122 | path "/src/target/dist-flat/oxy-macos-arm64.tar.gz" |
|
| 123 | } |
|
| 124 | artifact "oxy-windows-x86_64.zip" { |
|
| 125 | path "/src/target/dist-flat/oxy-windows-x86_64.zip" |
|
| 126 | } |
|
| 127 | artifact "oxy_amd64.deb" { |
|
| 128 | path "/src/target/dist-flat/oxy_amd64.deb" |
|
| 129 | } |
|
| 130 | artifact "oxy_arm64.deb" { |
|
| 131 | path "/src/target/dist-flat/oxy_arm64.deb" |
|
| 132 | } |
|
| 133 | artifact "oxy_riscv64.deb" { |
|
| 134 | path "/src/target/dist-flat/oxy_riscv64.deb" |
|
| 135 | } |
|
| 136 | artifact "SHA256SUMS" { |
|
| 137 | path "/src/target/dist-flat/SHA256SUMS" |
|
| 138 | } |
|
| 139 | } |
|
| 140 | } |