Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build

on:
push:
branches: [main]
branches: [main, develop]
pull_request:
branches: [main]

Expand All @@ -15,6 +15,14 @@ jobs:
- name: Install Metal Toolchain
run: xcodebuild -downloadComponent MetalToolchain || true

- name: Cache Swift packages
uses: actions/cache@v4
with:
path: .build
key: ${{ runner.os }}-spm-${{ hashFiles('Package.resolved') }}
restore-keys: |
${{ runner.os }}-spm-

- name: Resolve dependencies
run: swift package resolve

Expand All @@ -25,10 +33,3 @@ jobs:
run: |
ls -lh .build/release/mlx-server
file .build/release/mlx-server

- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: mlx-server-arm64
path: .build/release/mlx-server
retention-days: 30
55 changes: 55 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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

- 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: Run E2E tests
run: |
chmod +x tests/test-server.sh
tests/test-server.sh .build/release/mlx-server 15413

- name: Upload test logs on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: e2e-test-logs
path: /tmp/mlx-server-test-*.log
retention-days: 7
1 change: 1 addition & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ let package = Package(
dependencies: [
.product(name: "MLX", package: "mlx-swift"),
.product(name: "MLXLLM", package: "mlx-swift-lm"),
.product(name: "MLXVLM", package: "mlx-swift-lm"),
.product(name: "MLXLMCommon", package: "mlx-swift-lm"),
.product(name: "Transformers", package: "swift-transformers"),
.product(name: "Hummingbird", package: "hummingbird"),
Expand Down
Loading
Loading