Repository navigation
release: check that each NIF loads, and publish the sources of the tag - #90
Merged
Merged
Conversation
The build fails when a NIF needs a symbol that no library defines. The publish job checks out the tag, takes the checksum file of the merge, loads the precompiled NIF, and fails when Hex reports a failed docs upload.
With --no-config, mix rustler_precompiled.download read the version from the metadata of the last compile in any checkout, and wrote the checksums of that version. task checksum:download builds the NIF first, and fails on a missing asset.
The tag job needed only detect, so a failed build left a tag, and the next push skipped the version. A newer push cancelled the pending run of a checksum merge, and only that run publishes.
rustler_precompiled writes the metadata before the source build, so a compile in another checkout could change it while the build runs.
This was referenced Nov 12, 2026
release: fail the publish job on a failed docs upload, and check the dispatched tag
rubas/kagi_ex#54
Merged
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.
Before
The
Publish to Hexjob publishes the tree of the checksum merge, not the tag that the NIF archives were built from. The release build never checks that a NIF loads.mix hex.publishexits 0 when only the docs upload fails, so the job stays green.AGENTS.mdrefreshes the checksum file with--no-config, which skips the compile. The download then reads the version from the metadata of the last compile in any checkout, in~/.cache/rustler_precompiled/metadata. After a compile of 0.5.0 elsewhere:Problem
A fresh checkout writes the checksums of the release before, and
--ignore-unavailablehides a variant that the release lacks. A commit that merges between the version bump and the checksum PR ships in the Hex package, next to NIFs that were not built from it. A NIF with an undefined symbol gets a tag, a GitHub release, and a Hex version: the aarch64 NIF ofwhisper_ct20.7.1 does exactly that today (rubas/whisper_ct2#99).After
vX.Y.Zand the checksum file of the mergetask checksum:downloadbuilds first, with the metadata in_build, and fails on a missing assetThe same change for the other repos: rubas/cloaked_req#92, rubas/kagi_ex#54, rubas/exmpeg#101, rubas/whisper_ct2#100.
Details
The publish job came with #86, and
--no-configwith #31. The tag job needed onlydetectsince the first commit, so it pushed the tag while the NIFs still built. Hex 2.7.0 drops the docs error inMix.Tasks.Hex.Publish.finish_combined_publish/6.RustlerPrecompiled.available_nifs/1readsmetadata-Elixir.WhisperCpp.Native.exs, which only a compile of the module writes. The task setsWHISPER_CPP_BUILD=1, because a compile without it fetches the new NIF of the host, which the checksum file does not list yet.The job checks out the tag and takes only the checksum file from the merge, as
whisper_ct2does. A change after the tag ships with the next version. "Check that the NIF loads" runsldd -ron Linux andnm -m -uon macOS. Both bind every symbol, as the BEAM'sRTLD_NOWload does, and the check allows onlyenif_*, which the BEAM defines. The runner has no GPU driver, so the CUDA variants bindlibcuda.so.1to the toolkit's stub. ROCm puts no library path intold.so.conf.d, so the hipBLAS variant adds$ROCM_PATH/lib.The concurrency group now has
queue: max. With the default single slot, a newer push cancels the pending run, and only the run of the checksum merge publishes.A publish job that fails through a bug in the job itself cannot re-run with the fixed workflow file. We add no dispatch input for that: a patch release or an owner's
mix hex.publishof the tag covers it, and the case has not happened.Checks: zizmor pedantic is clean. A harness ran this step on all six 0.5.1 NIFs, on the release runners with the CUDA and ROCm toolkits: all pass, and a test NIF that misses
MKL_Free_Buffersfails on each runner (https://github.com/rubas/whisper_cpp/actions/runs/43276300228). The publish steps ran onepycagainst v0.5.1 withmix hex.publish --dry-run: the tree differs from the tag only in the checksum file, the checksum file equalsSHA256SUMS, and the NIF loads. The checksum outputs above come from a private rustler_precompiled cache with the metadata of 0.5.0.