mirror of
https://github.com/karpathy/nanochat.git
synced 2026-03-21 12:23:13 +00:00
simplify test.yml
- one command for both platforms
This commit is contained in:
parent
7686d3c7e2
commit
3735eb9723
11
.github/workflows/test.yml
vendored
11
.github/workflows/test.yml
vendored
|
|
@ -29,24 +29,13 @@ jobs:
|
|||
|
||||
- name: Set up uv
|
||||
uses: astral-sh/setup-uv@v7
|
||||
# Linux: Request 'cpu' extra to force the pytorch-cpu index (prevents libcublas crash)
|
||||
- name: Install dependencies (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
uv sync --extra cpu
|
||||
uv pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu
|
||||
|
||||
# macOS: Standard sync
|
||||
- name: Install dependencies (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: uv sync
|
||||
|
||||
- name: Add nanochat to PYTHONPATH (Unix)
|
||||
run: |
|
||||
echo "PYTHONPATH=$(pwd):$PYTHONPATH" >> $GITHUB_ENV
|
||||
|
||||
- name: Run pytest
|
||||
run: |
|
||||
uv run --extra cpu pytest tests/ -v
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user