Skip to content

Add a static Linux release pipeline - #7

Open
Jimbo4350 wants to merge 1 commit into
masterfrom
feat/release-pipeline
Open

Add a static Linux release pipeline#7
Jimbo4350 wants to merge 1 commit into
masterfrom
feat/release-pipeline

Conversation

@Jimbo4350

@Jimbo4350 Jimbo4350 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Context

cardano-sieve had no release machinery: no CI, no LICENSE file, no changelog, no --version, and a build that only linked because of a gitignored cabal.project.local. This PR adds the cardano-api release process (herald: changelog fragments per PR, a dispatchable Release workflow that opens a release PR, a signed cardano-sieve-A.B.C.D tag) without the CHaP upload, and a CI build that turns that tag into fully static Linux binaries (x86_64, aarch64) attached to a GitHub Release. Haskell PVP versions; first release will be 0.1.0.0; no Docker image yet.

What's in it

  • .github/workflows/build.yml — runs on cardano-sieve-* release tags only (plus workflow_dispatch for a dry run that uploads the tarballs as workflow artifacts without releasing). The devx toolchain (ghc98-static-minimal-iog) arrives as a prebuilt closure via input-output-hk/actions/devx, so nothing is compiled with nix. The cabal store is cached on the freeze file. The verify step asserts the binary is statically linked and, on tags, that --version matches the tag. The package step tars bin/cardano-sieve (stripped) with bash/zsh completions and the licence. On tags, a release job publishes the two tarballs, a sha256sums.txt, and the matching CHANGELOG.md section as the GitHub Release.
  • .github/workflows/check-pr-changelog.yml — herald-validate on every PR (fragment present, pr: matches), as in cardano-api.
  • .github/workflows/release.yml — herald-release on workflow_dispatch: computes the PVP version from fragments (or takes an explicit one), opens the release/cardano-sieve-A.B.C.D PR with the changelog section and cabal bump, and prints the signing/tagging commands. chap-instructions: false.
  • .herald.yml, .changes/ — herald config (kinds copied from cardano-api) and the initial-release fragment for this PR.
  • cabal.project.release — imports cabal.project and adds what a static musl link needs (executable-static, text -simdutf, formatting +no-double-conversion, blockio +serialblockio). Kept separate so dev builds don't rebuild the store.
  • --version via optparse-applicative's simpleVersioner and Paths_cardano_sieve.
  • LICENSE (Apache-2.0, matching the cabal file), CHANGELOG.md (herald header), RELEASING.md, scripts/ci/extract-changelog.sh (herald section format).
  • README installation section; usage examples now call the installed binary.

How to trust this PR

Local dry run of the exact release recipe (via the same devx entrypoint CI uses) (devx 5f05c1e, GHC 9.8.4, cabal.project.release):

  • fileELF 64-bit LSB executable, x86-64, statically linked; 208 MB unstripped, 124 MB stripped, 30 MB gzipped.
  • cardano-sieve --versioncardano-sieve 0.1.0.0; +RTS --inforts_thr, GHC 9.8.4.
  • Runs unmodified inside alpine:3.20 (no glibc).
  • Served the preview benchmark DB (--serve): /health reports version and checkpoint, /matches?unspent pages with X-Next-Cursor, /checkpoints answers, clean SIGTERM shutdown.
  • cabal test — 62/62 pass with the --version change. actionlint clean; all actions SHA-pinned.

The two static builds ran green on this PR's earlier revisions (before the triggers were narrowed to release tags): x86_64 30 min and aarch64 26 min cold. A release rehearsal on a throwaway tag exercised the release job end to end (assets, checksums, notes) and was then deleted. herald validate --diff --pr 7 and a herald batch --dry-run --version 0.1.0.0 were run locally against this branch.

Follow-ups (not here)

  • macOS aarch64 runner (dynamic against system libs, ad-hoc codesign).
  • Container image to ghcr.io/intersectmbo/cardano-sieve reusing the static artifact.
  • Migrate to a haskell.nix flake + Hydra download-only workflow once a Hydra jobset exists.

CI

First (cold-cache) run on this PR: x86_64-linux 30 min, aarch64-linux 26 min. Both binaries verified statically linked, --version = cardano-sieve 0.1.0.0, threaded RTS; tarballs ~30 MB.

@Jimbo4350
Jimbo4350 force-pushed the feat/release-pipeline branch 5 times, most recently from dcbf6eb to c289aaf Compare September 10, 2026 16:11
@Jimbo4350
Jimbo4350 marked this pull request as ready for review September 10, 2026 18:02
@Jimbo4350
Jimbo4350 force-pushed the feat/release-pipeline branch 2 times, most recently from d90a0b5 to 0fa36cd Compare September 10, 2026 19:59
Release binaries are built with plain cabal inside IOG's devx static shell
(musl GHC 9.8 with static libsodium-vrf, secp256k1, blst), on GitHub Actions
for x86_64-linux and aarch64-linux. Versioning, changelog and tagging follow
the cardano-api process (herald), without the CHaP upload: PRs carry a
changelog fragment in .changes/, the Release workflow batches them into a
release PR, and the signed cardano-sieve-A.B.C.D tag push publishes a GitHub
Release with the two tarballs, a sha256sums file, and the changelog section.

- .github/workflows/build.yml: runs on release tags (and by hand); devx toolchain comes as
  a prebuilt closure via input-output-hk/actions/devx; cabal store cached on
  the freeze file; verifies the binary is static and that --version matches
  the tag; packages bin/ plus completions and LICENSE; release job on tags.
- .github/workflows/check-pr-changelog.yml: herald-validate on every PR.
- .github/workflows/release.yml: herald-release (workflow_dispatch), opens
  the release PR; no CHaP instructions.
- .herald.yml, .changes/: herald config (PVP kinds as in cardano-api) and
  the initial-release fragment.
- cabal.project.release: imports cabal.project and adds the flags a static
  musl link needs (text -simdutf, formatting +no-double-conversion,
  blockio +serialblockio, executable-static), kept out of cabal.project so
  dev builds don't rebuild the store.
- --version flag (optparse-applicative simpleVersioner, Paths_cardano_sieve).
- LICENSE (Apache-2.0), CHANGELOG.md header, RELEASING.md,
  scripts/ci/extract-changelog.sh (herald section format).
- README: Installation section for the release tarballs.
@Jimbo4350
Jimbo4350 force-pushed the feat/release-pipeline branch from 0fa36cd to a7413a3 Compare September 10, 2026 20:30
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.

1 participant