Feature/api parity roadmap #99
Workflow file for this run
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
| name: Build | |
| on: | |
| push: | |
| branches: [main, develop, feature/*] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| build: | |
| runs-on: macos-15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install Metal Toolchain | |
| run: xcodebuild -downloadComponent MetalToolchain || true | |
| - name: Cache Swift packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| # Key includes product name so any rename (e.g. mlx-server→SwiftLM) | |
| # automatically busts the cache and prevents stale PCH errors. | |
| key: ${{ runner.os }}-spm-SwiftLM-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm-SwiftLM- | |
| - name: Resolve dependencies | |
| run: swift package resolve | |
| - name: Clear stale module cache | |
| # Prevents: "PCH was compiled with module cache path '…mlx-server…' | |
| # but the path is currently '…SwiftLM…'" after repo rename. | |
| run: find .build -type d -name ModuleCache -exec rm -rf {} + 2>/dev/null || true | |
| - name: Build (Release) | |
| run: swift build -c release | |
| - name: Verify binary | |
| run: | | |
| ls -lh .build/release/SwiftLM | |
| file .build/release/SwiftLM | |
| - name: TurboQuant unit tests | |
| run: | | |
| # Compile and run standalone C++ unit tests for the TurboQuant | |
| # KV cache compression algorithm (ported from TheTom/llama-cpp-turboquant). | |
| # Tests: centroids, WHT self-inverse, rotation orthogonality, | |
| # 3-bit pack/unpack, V-cache SNR, K-cache IP SNR, fp16 round-trip. | |
| clang++ -std=c++17 -O2 -o /tmp/tq_test tests/test_turbo_quant.cpp | |
| /tmp/tq_test |