Skip to content
Closed
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
31 changes: 26 additions & 5 deletions .github/workflows/install-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,29 @@ jobs:
uses: actions/checkout@v4

- name: Set up Python 3.13
id: setup-python
uses: actions/setup-python@v6
with:
python-version: 3.13
cache: 'pip'

- name : Install uv (if applicable)
- name: Install uv (if applicable)
if: matrix.package_manager == 'uv'
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Cache venv (uv only)
if: matrix.package_manager == 'uv'
id: cache-venv
uses: actions/cache@v4
with:
path: .venv
key: venv-v1-${{ runner.os }}-${{ matrix.device }}-py${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
venv-v1-${{ runner.os }}-${{ matrix.device }}-py${{ steps.setup-python.outputs.python-version }}-



- name: Create virtual environment (pip GPU)
if: matrix.package_manager == 'pip' && matrix.device == 'gpu'
Expand All @@ -77,14 +93,19 @@ jobs:
python -m pip install --group dev .

- name: Setup environment with uv (if applicable)
if: matrix.package_manager == 'uv'
if: matrix.package_manager == 'uv' && steps.cache-venv.outputs.cache-hit != 'true'
run: |
uv venv --no-project
source .venv/bin/activate
uv pip install torch --index-url ${{ matrix.torch_index }}
uv pip install --group dev -e .
uv pip list
echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Add venv to PATH (uv)
if: matrix.package_manager == 'uv'
run: echo "$PWD/.venv/bin" >> $GITHUB_PATH

- name: Debug installed packages
if: matrix.package_manager == 'uv'
run: uv pip list

- name: Print torch version
run: |
Expand Down
Loading