CI starts from the build image's prebuilt dependencies ba1731bba530
The pipeline pins the build image that holds this workspace's
dependencies prebuilt (/opt/warm/oxygen), and .flow/warm-target.sh copies
them onto a job's empty target disk before cargo runs (oxygenhub#29).
Author Andy McCall @andymccall <[email protected] >
When 1 month ago · 2026-09-29 04:23 UTC
Signature ✔ signed by Andy McCall
Hash ba1731bba53083a9a40dc52110c01a7cfc5b9721c587cfe3807e3270d28c8987
Depends on 2b668d92b066
Depended on by a451982b1d34 dfa3e8e95d80 bdd894b548e4 5e4e2ef26abb
In bookmarks agents-in-readme bare-hashes carried-not-removed carry-identical doctor-trust identical-sides keyless-tags main merge-remote-bookmark only-help-103 paths-for-resolutions-and-amend push-notes show-stat subrepo-pin-state switch-says
In tags v0.1.0 v0.10.0 v0.11.0 v0.2.0 v0.3.0 v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.4.3 v0.4.4 v0.4.5 v0.4.6 v0.5.0 v0.5.1 v0.6.0 v0.7.0 v0.8.0 v0.9.0
Edits 7 atoms, 1 tree operation, 2 files
Browse the tree at this change
.flow/warm-target.sh .flow/pipeline.kdl
added
.flow/warm-target.sh
+20 −0
1
+
#!/bin/sh
2
+
# Start from the build image's prebuilt dependencies, then run the command.
3
+
# OxygenFlow's rust image holds this workspace's dependencies built at /src with
4
+
# this pipeline's environment (oxygenflow/images/rust, backlog F6b2); the
5
+
# job's target disk starts empty, so copying them in leaves cargo only this
6
+
# workspace's own crates to compile. Without them (an older image, or a
7
+
# failed copy) the job simply builds everything, as before.
8
+
set -eu
9
+
warm=/opt/warm/oxygen
10
+
# A fresh ext4 target disk holds only lost+found.
11
+
if [ -d "$warm" ] && [ -z "$(ls -A target 2>/dev/null | grep -vx 'lost+found')" ]; then
12
+
start=$(date +%s)
13
+
if cp -R --preserve=timestamps "$warm/." target/; then
14
+
echo "flow: prebuilt dependencies copied in $(( $(date +%s) - start )) s"
15
+
else
16
+
echo "flow: could not copy the prebuilt dependencies; building them" >&2
17
+
rm -rf target/* 2>/dev/null || true
18
+
fi
19
+
fi
20
+
exec "$@"
modified
.flow/pipeline.kdl
+5 −5
…
7 unchanged lines
8
8
// it when Cargo.lock changes.
9
9
sandbox "rust" {
10
10
runtime "microvm"
11
-
rootfs "cas://blob/3ba0779a55b1d66fce10adf5a01585624c9aab089f590d228368c38fd3e65a46 "
11
+
rootfs "cas://blob/169de040f406eec3ec4af81400cff8736d0966c7532e73a44cdcf7d35cda05a4 "
12
12
memory-limit "8GiB"
13
13
cpu-limit 4
14
14
// Tests serve and connect on 127.0.0.1; nothing leaves the guest.
…
2 unchanged lines
17
17
18
18
sandbox "rust-small" {
19
19
runtime "microvm"
20
-
rootfs "cas://blob/3ba0779a55b1d66fce10adf5a01585624c9aab089f590d228368c38fd3e65a46 "
20
+
rootfs "cas://blob/169de040f406eec3ec4af81400cff8736d0966c7532e73a44cdcf7d35cda05a4 "
21
21
memory-limit "1GiB"
22
22
cpu-limit 1
23
23
network "isolated"
…
12 unchanged lines
36
36
target "/src/target"
37
37
size "24GiB"
38
38
}
39
+
exec "sh" ".flow/warm-target.sh" "cargo" "clippy" "--workspace" "--all-targets" "--locked" "--" "-D" "warnings"
39
40
env {
40
41
CARGO_INCREMENTAL "0"
41
42
}
42
-
exec "cargo" "clippy" "--workspace" "--all-targets" "--locked" "--" "-D" "warnings"
43
43
}
44
44
45
45
job "test" {
…
7 unchanged lines
53
53
env {
54
54
CARGO_INCREMENTAL "0"
55
55
}
56
-
exec "cargo" "test" "--workspace" "--locked"
56
+
exec "sh" ".flow/warm-target.sh" " cargo" "test" "--workspace" "--locked"
57
57
}
58
58
59
59
job "build" {
…
7 unchanged lines
67
67
env {
68
68
CARGO_INCREMENTAL "0"
69
69
}
70
-
exec "cargo" "build" "--release" "--locked"
70
+
exec "sh" ".flow/warm-target.sh" " cargo" "build" "--release" "--locked"
71
71
}