mirror of
https://github.com/astral-sh/uv.git
synced 2025-07-07 13:25:00 +00:00
Add job to test PyPy venv creation on Windows (#5079)
## Summary This PR adds a new job to test that PyPy venvs are correctly created on Windows and they contain all the expected binaries. ## Test Plan Just let CI run.
This commit is contained in:
parent
41cd4bee58
commit
0b106908aa
1 changed files with 70 additions and 1 deletions
71
.github/workflows/ci.yml
vendored
71
.github/workflows/ci.yml
vendored
|
@ -531,7 +531,7 @@ jobs:
|
||||||
echo "$CONDA_PREFIX"
|
echo "$CONDA_PREFIX"
|
||||||
./uv pip install anyio
|
./uv pip install anyio
|
||||||
|
|
||||||
integration-test-pypy:
|
integration-test-pypy-linux:
|
||||||
needs: build-binary-linux
|
needs: build-binary-linux
|
||||||
name: "integration test | pypy on ubuntu"
|
name: "integration test | pypy on ubuntu"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -590,12 +590,81 @@ jobs:
|
||||||
|
|
||||||
- name: "Check version"
|
- name: "Check version"
|
||||||
run: |
|
run: |
|
||||||
|
.venv/bin/pypy --version
|
||||||
|
.venv/bin/pypy3 --version
|
||||||
.venv/bin/python --version
|
.venv/bin/python --version
|
||||||
|
|
||||||
- name: "Check install"
|
- name: "Check install"
|
||||||
run: |
|
run: |
|
||||||
./uv pip install anyio
|
./uv pip install anyio
|
||||||
|
|
||||||
|
integration-test-pypy-windows:
|
||||||
|
needs: build-binary-windows
|
||||||
|
name: "integration test | pypy on windows"
|
||||||
|
runs-on: windows-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "pypy3.9"
|
||||||
|
|
||||||
|
- name: "Download binary"
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: uv-windows-${{ github.sha }}
|
||||||
|
|
||||||
|
- name: PyPy info
|
||||||
|
run: Get-Command pypy
|
||||||
|
|
||||||
|
- name: "Create a virtual environment"
|
||||||
|
run: |
|
||||||
|
$pypy = (Get-Command pypy).source
|
||||||
|
.\uv.exe venv -p $pypy
|
||||||
|
|
||||||
|
- name: "Check for executables"
|
||||||
|
shell: python
|
||||||
|
run: |
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
def binary_exist(binary):
|
||||||
|
binaries_path = Path(".venv\\Scripts")
|
||||||
|
if (binaries_path / binary).exists():
|
||||||
|
return True
|
||||||
|
print(f"Executable '{binary}' not found in folder '{binaries_path}'.")
|
||||||
|
|
||||||
|
all_found = True
|
||||||
|
expected_binaries = [
|
||||||
|
"pypy3.9.exe",
|
||||||
|
"pypy3.9w.exe",
|
||||||
|
"pypy3.exe",
|
||||||
|
"pypyw.exe",
|
||||||
|
"python.exe",
|
||||||
|
"python3.9.exe",
|
||||||
|
"python3.exe",
|
||||||
|
"pythonw.exe",
|
||||||
|
]
|
||||||
|
for binary in expected_binaries:
|
||||||
|
if not binary_exist(binary):
|
||||||
|
all_found = False
|
||||||
|
|
||||||
|
if not all_found:
|
||||||
|
print("One or more expected executables were not found.")
|
||||||
|
sys.exit(1)
|
||||||
|
|
||||||
|
- name: "Check version"
|
||||||
|
run: |
|
||||||
|
& .venv\Scripts\pypy3.9.exe --version
|
||||||
|
& .venv\Scripts\pypy3.exe --version
|
||||||
|
& .venv\Scripts\python.exe --version
|
||||||
|
|
||||||
|
- name: "Check install"
|
||||||
|
env:
|
||||||
|
# Avoid debug build stack overflows.
|
||||||
|
UV_STACK_SIZE: 2000000 # 2 megabyte, double the default on windows
|
||||||
|
run: |
|
||||||
|
.\uv.exe pip install anyio
|
||||||
|
|
||||||
integration-test-github-actions:
|
integration-test-github-actions:
|
||||||
needs: build-binary-linux
|
needs: build-binary-linux
|
||||||
name: "integration test | github actions"
|
name: "integration test | github actions"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue