Skip to content

Commit 54b36d8

Browse files
committed
Document release process and update project status
- Created RELEASE_PROCESS.md with complete release workflow - Updated FINE_PLAN.md to reflect Phase 6D completion (prebuilt binaries) - Updated FINE_PLAN.md status to v0.2.0 released - Deleted research/GITHUB_RELEASE_PLAN.md (implementation complete)
1 parent 3bbafab commit 54b36d8

3 files changed

Lines changed: 243 additions & 999 deletions

File tree

FINE_PLAN.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# Natch: FINE Wrapper Implementation Plan
22

3-
**Last Updated:** 2025-11-01
4-
**Status:** ✅ Phases 1-5 Complete + Phase 6 Timeout Support
5-
**Timeline:** MVP achieved in ~1 hour, Production-ready with advanced types, nesting, and timeout configuration in ~10 hours
3+
**Last Updated:** 2025-11-04
4+
**Status:** ✅ Phases 1-6 Complete + v0.2.0 Released to Hex.pm
5+
**Timeline:** MVP achieved in ~1 hour, Production-ready v0.2.0 with precompiled binaries published
66

77
---
88

@@ -967,11 +967,49 @@ Added three configurable socket-level timeout options to prevent operations from
967967
- Multiple Elixir/OTP version combinations verified
968968
- Zero memory leaks verified via valgrind
969969

970-
**Remaining for Public Release:**
970+
### ✅ Phase 6D: Prebuilt Binary System (COMPLETED)
971+
972+
**Status:** Complete - v0.2.0 published to Hex.pm with precompiled binaries
973+
974+
**Deliverables Completed:**
975+
976+
1. **Precompiler Configuration**
977+
- ✅ mix.exs configured with cc_precompiler
978+
- ✅ GitHub release URL template configured
979+
- ✅ NIF version 2.17 (OTP 26-28) specified
980+
- ✅ checksum*.exs added to package files
981+
- ✅ checksum*.exs added to .gitignore
982+
983+
2. **GitHub Actions Workflow**
984+
- ✅ Created .github/workflows/precompile.yml
985+
- ✅ Builds on tag push (v*)
986+
- ✅ 7 platform binaries generated:
987+
- x86_64-linux-gnu
988+
- aarch64-linux-gnu
989+
- x86_64-apple-darwin
990+
- aarch64-apple-darwin
991+
- armv7l-linux-gnueabihf (cross-compiled)
992+
- i686-linux-gnu (cross-compiled)
993+
- riscv64-linux-gnu (cross-compiled)
994+
995+
3. **Release Process**
996+
- ✅ v0.2.0 tagged and pushed
997+
- ✅ GitHub Actions built all binaries
998+
- ✅ Checksums generated with `mix elixir_make.checksum --all`
999+
- ✅ Published to Hex.pm successfully
1000+
- ✅ Verified with fresh test installation
1001+
1002+
**Verification:**
1003+
Created test project that successfully:
1004+
- Downloaded precompiled binary from Hex.pm cache
1005+
- Connected to ClickHouse
1006+
- Executed all basic operations (CREATE, INSERT, SELECT)
1007+
- Tested both row-major and columnar formats
1008+
- Verified type system and aggregations work
1009+
1010+
**Remaining for Future Releases:**
9711011
- ⏳ Phase 6C: Parameterized queries
972-
- ⏳ Phase 6D: Prebuilt binaries - 4 tested platforms + cross-compilation (see research/GITHUB_RELEASE_PLAN.md)
973-
- ⏳ Phase 6E: Documentation polish for public consumption
974-
- ⏳ Hex.pm publication
1012+
- ⏳ Phase 6E: Additional documentation polish
9751013

9761014
### Phase 6C: Parameterized Queries
9771015

RELEASE_PROCESS.md

