diff --git a/.github/actions/setup-runner/action.yml b/.github/actions/setup-runner/action.yml index e6a7f064c..18de15bd2 100644 --- a/.github/actions/setup-runner/action.yml +++ b/.github/actions/setup-runner/action.yml @@ -28,6 +28,7 @@ runs: shell: bash env: UV_EXTRA_INDEX_URL: ${{ steps.client-config.outputs.uv-extra-index-url }} + PYTHONDONTWRITEBYTECODE: 1 run: | # Export UV env vars for current step and persist to GITHUB_ENV for subsequent steps if [ -n "$UV_EXTRA_INDEX_URL" ]; then @@ -43,11 +44,11 @@ runs: 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" @@ -69,5 +70,9 @@ runs: uv pip install ${{ steps.client-config.outputs.install-source }} fi + echo "Final cleanup: removing all bytecode cache after installations" + find . -name "*.pyc" -type f -delete 2>/dev/null || true + find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true + echo "Installed llama packages" uv pip list | grep llama