-
Notifications
You must be signed in to change notification settings - Fork 1.1k
51 lines (46 loc) · 1.3 KB
/
Copy pathpull_request.yml
File metadata and controls
51 lines (46 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build and Test
on:
pull_request:
push:
branches:
- main
# For testing CI without starting a pull request:
- test/*
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
check_lint:
name: Check Lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v5
- uses: pre-commit/action@v3.0.1
mac_build_and_test:
name: macOS
if: github.repository == 'ml-explore/mlx-lm'
runs-on: 'macos-26-xlarge'
steps:
- uses: actions/checkout@v7
- uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: false
quiet: true
- name: Hardware info
run: system_profiler SPHardwareDataType
- name: Install
run: |
uv venv --python 3.10
uv pip install -e ".[test]"
- name: Run tests
env:
METAL_DEVICE_WRAPPER_TYPE: 1
METAL_DEBUG_ERROR_MODE: 0
HF_HOME: .
run: |
curl -s -o test_data.zip -L https://github.com/ml-explore/mlx-lm/releases/download/test_data/test_data.zip
unzip -q test_data.zip
uv run python -m unittest discover -v tests
uv run mlx.launch -n 2 python tests/model_parallel_tests.py