From 14147a62ead1da30c3e5f6391c5f3d08edc8b5b9 Mon Sep 17 00:00:00 2001 From: benlebrun Date: Tue, 21 Jan 2025 17:27:09 -0500 Subject: [PATCH] add env-no-vllm target for gh actions runs --- .github/workflows/pytest.yml | 7 +------ Makefile | 6 ++++-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 12f5c741..4a1ed9cc 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -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 diff --git a/Makefile b/Makefile index 5c08b8e0..828eb140 100644 --- a/Makefile +++ b/Makefile @@ -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 @@ -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; \ @@ -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)