OXYGENHUB
# e2189ffef8ff oxygenflow / Makefile
1.1 KiB · Makefile · last changed Ephemeral scratch mounts in M0: ephemeral://tmpfs and ephemeral://disk (a sparse disk per job), checked targets and sizes, in the canonical job and the receipt; flow-init mounts them for the job's user; make deploy-runner 1 month ago source blame history raw
1
# OxygenFlow on Earth (docs/m0.md §6): build the runner and the guest init,
2
# install them under /home/claude/flow, re-pin flow-init in flow.toml, and
3
# restart the flow-runner service.
4
5
EARTH ?= claude@earth
6
SSH ?= ssh -i $(HOME)/.ssh/earth_claude
7
SCP ?= scp -i $(HOME)/.ssh/earth_claude
8
FLOW_HOME_ON_EARTH ?= /home/claude/flow
9
INIT := target/x86_64-unknown-linux-gnu/release/flow-init
10
11
.PHONY: build deploy-runner
12
13
build:
14
	cargo build --release -p flow
15
	RUSTFLAGS="-C target-feature=+crt-static" cargo build --release -p flow-init --target x86_64-unknown-linux-gnu
16
17
deploy-runner: build
18
	$(SCP) target/release/flow $(EARTH):$(FLOW_HOME_ON_EARTH)/bin/flow.new
19
	$(SCP) $(INIT) $(EARTH):$(FLOW_HOME_ON_EARTH)/bin/flow-init.new
20
	$(SSH) $(EARTH) 'set -e; cd $(FLOW_HOME_ON_EARTH); \
21
		cp -p bin/flow bin/flow.prev; cp -p bin/flow-init bin/flow-init.prev; cp -p flow.toml flow.toml.prev; \
22
		mv bin/flow.new bin/flow; mv bin/flow-init.new bin/flow-init; \
23
		h=$$(bin/flow hash bin/flow-init | cut -d" " -f1); \
24
		sed -i "s|^init = .*|init = { path = \"bin/flow-init\", blake3 = \"$$h\" }|" flow.toml; \
25
		sudo systemctl restart flow-runner; systemctl is-active flow-runner'