|
| 1 | +# Releasing Cloudini as a conda package (pixi / prefix.dev + conda-forge) |
| 2 | + |
| 3 | +`conda/recipe.yaml` builds a conda package that ships: |
| 4 | + |
| 5 | +- `libcloudini_lib.so` (shared) + headers + a CMake package config |
| 6 | + (`find_package(cloudini_lib)` → `cloudini::cloudini_lib`) |
| 7 | +- the `cloudini_rosbag_converter` CLI |
| 8 | + |
| 9 | +The build is **hermetic**: it links conda's `zstd` / `lz4-c`, uses conda's |
| 10 | +`cxxopts`, and consumes `mcap` from a pre-fetched source (no network during the |
| 11 | +build script). The same recipe is used for both the prefix.dev channel and the |
| 12 | +conda-forge submission. |
| 13 | + |
| 14 | +## Prerequisites (one time) |
| 15 | + |
| 16 | +```bash |
| 17 | +pixi global install rattler-build # already installed here |
| 18 | +rattler-build auth login https://prefix.dev --token <YOUR_PREFIX_DEV_TOKEN> |
| 19 | +# token: prefix.dev → Settings → API tokens (needs write to the 'cloudini' channel) |
| 20 | +``` |
| 21 | + |
| 22 | +## Cut a release |
| 23 | + |
| 24 | +1. **Pick the version** and make it consistent in three places (they must equal |
| 25 | + the git tag): |
| 26 | + - `cloudini_lib/CMakeLists.txt` → `project(cloudini_lib VERSION X.Y.Z)` |
| 27 | + - `conda/recipe.yaml` → `context.version` |
| 28 | + - (optional) `cloudini_lib/package.xml` → `<version>` (ROS manifest) |
| 29 | + |
| 30 | +2. **Commit, tag, push:** |
| 31 | + ```bash |
| 32 | + git commit -am "release: X.Y.Z" |
| 33 | + git tag X.Y.Z |
| 34 | + git push origin main --tags |
| 35 | + ``` |
| 36 | + |
| 37 | +3. **Fill the source hash** in `conda/recipe.yaml`: |
| 38 | + ```bash |
| 39 | + curl -sL https://github.com/facontidavide/cloudini/archive/refs/tags/X.Y.Z.tar.gz \ |
| 40 | + | sha256sum |
| 41 | + # paste into source[0].sha256 |
| 42 | + ``` |
| 43 | + |
| 44 | +## Publish to your prefix.dev channel |
| 45 | + |
| 46 | +```bash |
| 47 | +# Build + upload + index in one step: |
| 48 | +rattler-build publish ./conda/recipe.yaml --to https://prefix.dev/cloudini |
| 49 | + |
| 50 | +# …or in two steps: |
| 51 | +rattler-build build --recipe conda/recipe.yaml -c conda-forge |
| 52 | +rattler-build upload prefix -c cloudini ./output/**/*.conda |
| 53 | +``` |
| 54 | + |
| 55 | +Verify from a clean env: |
| 56 | + |
| 57 | +```bash |
| 58 | +pixi init /tmp/cloudini-check && cd /tmp/cloudini-check |
| 59 | +pixi project channel add https://prefix.dev/cloudini |
| 60 | +pixi project channel add conda-forge |
| 61 | +pixi add cloudini |
| 62 | +pixi run cloudini_rosbag_converter --help |
| 63 | +``` |
| 64 | + |
| 65 | +## Submit to conda-forge (broad reach: `pixi add cloudini` with no extra channel) |
| 66 | + |
| 67 | +1. Fork `conda-forge/staged-recipes`. |
| 68 | +2. Copy `conda/recipe.yaml` to `recipes/cloudini/recipe.yaml` in that fork |
| 69 | + (it is already conda-forge-compatible: pinned tarball + sha256, |
| 70 | + `extra.recipe-maintainers`, hermetic build, run_exports-driven run deps). |
| 71 | +3. Open a PR. conda-forge CI builds linux-64/osx-64/osx-arm64. Once merged, a |
| 72 | + `cloudini-feedstock` repo is created for you to maintain; a bot opens version |
| 73 | + bump PRs automatically thereafter. |
| 74 | + |
| 75 | +Notes for the conda-forge review: |
| 76 | +- Windows is not enabled (POSIX-oriented CLI + `-msse4.1`); add a `bld.bat` + |
| 77 | + `skip` logic later if desired. |
| 78 | +- PCL is intentionally not a dependency, so `pcl_conversion.hpp` ships but is |
| 79 | + only usable by consumers that bring their own PCL. |
| 80 | + |
| 81 | +## Local dry-run without a tag |
| 82 | + |
| 83 | +Build straight from a checkout (no tag/sha256 needed) using a `path:` source — |
| 84 | +see the throwaway recipe used during bring-up. Handy for testing recipe/CMake |
| 85 | +changes before cutting a tag. |
| 86 | +``` |
| 87 | +
|
| 88 | +## What the packaging touched in the library |
| 89 | +
|
| 90 | +To make the library installable/consumable outside ament, this release added to |
| 91 | +`cloudini_lib/CMakeLists.txt` and its cmake modules: |
| 92 | +- `install(EXPORT ...)` + generated `cloudini_libConfig.cmake` for non-ament builds |
| 93 | +- `$ORIGIN/../lib` install RPATH so installed executables find the co-installed lib |
| 94 | +- shared-variant zstd/lz4 selection when the library is shared |
| 95 | +- `find_or_download_zstd.cmake`: accept conda's `zstd::libzstd_shared` / `zstd::libzstd` |
| 96 | +- `find_or_download_mcap.cmake`: `-DMCAP_INCLUDE_DIR=` offline hook |
| 97 | +- `mcap_converter` pinned `STATIC` so the CLI stays self-contained under `BUILD_SHARED_LIBS=ON` |
0 commit comments