Monorepo for Aesthetic.Computer aesthetic.computer
4
fork

Configure Feed

Select the types of activity you want to include in your feed.

oven: add CL variant OTA build + channel-based upload

- native-builder: after C build succeeds, builds CL variant if
fedac/native/cl/ files changed (non-blocking, failure doesn't
fail the C build)
- upload-release.sh: OTA_CHANNEL env var prefixes upload paths
(e.g. OTA_CHANNEL=cl → cl-native-notepat-latest.vmlinuz)
- Separate releases.json per channel

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

+54 -7
+13 -6
fedac/native/scripts/upload-release.sh
··· 116 116 printf '%s\n%s' "$FULL_VERSION" "$SIZE" > "$TMP/version.txt" 117 117 printf '%s' "$SHA256" > "$TMP/sha256.txt" 118 118 119 + # OTA channel prefix (empty for default C build, "cl-" for Common Lisp variant) 120 + CHANNEL_PREFIX="" 121 + if [ -n "${OTA_CHANNEL:-}" ]; then 122 + CHANNEL_PREFIX="${OTA_CHANNEL}-" 123 + echo " channel: ${OTA_CHANNEL}" 124 + fi 125 + 119 126 # Upload files (vmlinuz last — it's large, others are the canary) 120 - do_upload "$TMP/version.txt" "os/native-notepat-latest.version" "text/plain" 121 - do_upload "$TMP/sha256.txt" "os/native-notepat-latest.sha256" "text/plain" 122 - do_upload "$VMLINUZ" "os/native-notepat-latest.vmlinuz" "application/octet-stream" 127 + do_upload "$TMP/version.txt" "os/${CHANNEL_PREFIX}native-notepat-latest.version" "text/plain" 128 + do_upload "$TMP/sha256.txt" "os/${CHANNEL_PREFIX}native-notepat-latest.sha256" "text/plain" 129 + do_upload "$VMLINUZ" "os/${CHANNEL_PREFIX}native-notepat-latest.vmlinuz" "application/octet-stream" 123 130 124 131 # Fetch existing releases.json (or start fresh) 125 132 RELEASES_JSON="$TMP/releases.json" 126 - curl -sf "${BASE_URL}/os/releases.json" -o "$RELEASES_JSON" 2>/dev/null \ 133 + curl -sf "${BASE_URL}/os/${CHANNEL_PREFIX}releases.json" -o "$RELEASES_JSON" 2>/dev/null \ 127 134 || echo '{"releases":[]}' > "$RELEASES_JSON" 128 135 129 136 # Append new entry (keep last 50) ··· 140 147 "size": int(size), 141 148 "git_hash": git_hash, 142 149 "build_ts": build_ts, 143 - "url": "https://releases.aesthetic.computer/os/native-notepat-latest.vmlinuz" 150 + "url": "https://releases.aesthetic.computer/os/${CHANNEL_PREFIX}native-notepat-latest.vmlinuz" 144 151 }) 145 152 data["releases"] = releases[:50] 146 153 data["latest"] = version ··· 149 156 json.dump(data, f, indent=2) 150 157 PYEOF 151 158 152 - do_upload "$RELEASES_JSON" "os/releases.json" "application/json" 159 + do_upload "$RELEASES_JSON" "os/${CHANNEL_PREFIX}releases.json" "application/json" 153 160 154 161 # Record build in MongoDB 155 162 if command -v node &>/dev/null; then
+41 -1
oven/native-builder.mjs
··· 222 222 process.env.DO_SPACES_SECRET || process.env.ART_SPACES_SECRET || "", 223 223 }); 224 224 225 - // Cleanup 225 + // Cleanup C build 226 226 try { await fs.unlink(vmlinuzOut); } catch {} 227 227 try { await fs.unlink(cidFile); } catch {} 228 228 229 + job.percent = 85; 230 + 231 + // Phase 5: Build CL variant (non-blocking — failure doesn't fail the job) 232 + const clChanged = (job.changedPaths || "").includes("fedac/native/cl/"); 233 + if (clChanged) { 234 + try { 235 + addLogLine(job, "stdout", "Phase 5: Building Common Lisp variant..."); 236 + const clCidFile = `/tmp/oven-cl-cid-${job.id}`; 237 + const clVmlinuzOut = `/tmp/oven-cl-vmlinuz-${job.id}`; 238 + const clBuildName = `cl-${job.ref.slice(0, 7)}`; 239 + 240 + await runPhase(job, "cl-build", "bash", ["-c", [ 241 + `CID=$(docker create -e AC_BUILD_NAME=${clBuildName} -e AC_BUILD_LISP=1 ac-os-builder)`, 242 + `echo $CID > ${clCidFile}`, 243 + `docker start -a $CID`, 244 + ].join(" && ")], repoDir); 245 + 246 + const clCid = (await fs.readFile(clCidFile, "utf8")).trim(); 247 + await runPhase(job, "cl-extract", "bash", ["-c", 248 + `docker cp ${clCid}:/tmp/ac-build/vmlinuz ${clVmlinuzOut} && docker rm ${clCid} >/dev/null` 249 + ], repoDir); 250 + 251 + // Upload CL variant to separate OTA channel 252 + addLogLine(job, "stdout", "Uploading CL variant to CDN..."); 253 + const uploadScript = path.join(NATIVE_DIR, "scripts/upload-release.sh"); 254 + await runPhase(job, "cl-upload", "bash", [uploadScript, clVmlinuzOut], NATIVE_DIR, { 255 + DO_SPACES_KEY: process.env.DO_SPACES_KEY || process.env.ART_SPACES_KEY || "", 256 + DO_SPACES_SECRET: process.env.DO_SPACES_SECRET || process.env.ART_SPACES_SECRET || "", 257 + OTA_CHANNEL: "cl", // uploads to os/cl-native-notepat-latest.vmlinuz 258 + }); 259 + 260 + try { await fs.unlink(clVmlinuzOut); } catch {} 261 + try { await fs.unlink(clCidFile); } catch {} 262 + addLogLine(job, "stdout", "CL variant uploaded successfully"); 263 + } catch (clErr) { 264 + addLogLine(job, "stderr", `CL build failed (non-fatal): ${clErr.message}`); 265 + } 266 + } 267 + 229 268 job.status = "success"; 230 269 job.stage = "done"; 231 270 job.percent = 100; ··· 265 304 process: null, 266 305 exitCode: null, 267 306 error: null, 307 + changedPaths: options.changed_paths || "", 268 308 logs: [], 269 309 }; 270 310