Skip to content

Commit

Permalink
add env-no-vllm target for gh actions runs
Browse files Browse the repository at this point in the history
  • Loading branch information
benlebrun committed Jan 21, 2025
1 parent 0c2a882 commit 14147a6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
7 changes: 1 addition & 6 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,10 @@ jobs:
with:
fetch-depth: 1

- name: Set CUDA Environment Variables
run: |
echo "CUDA_HOME=/usr/local/cuda" >> $GITHUB_ENV
echo "PATH=$CUDA_HOME/bin:$PATH" >> $GITHUB_ENV
- name: Run Tests
run: |
python -m venv venv
source venv/bin/activate
sudo apt-get -y install graphviz
pip install --upgrade pip "setuptools>=62.4"
make pytest
make pytest-no-vllm
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ update :
.PHONY : env env-no-rust
env : $(NAME).egg-info/
env-no-rust : $(NAME).egg-info/
env-no-vllm : $(NAME).egg-info/
$(NAME).egg-info/ : setup.py
# check if rust is installed
# rustc --version
Expand All @@ -51,8 +52,8 @@ $(NAME).egg-info/ : setup.py
echo "Skipping vllm installation on Windows. GPU-accelerated inference with vllm will not be available."; \
$(INSTALL) -e ".[test]" && pre-commit install; \
else \
if [ "$$(uname -s)" = "Darwin" ]; then \
echo "Skipping vllm installation on macOS. GPU-accelerated inference with vllm will not be available."; \
if [ "$$(uname -s)" = "Darwin" ] || [ "$(MAKECMDGOALS)" = "env-no-vllm" ]; then \
echo "Skipping vllm installation. GPU-accelerated inference with vllm will not be available."; \
$(INSTALL) -e ".[test]" && pre-commit install; \
else \
$(INSTALL) -e ".[test,vllm]" && pre-commit install; \
Expand Down Expand Up @@ -103,6 +104,7 @@ test : ruff pytest
ruff : env
@ruff check --fix
pytest : env html/coverage/index.html
pytest-no-vllm : env-no-vllm html/coverage/index.html
html/coverage/index.html : html/pytest/report.html
@coverage html -d $(@D)
html/pytest/report.html : $(SRC_FILES) $(TEST_FILES)
Expand Down

0 comments on commit 14147a6

Please sign in to comment.