Skip to content

Commit 76ed633

Browse files
committed
simplify verification
1 parent 026ceea commit 76ed633

File tree

1 file changed

+10
-33
lines changed

1 file changed

+10
-33
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -230,46 +230,23 @@ jobs:
230230
python -m twine check dist/*.tar.gz
231231
python -m twine check dist/*.whl
232232
233-
# Verification step to ensure sdist is complete
234-
- name: Verify sdist can build wheel
233+
- name: Verify sdist content
235234
run: |
236-
python -m pip install build setuptools wheel
237235
mkdir -p /tmp/sdist_test
238236
239-
# List all files in dist directory
240-
echo "Files in dist directory:"
241-
ls -la dist/
242-
243-
# Extract only the basemap sdist
244-
BASEMAP_SDIST=$(ls dist/basemap-*.tar.gz 2>/dev/null || echo "")
245-
246-
if [ -z "$BASEMAP_SDIST" ]; then
247-
echo "Basemap sdist not found with pattern 'basemap-*.tar.gz', trying alternative patterns..."
248-
BASEMAP_SDIST=$(ls dist/*basemap*.tar.gz 2>/dev/null | head -1 || echo "")
249-
fi
250-
251-
if [ -z "$BASEMAP_SDIST" ]; then
252-
echo "ERROR: Could not find any basemap sdist"
253-
exit 1
254-
fi
255-
256-
echo "Using sdist: $BASEMAP_SDIST"
257-
258-
# Extract just the one sdist file
237+
# Find and extract basemap sdist
238+
BASEMAP_SDIST=$(ls dist/basemap-*.tar.gz 2>/dev/null || ls dist/*basemap*.tar.gz 2>/dev/null | head -1)
259239
tar -xvf "$BASEMAP_SDIST" -C /tmp/sdist_test
260240
261-
# Enter extracted directory
262-
cd /tmp/sdist_test/*/
263-
264-
# Install and build
265-
python -m pip install -e .
266-
python -m build --wheel
241+
# Verify contents
242+
echo "Files in extracted sdist:"
243+
find /tmp/sdist_test -type f | grep -v "__pycache__" | sort
267244
268-
# Check for built wheel
269-
if [ -d "dist" ]; then
270-
ls -la dist/*.whl || echo "No wheels found in dist directory"
245+
# Check for critical files
246+
if [ -f "$(find /tmp/sdist_test -name "_geoslib.pyx")" ]; then
247+
echo "✓ Source files verified in sdist"
271248
else
272-
echo "No dist directory created"
249+
echo "✗ Missing critical source files in sdist"
273250
exit 1
274251
fi
275252

0 commit comments

Comments
 (0)