Skywire uses a rolling-release auto-update mechanism. The CI pipeline tracks the latest commit on develop for which all tests passed, and visors can update themselves using standard Go tooling.
- A PR is merged to
develop - The
Testworkflow runs on all 3 platforms (linux, darwin, windows) - If ALL tests pass, the
update-commitjob:- Updates the
skywire-commitbranch with the tested commit SHA - Warms the Go module proxy cache so the commit is immediately available worldwide
- Updates the
- The
Deployworkflow (independent) builds and pushes Docker images to Docker Hub, tagged with both:testand:<short-sha>
An orphan branch in skycoin/skywire containing a single Go program that prints the latest tested commit hash:
cmd/skywire-commit/main.go # const Commit = "<sha>"
go.mod # module github.com/skycoin/skywire
This branch has no shared history with develop — it's updated by CI only.
- Go 1.21+ installed (Go 1.23 from bookworm-backports works; Go auto-downloads the required toolchain)
~/go/binin$PATH
Using go run with isolated cache (no persistent build artifacts):
TMPDIR=$(mktemp -d) && COMMIT=$(GOPROXY=direct GOCACHE=$TMPDIR go run github.com/skycoin/skywire/cmd/skywire-commit@skywire-commit) && rm -rf $TMPDIR
echo $COMMITOr install the helper binary (2MB, reusable):
GOPROXY=direct go install github.com/skycoin/skywire/cmd/skywire-commit@skywire-commit
COMMIT=$(~/go/bin/skywire-commit)Why GOPROXY=direct? @skywire-commit is a branch name. The Go module proxy
(proxy.golang.org) caches branch-tip → SHA resolutions for up to 30 minutes —
so if you run the update right after a CI merge, the proxy may still return the
previous SHA and your install no-ops (visible as a suspiciously fast "success"
in well under a second). Setting GOPROXY=direct bypasses the proxy and reads
the SHA straight from GitHub. The actual module download still proceeds with
the global default; only the branch-tip resolution is forced direct.
go install github.com/skycoin/skywire@$COMMITThis step does NOT need GOPROXY=direct — once you have the exact commit SHA,
the proxy lookup is content-addressed and returns the right module regardless.
TMPDIR=$(mktemp -d) && go install github.com/skycoin/skywire@$(GOPROXY=direct GOCACHE=$TMPDIR go run github.com/skycoin/skywire/cmd/skywire-commit@skywire-commit && rm -rf $TMPDIR)Compare the installed version to the latest tested commit:
CURRENT=$(skywire -b 2>/dev/null | grep -oP 'v.*-\K[a-f0-9]+' || echo "none")
LATEST=$(~/go/bin/skywire-commit)
if [ "${LATEST:0:12}" != "$CURRENT" ]; then
echo "Update available: $CURRENT -> ${LATEST:0:12}"
fiDocker images are pushed to Docker Hub on every merge to develop, tagged with both :test and :<short-sha>. The skywire-commit hash identifies which image is verified by CI.
#!/bin/bash
# Get the latest tested commit. GOPROXY=direct bypasses proxy.golang.org's
# branch-tip cache (up to 30min TTL) — without it, the resolver can return
# the previous SHA and the update silently no-ops in ~250ms with exit 0.
GOPROXY=direct go install github.com/skycoin/skywire/cmd/skywire-commit@skywire-commit
LATEST=$(~/go/bin/skywire-commit)
SHORT=${LATEST:0:12}
CURRENT=$(cat ~/.skywire-deploy-commit 2>/dev/null || echo "none")
if [ "$SHORT" = "$CURRENT" ]; then
echo "Up to date at $SHORT"
exit 0
fi
echo "Updating from $CURRENT to $SHORT"
docker pull skycoin/skywire:$SHORT
cd /path/to/docker-compose && docker compose up -d --force-recreate
echo "$SHORT" > ~/.skywire-deploy-commitThe CI warms the Go module proxy (proxy.golang.org) after each successful test run, so visors don't need GOPROXY=direct. The Chinese mirror goproxy.cn mirrors proxy.golang.org, so Chinese visors work with the default Go proxy settings.
The Go build cache (~/.cache/go-build) grows over time. Periodic cleanup:
# Remove build cache (safe — rebuilds are just slower the first time)
go clean -cache
# Check cache size
du -sh ~/.cache/go-buildFor the go run commit check, use the isolated GOCACHE pattern shown above to avoid cache growth entirely.