Skip to content

Commit aa7d218

Browse files
committed
chore: debug wheel testing
1 parent f30cd9c commit aa7d218

1 file changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/build.yml

Lines changed: 28 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,33 @@ jobs:
2525
- name: Build wheels
2626
run: python -m cibuildwheel --output-dir wheelhouse
2727

28-
- name: Test wheel in virtual environment
28+
- name: Test wheels in virtual environments
2929
run: |
30-
python -m venv .venv
31-
source .venv/bin/activate || .venv/Scripts/activate
32-
pip install wheelhouse/*.whl
33-
python -c "import synapse"
34-
deactivate
30+
for wheel in wheelhouse/*.whl; do
31+
# Skip PyPy wheels for now (they need different handling)
32+
if [[ $wheel == *"pypy"* ]]; then
33+
echo "Skipping PyPy wheel: $wheel"
34+
continue
35+
fi
36+
37+
# Extract Python version from wheel name
38+
if [[ $wheel =~ cp([0-9]{2}) ]]; then
39+
PY_VERSION="${BASH_REMATCH[1]}"
40+
echo "Testing wheel $wheel with Python 3.${PY_VERSION}"
41+
42+
# Create new venv for this wheel
43+
python3.${PY_VERSION} -m venv .venv-${PY_VERSION}
44+
source .venv-${PY_VERSION}/bin/activate
45+
46+
# Install and test wheel
47+
pip install "$wheel"
48+
python -c "import synapse"
49+
deactivate
50+
51+
# Clean up
52+
rm -rf .venv-${PY_VERSION}
53+
fi
54+
done
3555
3656
- uses: actions/upload-artifact@v4
3757
with:
@@ -47,7 +67,8 @@ jobs:
4767
url: https://testpypi.org/p/science-synapse
4868
permissions:
4969
id-token: write
50-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
70+
if: false
71+
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
5172

5273
steps:
5374
- uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)