Add tag-triggered release workflow with portable binary packaging#77
Merged
Merged
Conversation
Adds .github/workflows/release.yml: pushing a version tag (v*.*.*) builds Windows and Linux binaries (reusing ci.yml's build recipe), installs them into a relocatable bin/+share/chiselcad/ layout, packages each as a zip/ tarball, and publishes them to a GitHub Release via gh CLI. The install layout only works if the binary can find its shaders/fonts without the compile-time absolute build-tree paths baked in by CI, so this also adds src/util/ResourcePaths (with Win32/POSIX executable-path backends): it resolves shader/resource directories relative to the running executable first, falling back to the old compile-time paths for in-place dev builds. Application.cpp and CsgEvaluator.cpp now go through it instead of using CHISELCAD_SHADER_DIR/CHISELCAD_RESOURCE_DIR directly, and Pipeline.cpp's shader path joining was switched from raw string concatenation to std::filesystem::path so it doesn't depend on a trailing slash convention.
particlesector
commented
Jul 17, 2026
particlesector
left a comment
Owner
Author
There was a problem hiding this comment.
Reviewed. This is solid — I traced the actual bug carefully:
install(DIRECTORY ${SHADER_BINARY_DIR} DESTINATION share/chiselcad)(no trailing slash) installs toshare/chiselcad/shaders/*.spv, andinstall(DIRECTORY resources/ DESTINATION share/chiselcad/resources)(trailing slash) installs contents directly toshare/chiselcad/resources/*. Both matchinstalledCandidate()'sexeDir/../share/chiselcad/{shaders,resources}exactly — the runtime resolver lines up with the existing install rules.- The
Pipeline.cppswitch from string concat tostd::filesystem::pathjoins correctly fixes the trailing-slash assumption. release.yml's Windows/Linux job config (runner labels, Vulkan SDK version, vcpkg commit) matchesci.ymlexactly, as claimed.ResourcePathsPosix.cpp's__linux__-only guard mirrors the existingFileWatcherInotify.cppconvention (UNIX == Linux in this project), so it's not a new gap.
One minor, non-blocking observation: in resolveShaderDir()/resolveResourceDir(), if a stale share/chiselcad/ directory ever ends up next to a dev build (e.g. from an errant local cmake --install), it'll silently win over the live build-tree shaders since exists() is the only check. Unlikely in practice given the CI install prefix is install/, not worth changing.
Approving.
Generated by Claude Code
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
.github/workflows/release.yml: pushing a version tag (v[0-9]+.[0-9]+.[0-9]+*) builds Windows (MSVC 2026) and Linux (GCC) binaries using the same build recipe asci.yml, runs the test suite,cmake --installs each into a relocatablebin/+share/chiselcad/{shaders,resources}layout, packages each as a zip/tarball, and publishes both to a GitHub Release named after the tag.CHISELCAD_SHADER_DIR/CHISELCAD_RESOURCE_DIRwere baked in at compile time as absolute paths into the CI checkout tree, so a binary zipped up from CI and run on any other machine would fail to find its shaders/fonts.src/util/ResourcePaths.{h,cpp}withWin32/Posixexecutable-path backends, which resolve shader/resource directories relative to the running executable (preferring the installedshare/chiselcad/layout) and fall back to the old compile-time paths for in-place dev builds.Application.cpp/CsgEvaluator.cppnow go through this resolver instead of the rawCHISELCAD_SHADER_DIR/CHISELCAD_RESOURCE_DIRmacros.Pipeline.cpp's shader path building switched from string concatenation (which relied on a trailing-slash convention) tostd::filesystem::pathjoins.CMakeLists.txtwires the new sources into both thechiselcadandchiselcad_teststargets.cmake --installdoesn't do this automatically); Linux's static triplet needs no extra step.Test plan
ci.yml) passes on this branch (Windows + Linux build/test)vX.Y.Ztag against this branch (or after merge) and confirmrelease.ymlproduces a Windows zip and a Linux tarball and attaches both to a GitHub Releasebin/chiselcad(.exe)next toshare/chiselcad/{shaders,resources}resolves correctly)Generated by Claude Code