Lines changed: 198 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,198 @@
1+
# Natch Release Process
2+
3+
This document describes the complete process for releasing a new version of Natch to Hex.pm with precompiled binaries.
4+
5+
## Prerequisites
6+
7+
- All tests passing locally (`mix test`)
8+
- All tests passing on GitHub Actions
9+
- CHANGELOG.md updated with new version
10+
- No compiler warnings
11+
12+
## Release Steps
13+
14+
### 1. Update Version
15+
16+
Update the version in `mix.exs`:
17+
18+
```elixir
19+
@version "0.X.Y"
20+
```
21+
22+
### 2. Update CHANGELOG.md
23+
24+
Add a new section for the release:
25+
26+
```markdown
27+
## [0.X.Y] - YYYY-MM-DD
28+
29+
### Added
30+
- New features...
31+
32+
### Changed
33+
- Changes to existing functionality...
34+
35+
### Fixed
36+
- Bug fixes...
37+
```
38+
39+
### 3. Commit and Tag
40+
41+
```bash
42+
# Commit version bump
43+
git add mix.exs CHANGELOG.md
44+
git commit -m "Release v0.X.Y"
45+
46+
# Create annotated tag
47+
git tag -a v0.X.Y -m "Release v0.X.Y"
48+
49+
# Push to GitHub (triggers precompile workflow)
50+
git push origin main --tags
51+
```
52+
53+
### 4. Wait for GitHub Actions
54+
55+
The `.github/workflows/precompile.yml` workflow will automatically:
56+
- Build precompiled binaries for 7 platforms
57+
- Upload them to the GitHub Release
58+
- This takes approximately 10-15 minutes
59+
60+
Monitor the workflow at:
61+
```
62+
https://github.com/Intellection/natch/actions
63+
```
64+
65+
Expected binaries:
66+
- `natch-nif-2.17-x86_64-linux-gnu-0.X.Y.tar.gz`
67+
- `natch-nif-2.17-aarch64-linux-gnu-0.X.Y.tar.gz`
68+
- `natch-nif-2.17-x86_64-apple-darwin-0.X.Y.tar.gz`
69+
- `natch-nif-2.17-aarch64-apple-darwin-0.X.Y.tar.gz`
70+
- `natch-nif-2.17-armv7l-linux-gnueabihf-0.X.Y.tar.gz` (cross-compiled)
71+
- `natch-nif-2.17-i686-linux-gnu-0.X.Y.tar.gz` (cross-compiled)
72+
- `natch-nif-2.17-riscv64-linux-gnu-0.X.Y.tar.gz` (cross-compiled)
73+
74+
### 5. Generate Checksums
75+
76+
Once GitHub Actions completes:
77+
78+
```bash
79+
# Generate checksums for all precompiled binaries
80+
MIX_ENV=prod mix elixir_make.checksum --all --ignore-unavailable
81+
```
82+
83+
This creates `checksum.exs` in your working directory with SHA256 hashes of all binaries.
84+
85+
**Important:**
86+
- This file is in `.gitignore` (don't commit it)
87+
- This file is in `mix.exs` package `files:` list (will be included in Hex package)
88+
89+
### 6. Verify Package
90+
91+
```bash
92+
# Build the package
93+
mix hex.build
94+
95+
# Verify checksum.exs is included
96+
tar -tzf natch-0.X.Y.tar | grep checksum
97+
98+
# Should see: checksum.exs
99+
```
100+
101+
### 7. Publish to Hex.pm
102+
103+
```bash
104+
# Publish (will include checksum.exs)
105+
mix hex.publish
106+
```
107+
108+
Follow the prompts and confirm the publication.
109+
110+
### 8. Verify Installation
111+
112+
Create a test project to verify:
113+
114+
```bash
115+
mkdir /tmp/natch-verify && cd /tmp/natch-verify
116+
mix new . --app test_natch
117+
```
118+
119+
Add to `mix.exs`:
120+
```elixir
121+
{:natch, "~> 0.X.Y"}
122+
```
123+
124+
Test installation:
125+
```bash
126+
mix deps.get
127+
128+
# Look for: "Downloading precompiled NIF to ..."
129+
# Should NOT see CMake/compiler output
130+
```
131+
132+
Test functionality:
133+
```bash
134+
# With ClickHouse running on localhost:9000
135+
iex -S mix
136+
137+
iex> {:ok, conn} = Natch.Connection.start_link(host: "localhost", port: 9000)
138+
iex> Natch.Connection.execute(conn, "SELECT 1")
139+
```
140+
141+
## Troubleshooting
142+
143+
### Checksums don't match
144+
- Ensure GitHub Actions completed successfully
145+
- Check the v0.X.Y release has all 7 binaries
146+
- Try deleting local cache: `rm -rf ~/.cache/elixir_make/`
147+
- Re-run: `MIX_ENV=prod mix elixir_make.checksum --all`
148+
149+
### Precompiled binary not downloading
150+
- Verify checksum.exs is in the Hex package: `mix hex.build` and inspect
151+
- Check GitHub release has public access to binaries
152+
- Verify the URL template in mix.exs matches: `https://github.com/Intellection/natch/releases/download/v#{@version}/@{artefact_filename}`
153+
154+
### Build fails for a platform
155+
- Cross-compiled platforms (armv7l, i686, riscv64) are best-effort
156+
- Users on those platforms will fall back to source compilation
157+
- This is expected and acceptable
158+
159+
## Post-Release
160+
161+
1. Announce on:
162+
- Elixir Forum
163+
- GitHub Discussions
164+
- Social media (optional)
165+
166+
2. Monitor for issues:
167+
- https://github.com/Intellection/natch/issues
168+
- Hex.pm package page
169+
170+
3. Clean up local artifacts:
171+
```bash
172+
rm checksum.exs
173+
```
174+
175+
## Quick Reference
176+
177+
```bash
178+
# Full release in one go (after version updates committed)
179+
git tag -a v0.X.Y -m "Release v0.X.Y"
180+
git push origin main --tags
181+
182+
# Wait ~10-15 min for GitHub Actions...
183+
184+
MIX_ENV=prod mix elixir_make.checksum --all --ignore-unavailable
185+
mix hex.build # verify
186+
mix hex.publish
187+
188+
# Clean up
189+
rm checksum.exs
190+
```
191+
192+
## Version Strategy
193+
194+
- **Patch (0.X.Y)**: Bug fixes, documentation, minor improvements
195+
- **Minor (0.X.0)**: New features, new types, API additions (backward compatible)
196+
- **Major (X.0.0)**: Breaking changes, API redesign
197+
198+
Current: v0.2.0 - First public release with precompiled binaries

0 commit comments

Comments
 (0)