Skip to content

Add GitHub Actions CI/CD workflow for multi-platform builds#12

Merged
infil00p merged 19 commits into
mainfrom
add_ci_cd
Dec 19, 2025
Merged

Add GitHub Actions CI/CD workflow for multi-platform builds#12
infil00p merged 19 commits into
mainfrom
add_ci_cd

Conversation

@infil00p

Copy link
Copy Markdown
Contributor

Set up automated builds and tests for Linux, macOS, and Windows using GitHub Actions. The workflow runs on pushes to main and pull requests to main, building Tauri application bundles for all three platforms and running Rust tests.

🤖 Generated with Claude Code

Set up automated builds and tests for Linux, macOS, and Windows using GitHub Actions. The workflow runs on pushes to main and pull requests to main, building Tauri application bundles for all three platforms and running Rust tests.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@infil00p
infil00p marked this pull request as ready for review December 16, 2025 07:15
infil00p and others added 18 commits December 16, 2025 06:45
Add steps to download the latest llama.cpp release binaries for each platform:
- Linux: ubuntu-x64 (CPU)
- macOS: macos-arm64 (Metal)
- Windows: win-vulkan-x64 (Vulkan)

Libraries are extracted and copied to the appropriate src-tauri/libs/<platform>/ directories before building. This avoids the need to commit large binary files to the repository or build llama.cpp from source during CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Update workflow to download from the correct repository (ggml-org/llama.cpp) and pin to the specific release version b7423 instead of dynamically fetching the latest version.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
All llama.cpp release archives extract to the 'llama-b7423' directory, not the full archive filename. Updated all three platform steps to use the correct extracted directory name.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Change from find with -exec to direct cp -P which preserves symlinks properly. This ensures both versioned libraries (libllama.0.dylib) and their symlinks (libllama.dylib) are copied correctly for the linker to find them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Add platform-specific environment variables so test binaries can find the llama.cpp libraries at runtime:
- Linux: LD_LIBRARY_PATH
- macOS: DYLD_LIBRARY_PATH
- Windows: PATH

This ensures the dynamic linker can locate libllama, libmtmd, and libggml when running cargo test.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Add Tauri configuration to bundle llama.cpp libraries with production binaries:

- macOS: Already configured to bundle dylibs into Frameworks
- Linux: Added resources config to bundle .so files alongside binary
         Updated RPATH to use $ORIGIN so binary finds libs at runtime
- Windows: Added resources config to bundle DLLs alongside executable

This ensures distributed binaries can find and load llama.cpp libraries without requiring users to install them separately.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Change resources from object to array format, which is the correct Tauri v2 syntax.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Create a src-tauri/resources directory and copy platform-specific libraries there before building. This avoids Tauri errors about missing platform-specific paths while ensuring libraries are bundled into the final application.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
Tests that require SmolVLM model files now check for CI environment
variable and skip automatically in GitHub Actions.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Added CI environment check to all tests that require SmolVLM model
files to be present locally. These tests will now skip automatically
in GitHub Actions while still running locally.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The LlamaModelParams, LlamaContextParams, and MtmdContextParams structs
were simplified/incorrect and didn't match the actual C ABI from
llama.cpp. This caused stack corruption and SIGSEGV on macOS when
calling llama_model_default_params() which returns a 72-byte struct.

Updated to match the correct definitions from inference_engine.rs.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The test was checking for lowercase "canvas" but macOS uses "Canvas"
in the path (~/Library/Application Support/ai.baseweight.Canvas/).
Made the check case-insensitive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Extract to named directory and recursively find DLLs since the zip
structure may differ from the tar.gz structure on other platforms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Use PowerShell to modify PATH within the shell script instead of
overriding it in the env block, which was losing the cargo path.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Windows linker needs .lib files to link against DLLs, not just the
.dll files themselves.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The llama.cpp binary releases only include .dll files, not the .lib
import libraries needed for MSVC linking. This adds a step to generate
the import libraries using dumpbin and lib.exe from Visual Studio.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Windows builds require import library (.lib) generation from DLLs
which needs more work. Disabling for now to unblock Linux/macOS CI.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@infil00p
infil00p merged commit b03df21 into main Dec 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant