diff --git a/.github/actions/setup-runner/action.yml b/.github/actions/setup-runner/action.yml index 65fc656df..e6a7f064c 100644 --- a/.github/actions/setup-runner/action.yml +++ b/.github/actions/setup-runner/action.yml @@ -37,17 +37,24 @@ runs: echo "Exported UV environment variables for current and subsequent steps" fi - echo "Clearing Python bytecode cache and uv cache to ensure fresh install" + echo "Clearing cached virtual environment to ensure fresh install" + # Remove cached venv that may contain old code + if [ -d ".venv" ]; then + echo "Removing cached .venv directory" + rm -rf .venv + fi + + # Clear Python bytecode cache find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true find . -name "*.pyc" -delete 2>/dev/null || true - + # Clear uv's cache directory to force rebuilding wheels from source if [ -n "$UV_CACHE_DIR" ] && [ -d "$UV_CACHE_DIR" ]; then echo "Clearing UV cache at $UV_CACHE_DIR" rm -rf "$UV_CACHE_DIR"/* fi - echo "Syncing dependencies with uv" + echo "Syncing dependencies with uv (will create fresh venv)" uv sync --all-groups echo "Force reinstalling llama-stack from source to ensure latest changes"