release: tag-driven engine pipeline with relocatable data bundle#5
Merged
Conversation
Push v* on main to publish: matrix builds in release mode, packages each
binary as volca-<version>-<os>-<arch>.{tar.gz,zip}, ships a platform-
independent volca-data-<data-version>.tar.gz from data/, emits
SHA256SUMS, creates the GH Release. _build-matrix.yml is the shared
matrix definition consumed by build.yml (PRs) and release.yml (tags); a
verify-tag job rejects tag/cabal-version drift before any runner spins up.
The engine honours VOLCA_DATA_DIR: relative "data/*" paths in the loaded
TOML are redirected to "$VOLCA_DATA_DIR/*" for the four reference-data
fields (geographies, flow synonyms, compartment mappings, units).
Database/method paths (user content) are unchanged. This lets the
binary and the data bundle ship and version independently.
release.sh deleted: the legacy local tag/push bypassed PR review. The
PR-driven procedure lives in docs/release.md.
This was referenced May 1, 2026
`</>` from `System.FilePath` returns '\' on Windows, producing mixed '/...\\...' paths from a TOML config that always uses '/'. The ConfigSpec asserts '/' and was failing on Windows CI for the three redirector tests. Replace `</>` with explicit '/' joining so the output is platform- independent. Both Windows and Unix file APIs accept '/' transparently.
ccomb
added a commit
that referenced
this pull request
May 2, 2026
## Summary
- \`install.sh\` (Linux + macOS): \`curl -fsSL …/install.sh | sh\`
- \`install.ps1\` (Windows): \`iwr -useb …/install.ps1 | iex\`
Both:
1. Detect platform (linux-amd64, linux-arm64, macos-arm64,
windows-amd64).
2. Resolve target tag (latest by default, or arg-supplied).
3. Download the SHA256SUMS file, then the matching binary tarball + data
bundle.
4. Verify both against SHA256SUMS.
5. Extract to \`~/.local/share/volca/{<version>,data/<data-version>}\`
(or \`%LOCALAPPDATA%\\volca\\...\` on Windows).
6. Maintain a \`data/current\` pointer (symlink / NTFS junction / copy
fallback).
7. Install a shim at \`~/.local/bin/volca\` (\`volca.cmd\` on Windows)
that exports \`VOLCA_DATA_DIR\` and execs the real binary.
8. Print PATH guidance if the bin dir isn't on PATH.
Stacked on #5 — needs the data bundle + GH Release publishing landed
first. Two short scripts, no clever shared template.
## Test plan
- [ ] Fresh Ubuntu container: \`curl -fsSL … | sh && volca --version\`
- [ ] Fresh macOS arm64: same
- [ ] Fresh Windows: \`iwr … | iex; volca --version\`
- [ ] Pinned version: \`curl -fsSL … | sh -s -- v0.7.0\`
- [ ] Repeat install: idempotent (no errors on re-run)
ccomb
added a commit
that referenced
this pull request
May 2, 2026
## Summary
\`pyvolca.download()\` makes the Python client self-contained: no PATH
munging, no manual install. Resolves the platform, fetches the binary
tarball + data bundle from the GH Release, verifies SHA256, extracts
both into the user cache, and \`Server.start()\` automatically picks
them up.
\`\`\`python
import volca
volca.download()
with volca.Server() as srv:
client = volca.Client(base_url=srv.base_url, ...)
\`\`\`
- **Idempotent**: re-calling \`download()\` with a populated cache
short-circuits without network.
- **Concurrency-safe**: kernel-level file lock (fcntl on Unix, msvcrt on
Windows) around the cache writes, so two scripts racing don't corrupt
each other's extraction. OS auto-releases on process death.
- **Cache layout** mirrors install.sh:
\`<cache>/<version>/volca[.exe]\`, \`<cache>/data/<data-version>/...\`,
\`<cache>/data/current\` pointer.
- \`Server\` resolution order: explicit \`binary=\` → cached download →
PATH → ad-hoc dev paths. \`VOLCA_DATA_DIR\` is set on the engine
subprocess.
- pyvolca **0.3.1** (additive — existing API unchanged). Adds
\`platformdirs\` dep.
- \`pyvolca-release.yml\` triggers PyPI Trusted Publishing on
\`pyvolca-v*\` tag push.
Stacked on #5 — depends on the GH Release format (SHA256SUMS + data
bundle) landing.
## Test plan
- [x] 18/18 unit tests pass (parser, verifier, platform detection,
cached binary, **lock serialises 4 concurrent threads**)
- [ ] \`pip install pyvolca==0.3.1 && python -c \"import volca;
volca.download(); s=volca.Server(); s.start(); print(s.base_url)\"\` on
Linux/macOS/Windows
- [ ] End-to-end: \`download() → Server() → Client.upload_database() →
query an inventory amount → assert non-empty\`
- [ ] Push \`pyvolca-v0.3.1\` tag → PyPI publish via Trusted Publishing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
v*on main → 4-platform matrix builds in release mode, each binary packaged asvolca-<version>-<os>-<arch>.{tar.gz,zip}. A platform-independentvolca-data-<data-version>.tar.gzis built from the in-treedata/dir. SHA256SUMS attached; GH Release auto-published._build-matrix.ymlis the single source of truth for the build steps;build.yml(PRs) andrelease.yml(tags) both consume it via `workflow_call`. A `verify-tag` job rejects tag-vs-`volca.cabal` version drift before any runner spins up.Test plan