Skip to content

Commit ce9c3c0

Browse files
authored
Swap from conda to uv for lint workflow (#367)
1 parent 5ababce commit ce9c3c0

File tree

2 files changed

+18
-21
lines changed

2 files changed

+18
-21
lines changed

.github/workflows/lint.yml

Lines changed: 17 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ on:
1010
jobs:
1111
lint:
1212
runs-on: ubuntu-latest
13+
14+
strategy:
15+
matrix:
16+
python-version: ["3.12"]
1317
defaults:
1418
run:
1519
shell: bash -l {0}
@@ -18,34 +22,26 @@ jobs:
1822
- name: Check out code
1923
uses: actions/checkout@v4
2024

21-
- name: Set up Miniconda
22-
uses: conda-incubator/setup-miniconda@v3
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v6
2327
with:
24-
activate-environment: torch27
25-
python-version: 3.12
26-
channels: defaults,pytorch,conda-forge
28+
python-version: ${{ matrix.python-version }}
29+
enable-cache: true
2730

28-
- name: Cache dependencies
29-
uses: actions/cache@v4
30-
with:
31-
path: |
32-
~/.conda/pkgs
33-
~/.cache/pip
34-
key: ${{ runner.os }}-deps-${{ hashFiles('.github/workflows/lint.yml') }}
35-
restore-keys: |
36-
${{ runner.os }}-deps-
31+
- name: Create environment
32+
run: |
33+
uv venv --python ${{ matrix.python-version }}
3734
3835
- name: Install PyTorch
3936
run: |
40-
pip3 install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128
37+
uv pip install -U --pre torch --index-url https://download.pytorch.org/whl/nightly/cu128
4138
4239
- name: Install lint dependencies
43-
run: ./lint.sh install
44-
45-
- name: Install pre-commit
4640
run: |
47-
python -m pip install --upgrade pip
48-
pip install .'[dev]'
41+
uv pip install pyright==1.1.403
42+
uv pip install pre-commit
43+
uv pip install .'[dev]'
4944
5045
- name: Run pre-commit
51-
run: pre-commit run --all-files
46+
run: |
47+
uv run pre-commit run --all-files

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,4 @@ torch
9191
benchmarks/tritonbench
9292
site
9393
generated
94+
uv.lock

0 commit comments

Comments
 (0)