Skip to content

Release pipeline: binaries, installer and platform smoke tests - #42

Merged
JacobStephens2 merged 3 commits into
mainfrom
issue-33
Sep 25, 2026
Merged

JacobStephens2 merged 3 commits into
mainfrom
issue-33

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Pushing a v* tag now builds, smoke-tests and publishes a GitHub Release through dist 0.33.0. The customisations are dist custom jobs declared in dist-workspace.toml, so running dist generate again keeps them. release.yml is generated, so don't edit it by hand.

flowchart LR
  plan --> build["build-local-artifacts<br/>musl (ubuntu-24.04), aarch64-apple-darwin (macos-26)"]
  build --> global["build-global-artifacts<br/>thirdshift-installer.sh"]
  build --> smoke["custom-release-smoke<br/>(release-smoke.yml)"]
  smoke --> rocky["rocky: static-link check +<br/>thirdshift version in rockylinux:9"]
  smoke --> wsl["wsl: thirdshift version in<br/>WSL2 Ubuntu-24.04 (windows-latest)"]
  global --> host["host: gh release create"]
  smoke --> host
  host --> announce --> notes["custom-release-notes<br/>(release-notes.yml): generated PR notes"]
Loading
+dist-workspace.toml                   # targets, shell installer → ~/.local/bin, custom jobs, pinned runners
+.github/workflows/release.yml         # generated by `dist generate`
+.github/workflows/release-smoke.yml   # gate → rocky + wsl, called before host
+.github/workflows/release-notes.yml   # body = generate-notes API + dist install notes
 Cargo.toml                           # + repository (installer URLs), + [profile.dist]
  • Gating: if rocky or wsl fails, host is skipped, so gh release create never runs and nothing is published.
  • Pull requests: pr-run-mode = "upload" builds on every pull request, and the plan's publishing is false, so host never runs. release-smoke.yml's gate job runs Rocky and WSL only when the pull request touches .github/workflows/release*.yml, dist-workspace.toml or Cargo.{toml,lock}, so this pull request runs them and ordinary ones don't. On a tag push they always run.
  • Installer: installs to ~/.local/bin and writes ~/.config/thirdshift/thirdshift-receipt.json, which the built-in thirdshift update (thirdshift update #34) can read. install-updater = false, so no separate thirdshift-update executable is shipped.

Evidence

  • Before: no release workflow; thirdshift can only be built from a clone.
    After (local, dist 0.33.0):
    $ dist build --artifacts=local --target=x86_64-unknown-linux-musl
    $ tar -tJf target/distrib/thirdshift-x86_64-unknown-linux-musl.tar.xz
    thirdshift-x86_64-unknown-linux-musl/{LICENSE,README.md,thirdshift}
    $ file thirdshift-x86_64-unknown-linux-musl/thirdshift
    ELF 64-bit LSB pie executable, x86-64, ... static-pie linked
    $ thirdshift-x86_64-unknown-linux-musl/thirdshift version
    thirdshift 0.1.0
    $ dist build --artifacts=global   # thirdshift-installer.sh
    _install_dir="$INFERRED_HOME/.local/bin"; receipt → $RECEIPT_HOME/thirdshift-receipt.json
    
    dist plan passes, so the generated workflow is up to date. actionlint is clean on every workflow. cargo fmt --check, cargo clippy -D warnings and cargo test all pass.
  • On this PR (Release run): plan, both build-local-artifacts, build-global-artifacts, custom-release-smoke / gate, / rocky and / wsl pass. host, announce and custom-release-notes are skipped, and gh release list is empty.
    rocky: thirdshift-x86_64-unknown-linux-musl/thirdshift: ELF 64-bit LSB pie executable, x86-64, ... static-pie linked
           Rocky Linux release 9.3 (Blue Onyx)
           thirdshift 0.1.0
    wsl:   PRETTY_NAME="Ubuntu 24.04.4 LTS"      (after grep -q WSL2 /proc/version)
           thirdshift 0.1.0
    
    The WSL job takes about 9 minutes, most of it in setup-wsl installing Ubuntu. That's why the gate job keeps it off ordinary pull requests.

Merge Danger

Door: two-way

Merging publishes nothing. A Release only happens when a v* tag is pushed (#38). Reverting removes the workflow.

Blast Radius: CI

Every pull request now also runs the dist plan and builds (Linux musl, macOS, installer). A bad tag push after merge could publish a Release under the project's name, so review closely.

Unaddressed findings

Standards

  • wsl job uses windows-latest, not a pinned image: the issue explicitly asks for "WSL2 with Ubuntu 24.04 on a windows-latest runner", and Windows isn't a supported thirdshift platform that needs pinning.
  • Duplicated actual=…; [ "$actual" = "$EXPECTED" ] check in rocky and wsl: it's three lines, one run through docker and one inside WSL, so extracting it would add indirection for no gain.
  • Smells in src/main.rs (placeholder update, shadowed arg): a false positive. The review diffed against a stale local main, and that code comes from Command surface: help, version and argument errors #31, which is already merged, not from this pull request.

Spec

  • pr-run-mode = "upload" makes every PR pay for the dist builds: dist can only build on pull requests in upload mode, and building is needed to prove the pipeline on this pull request. The acceptance criteria only keep the Rocky and WSL jobs off ordinary pull requests.
  • Release notes are swapped in after the Release is published, not atomically: dist has no hook for setting the body at creation other than a CHANGELOG file, and the issue rules that out. The notes job builds the body from the plan, so re-running it is safe.
  • The smoke gate ignores src/ changes: this is intended. Running Rocky and WSL for source changes would make ordinary pull requests pay, and the tag run always smoke-tests before publishing.

Closes #33

🤖 Generated with Claude Code

JacobStephens2 and others added 3 commits September 25, 2026 15:45
…hing

A v* tag now builds static x86_64-unknown-linux-musl and aarch64-apple-darwin
binaries plus a shell installer for ~/.local/bin, runs the musl binary's
`thirdshift version` on Rocky Linux 9 and in WSL2 with Ubuntu 24.04, and only
then publishes the GitHub Release, with notes generated from merged pull
requests. The customisations are dist custom jobs, so `dist generate` keeps
them. Pull requests build without publishing; the Rocky and WSL jobs only run
when a pull request touches the release pipeline or the dependencies.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… source tarball

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JacobStephens2
JacobStephens2 merged commit 06475cf into main Sep 25, 2026
12 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-33 branch September 25, 2026 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Release pipeline: binaries, installer and platform smoke tests

1 participant