Feature/api parity roadmap #70
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: E2E Tests | |
| on: | |
| push: | |
| branches: [main, feature/*] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: e2e-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| e2e: | |
| runs-on: macos-15 | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Cache Swift packages | |
| uses: actions/cache@v4 | |
| with: | |
| path: .build | |
| key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }} | |
| restore-keys: | | |
| ${{ runner.os }}-spm- | |
| - name: Build (Release) | |
| run: swift build -c release | |
| - name: Install MLX Metal library | |
| run: | | |
| python3 -m venv /tmp/mlx_venv | |
| /tmp/mlx_venv/bin/pip install --quiet mlx | |
| cp /tmp/mlx_venv/lib/python*/site-packages/mlx/lib/mlx.metallib .build/release/ | |
| - name: Cache MLX model | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/huggingface | |
| key: mlx-model-qwen2.5-0.5b-4bit | |
| - name: TurboQuant unit tests | |
| run: | | |
| # Fast pre-flight: verify compression math before expensive model download. | |
| # Tests: Lloyd-Max centroids, WHT correctness, rotation orthogonality, | |
| # 3-bit pack/unpack, V-cache SNR (14.6 dB), K-cache IP SNR (13.7 dB), fp16. | |
| # No external deps — compiles standalone with clang++. | |
| clang++ -std=c++17 -O2 -o /tmp/tq_test tests/test_turbo_quant.cpp | |
| /tmp/tq_test | |
| - name: Run E2E tests | |
| env: | |
| HF_HUB_DOWNLOAD_TIMEOUT: "600" | |
| run: | | |
| chmod +x tests/test-server.sh | |
| # Retry up to 2 times for transient HuggingFace download failures | |
| for attempt in 1 2 3; do | |
| echo "Attempt $attempt of 3..." | |
| if tests/test-server.sh .build/release/SwiftLM 15413; then | |
| exit 0 | |
| fi | |
| if [ "$attempt" -lt 3 ]; then | |
| echo "Test failed, retrying in 10s..." | |
| sleep 10 | |
| fi | |
| done | |
| echo "All attempts failed" | |
| exit 1 | |
| - name: Upload test logs on failure | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: e2e-test-logs | |
| path: /tmp/SwiftLM-test-*.log | |
| retention-days: 7 |