|
32 | 32 | cache: pip
|
33 | 33 | - name: Install uv
|
34 | 34 | run: pip install uv
|
35 |
| - - name: Install PyTorch manually |
36 |
| - # PyTorch has to be installed manually in a separate step with --no-cache-dir |
37 |
| - # to avoid pip getting killed because PyTorch is too big |
38 |
| - # See: https://stackoverflow.com/a/54329850 |
39 |
| - run: uv pip install --system torch==2.2.2 torchvision==0.17.2 --index-url https://download.pytorch.org/whl/cpu --no-cache-dir |
40 |
| - - name: Upgrade dependencies |
41 |
| - run: uv pip install --system --upgrade -e .[all,dev] torch==2.2.2 torchvision==0.17.2 |
42 |
| - - name: Verify dependencies |
43 |
| - run: uv pip check && pip check |
44 |
| - - name: Write header to requirements.txt |
45 |
| - run: echo '# This file is automatically generated by GitHub Actions and contains pinned versions for all transitive Python dependencies. Do not modify this file!' > requirements.txt |
46 |
| - - name: Write dependencies to requirements.txt |
47 |
| - # grep is used to exclude dependencies installed in editable mode |
48 |
| - # and dependencies installed from outside PyPI. |
49 |
| - # sed is used to loosen the version matches for PyTorch |
50 |
| - # so that any CUDA version matches. |
51 |
| - run: pip freeze | grep -v -E "( @ |^-e)" | sed -E 's/==([A-Za-z0-9.]+)\+[A-Za-z0-9.]+/~=\1/' >> requirements.txt |
| 35 | + - name: Resolve dependencies |
| 36 | + run: uv pip compile setup.cfg --extra all --extra dev --universal --no-annotate --constraints constraints.txt -o requirements.txt |
52 | 37 | # Need to manually run tests here because the pull request opened later will not
|
53 | 38 | # run the test workflow.
|
54 | 39 | #
|
|
59 | 44 | # if a workflow run pushes code using the repository's GITHUB_TOKEN, a new workflow
|
60 | 45 | # will not run even when the repository contains a workflow configured to run when
|
61 | 46 | # push events occur.
|
| 47 | + - name: Install HELM |
| 48 | + run: ./install-dev.sh |
| 49 | + - name: Verify dependencies |
| 50 | + run: pip check |
62 | 51 | - name: Run linter
|
63 | 52 | run: ./pre-commit.sh
|
64 | 53 | - name: Run tests
|
|
0 commit comments