OXYGENHUB

Release files built in OxygenFlow: a dist job (refs oxygen#59) 913e5ad27b17

As oxygen's: scripts/dist.sh in the build image d2d24c22, scoped to
Cargo.toml, the script and packaging; the files kept as artifacts.
Author
Andy McCall @andymccall <[email protected]>
When
· 2026-10-02 20:51 UTC
Signature
✔ signed by Andy McCall
Hash
913e5ad27b17a3d3f4b146440aee012f9d5f0e3d2ebc1e654936ed45533a905a
Depends on
380996db84e5 484527d5ba1b 99ca93d60bca f2c9757605c1
Depended on by
93f445fa50d8 021f36a627f3 e15409084ed6 bf614c3d7906 7074e47e99b0
In bookmarks
api-unknown-fields cancel-landed-runs clear-waiting close-proposal-140 diffusion-pin-bookmark draft-ready image-check job-waits main oh-comment-body-file proposal-list-fast run-one-job wiki-says-so
In tags
v0.3.1 v0.4.0 v0.4.1 v0.4.2 v0.5.0 v0.5.1 v0.5.2 v0.6.0 v0.6.1 v0.7.0 v0.8.0 v0.9.0 v0.9.1 v0.9.11 v0.9.15 v0.9.16 v0.9.19 v0.9.2 v0.9.20 v0.9.21 v0.9.22 v0.9.23 v0.9.24 v0.9.3 v0.9.4 v0.9.5 v0.9.6 v0.9.7 v0.9.8 v0.9.9
Edits
5 atoms, 0 tree operations, 2 files

Browse the tree at this change

modified .flow/pipeline.kdl +56 −2
…
10 unchanged lines
11 11
// Cargo.lock changes; until then only the changed crates are compiled.
12 12
sandbox "rust" {
13 13
    runtime "microvm"
14 -
    rootfs "cas://blob/a3b49f36a2ad1838219ea0b7985591e44ac0e6d7f92e9d993d3a3738263fe32e"
14 +
    rootfs "cas://blob/d2d24c2211f00d6ccf89fbee63095ad2a81d0cc9af92d7a0ede9129e18d46e91"
15 15
    memory-limit "8GiB"
16 16
    cpu-limit 4
17 17
    // Tests serve and connect on 127.0.0.1; nothing leaves the guest.
…
2 unchanged lines
20 20
21 21
sandbox "rust-small" {
22 22
    runtime "microvm"
23 -
    rootfs "cas://blob/a3b49f36a2ad1838219ea0b7985591e44ac0e6d7f92e9d993d3a3738263fe32e"
23 +
    rootfs "cas://blob/d2d24c2211f00d6ccf89fbee63095ad2a81d0cc9af92d7a0ede9129e18d46e91"
24 24
    memory-limit "1GiB"
25 25
    cpu-limit 1
26 26
    network "isolated"
…
47 unchanged lines
74 74
        source "ephemeral://disk"
75 75
        target "/src/target"
76 76
        size "24GiB"
77 +
78 +
// Release files for every platform (oxygen#59): scripts/dist.sh in the
79 +
// build image's cross toolchains. A push runs it only when it touches
80 +
// these paths (a release moves Cargo.toml's version); "Run pipeline" and
81 +
// reruns always do. The files are kept as this run's artifacts, named by
82 +
// its signed receipt, and attached to the release from there, so the
83 +
// release's trust page shows each as built here.
84 +
job "dist" {
85 +
    sandbox "rust"
86 +
    depends-on "fmt"
87 +
    scope "Cargo.toml" "scripts/dist.sh" "packaging/**"
88 +
    mount {
89 +
        source "ephemeral://disk"
90 +
        target "/src/target"
91 +
        size "24GiB"
92 +
    }
93 +
    env {
94 +
        DIST_FLAT "/src/target/dist-flat"
95 +
        ZIG_GLOBAL_CACHE_DIR "/src/target/zig-cache"
96 +
    }
97 +
    exec "bash" "scripts/dist.sh"
98 +
    output {
99 +
        artifact "oh-linux-x86_64.tar.gz" {
100 +
            path "/src/target/dist-flat/oh-linux-x86_64.tar.gz"
101 +
        }
102 +
        artifact "oh-linux-arm64.tar.gz" {
103 +
            path "/src/target/dist-flat/oh-linux-arm64.tar.gz"
104 +
        }
105 +
        artifact "oh-linux-riscv64.tar.gz" {
106 +
            path "/src/target/dist-flat/oh-linux-riscv64.tar.gz"
107 +
        }
108 +
        artifact "oh-macos-x86_64.tar.gz" {
109 +
            path "/src/target/dist-flat/oh-macos-x86_64.tar.gz"
110 +
        }
111 +
        artifact "oh-macos-arm64.tar.gz" {
112 +
            path "/src/target/dist-flat/oh-macos-arm64.tar.gz"
113 +
        }
114 +
        artifact "oh-windows-x86_64.zip" {
115 +
            path "/src/target/dist-flat/oh-windows-x86_64.zip"
116 +
        }
117 +
        artifact "oh_amd64.deb" {
118 +
            path "/src/target/dist-flat/oh_amd64.deb"
119 +
        }
120 +
        artifact "oh_arm64.deb" {
121 +
            path "/src/target/dist-flat/oh_arm64.deb"
122 +
        }
123 +
        artifact "oh_riscv64.deb" {
124 +
            path "/src/target/dist-flat/oh_riscv64.deb"
125 +
        }
126 +
        artifact "SHA256SUMS" {
127 +
            path "/src/target/dist-flat/SHA256SUMS"
128 +
        }
129 +
    }
130 +
}
77 131
    }
78 132
    env {
79 133
        CARGO_INCREMENTAL "0"
…
3 unchanged lines
modified scripts/dist.sh +11 −0
…
127 unchanged lines
128 128
129 129
rm -rf "$OUT/stage"
130 130
(cd "$OUT" && shopt -s nullglob && sha256sum -- *.tar.gz *.zip *.deb >SHA256SUMS)
131 +
# DIST_FLAT=DIR: the same files again under names without the version, for
132 +
# a pipeline whose artifacts are fixed paths (the OxygenFlow dist job); the
133 +
# bytes are the release's, so its assets show as built by that job.
134 +
if [ -n "${DIST_FLAT:-}" ]; then
135 +
  mkdir -p "$DIST_FLAT"
136 +
  for f in "$OUT"/*.tar.gz "$OUT"/*.zip "$OUT"/*.deb "$OUT"/SHA256SUMS; do
137 +
    [ -e "$f" ] || continue
138 +
    b=$(basename "$f"); b=${b/-$VERSION-/-}; b=${b/_${VERSION}_/_}
139 +
    cp "$f" "$DIST_FLAT/$b"
140 +
  done
141 +
fi
131 142
echo "== $OUT"
132 143
ls -l "$OUT"