Skip to content

Commit 92834fe

Browse files
authored
Merge pull request #109 from labstreaminglayer/verify_whl
And step to verify wheels
2 parents d6ad617 + 85c80e9 commit 92834fe

1 file changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/publish-to-pypi.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,14 @@ jobs:
4949
pyarch: x64
5050
asset: "liblsl-${LSL_RELEASE}-Win_amd64.zip"
5151
extract: "unzip -oj liblsl.zip '*/bin/lsl.dll' -d src/pylsl/lib"
52+
platform_tag: "win_amd64"
5253
- name: "Windows x86"
5354
os: windows-latest
5455
arch: i386
5556
pyarch: x86
5657
asset: "liblsl-${LSL_RELEASE}-Win_i386.zip"
5758
extract: "unzip -oj liblsl.zip '*/bin/lsl.dll' -d src/pylsl/lib"
59+
platform_tag: "win32"
5860
- name: "macOS universal"
5961
os: macos-latest
6062
arch: universal
@@ -64,6 +66,7 @@ jobs:
6466
unzip xcframework.zip
6567
cp lsl.xcframework/macos-arm64_x86_64/lsl.framework/Versions/A/lsl src/pylsl/lib/liblsl.dylib
6668
codesign -s - -f src/pylsl/lib/liblsl.dylib
69+
platform_tag: "macosx_11_0_universal2"
6770
- name: "Linux x86_64"
6871
os: ubuntu-22.04
6972
arch: x86_64
@@ -114,13 +117,30 @@ jobs:
114117
- name: Build wheel
115118
run: uv build --wheel
116119

120+
- name: Tag wheel with platform
121+
if: matrix.config.platform_tag
122+
run: |
123+
pip install wheel
124+
wheel tags --platform-tag ${{ matrix.config.platform_tag }} dist/*.whl
125+
rm -f dist/*-none-any.whl
126+
ls -la dist/
127+
128+
- name: Inspect wheel contents
129+
run: |
130+
python -m zipfile -l dist/*.whl | grep -E '\.(dll|so|dylib)' || echo "No native libraries found in wheel!"
131+
117132
- name: Repair wheel (Linux)
118133
if: matrix.config.repair
119134
run: |
120135
pip install auditwheel patchelf
121136
auditwheel repair dist/*.whl -w dist/
122137
rm dist/*-none-any.whl
123138
139+
- name: Test wheel
140+
run: |
141+
pip install dist/*.whl
142+
python -c "import pylsl; print(pylsl.library_info())"
143+
124144
- name: Upload wheels
125145
uses: actions/upload-artifact@v4
126146
with:
@@ -149,5 +169,4 @@ jobs:
149169
uses: astral-sh/setup-uv@v4
150170

151171
- name: Publish to PyPI
152-
if: github.event_name == 'release'
153-
run: uv publish dist/*
172+
run: uv publish dist/* ${{ github.event_name != 'release' && '--dry-run -v' || '' }}

0 commit comments

Comments
 (0)