Update duckdb_jdbc to 1.5.3.0 #2596
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Python Publish | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| # Only run on PRs with specific labels | |
| types: [labeled, synchronize] | |
| workflow_dispatch: | |
| schedule: | |
| # Run full tests weekly on Sunday at 00:00 UTC | |
| - cron: '0 0 * * 0' | |
| jobs: | |
| build-wheels: | |
| name: Build Python wheels | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Fetch all tags for setuptools_scm | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.11' | |
| # First, try to download native library artifacts from latest workflow | |
| - name: Download native library artifacts from latest workflow | |
| uses: dawidd6/action-download-artifact@v21 | |
| continue-on-error: true | |
| id: download-artifacts | |
| with: | |
| workflow: native.yml | |
| workflow_conclusion: success | |
| name: wvc-lib | |
| path: native-libs/ | |
| if_no_artifact_found: warn | |
| # If artifacts don't exist, create dummy libraries for testing | |
| - name: Create dummy native libraries if artifacts not found | |
| if: steps.download-artifacts.outcome != 'success' | |
| run: | | |
| echo "Native artifacts not found, creating dummy libraries for testing" | |
| mkdir -p native-libs/linux-x64 | |
| mkdir -p native-libs/linux-arm64 | |
| mkdir -p native-libs/mac-arm64 | |
| mkdir -p native-libs/windows-x64 | |
| mkdir -p native-libs/windows-arm64 | |
| touch native-libs/linux-x64/libwvlet.so | |
| touch native-libs/linux-arm64/libwvlet.so | |
| touch native-libs/mac-arm64/libwvlet.dylib | |
| touch native-libs/windows-x64/wvlet.dll | |
| touch native-libs/windows-arm64/wvlet.dll | |
| - name: Display structure of downloaded files | |
| run: | | |
| if [ -d "native-libs" ]; then | |
| ls -laR native-libs/ | |
| else | |
| echo "No native-libs directory found" | |
| fi | |
| - name: Copy native libraries to Python package | |
| run: | | |
| # Create directories for each platform | |
| mkdir -p sdks/python/wvlet/libs/linux_x86_64 | |
| mkdir -p sdks/python/wvlet/libs/linux_aarch64 | |
| mkdir -p sdks/python/wvlet/libs/darwin_arm64 | |
| mkdir -p sdks/python/wvlet/libs/windows_x86_64 | |
| mkdir -p sdks/python/wvlet/libs/windows_arm64 | |
| # Copy the libraries to the appropriate directories if they exist | |
| if [ -f "native-libs/linux-x64/libwvlet.so" ]; then | |
| cp native-libs/linux-x64/libwvlet.so sdks/python/wvlet/libs/linux_x86_64/ | |
| else | |
| echo "Warning: linux-x64 library not found, creating placeholder" | |
| touch sdks/python/wvlet/libs/linux_x86_64/libwvlet.so | |
| fi | |
| if [ -f "native-libs/linux-arm64/libwvlet.so" ]; then | |
| cp native-libs/linux-arm64/libwvlet.so sdks/python/wvlet/libs/linux_aarch64/ | |
| else | |
| echo "Warning: linux-arm64 library not found, creating placeholder" | |
| touch sdks/python/wvlet/libs/linux_aarch64/libwvlet.so | |
| fi | |
| if [ -f "native-libs/mac-arm64/libwvlet.dylib" ]; then | |
| cp native-libs/mac-arm64/libwvlet.dylib sdks/python/wvlet/libs/darwin_arm64/ | |
| else | |
| echo "Warning: mac-arm64 library not found, creating placeholder" | |
| touch sdks/python/wvlet/libs/darwin_arm64/libwvlet.dylib | |
| fi | |
| if [ -f "native-libs/windows-x64/wvlet.dll" ]; then | |
| cp native-libs/windows-x64/wvlet.dll sdks/python/wvlet/libs/windows_x86_64/ | |
| else | |
| echo "Warning: windows-x64 library not found, creating placeholder" | |
| touch sdks/python/wvlet/libs/windows_x86_64/wvlet.dll | |
| fi | |
| if [ -f "native-libs/windows-arm64/wvlet.dll" ]; then | |
| cp native-libs/windows-arm64/wvlet.dll sdks/python/wvlet/libs/windows_arm64/ | |
| else | |
| echo "Warning: windows-arm64 library not found, creating placeholder" | |
| touch sdks/python/wvlet/libs/windows_arm64/wvlet.dll | |
| fi | |
| # Display the final structure | |
| ls -laR sdks/python/wvlet/libs/ | |
| - name: Install build dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install build wheel setuptools | |
| - name: Build source distribution | |
| run: | | |
| cd sdks/python | |
| python -m build --sdist | |
| - name: Build platform wheels | |
| run: | | |
| cd sdks/python | |
| # Build the wheel | |
| python -m build --wheel | |
| # Create platform-specific wheels for each architecture | |
| cd dist | |
| for wheel in *.whl; do | |
| if [[ $wheel == *"-py3-none-any.whl" ]]; then | |
| # Extract wheel name components | |
| name=$(echo $wheel | cut -d'-' -f1) | |
| version=$(echo $wheel | cut -d'-' -f2) | |
| # Create wheels for each platform | |
| # Linux x86_64 | |
| cp $wheel ${name}-${version}-py3-none-manylinux2014_x86_64.whl | |
| # Linux ARM64 | |
| cp $wheel ${name}-${version}-py3-none-manylinux2014_aarch64.whl | |
| # macOS ARM64 | |
| cp $wheel ${name}-${version}-py3-none-macosx_11_0_arm64.whl | |
| # Windows x86_64 | |
| cp $wheel ${name}-${version}-py3-none-win_amd64.whl | |
| # Windows ARM64 | |
| cp $wheel ${name}-${version}-py3-none-win_arm64.whl | |
| # Remove the original any wheel | |
| rm $wheel | |
| fi | |
| done | |
| cd .. | |
| # Display the wheels | |
| ls -la dist/ | |
| - name: Display built distributions | |
| run: ls -la sdks/python/dist/ | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: python-distributions | |
| path: sdks/python/dist/ | |
| test-wheels: | |
| name: Test wheels on ${{ matrix.os }} | |
| needs: build-wheels | |
| # Only run full matrix tests on: | |
| # - Version tags | |
| # - PRs with 'test-wheels' label | |
| # - Scheduled runs | |
| # - Manual workflow dispatch | |
| if: | | |
| github.event_name == 'schedule' || | |
| github.event_name == 'workflow_dispatch' || | |
| (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || | |
| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'test-wheels')) | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest] | |
| python-version: ['3.9', '3.11', '3.13'] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 # Fetch all tags for setuptools_scm | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Download built wheels | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: python-distributions | |
| path: dist/ | |
| - name: List available wheels | |
| run: | | |
| echo "Available wheels:" | |
| ls -la dist/ | |
| shell: bash | |
| - name: Install wheel | |
| run: | | |
| # Install the appropriate wheel for this platform | |
| if [[ "${{ runner.os }}" == "macOS" ]]; then | |
| echo "Installing macOS ARM64 wheel..." | |
| pip install dist/wvlet-*-py3-none-macosx_11_0_arm64.whl | |
| elif [[ "${{ runner.os }}" == "Windows" ]]; then | |
| echo "Installing Windows x86_64 wheel..." | |
| pip install dist/wvlet-*-py3-none-win_amd64.whl | |
| elif [[ "${{ runner.arch }}" == "ARM64" ]]; then | |
| echo "Installing Linux ARM64 wheel..." | |
| pip install dist/wvlet-*-py3-none-manylinux2014_aarch64.whl | |
| else | |
| echo "Installing Linux x86_64 wheel..." | |
| pip install dist/wvlet-*-py3-none-manylinux2014_x86_64.whl | |
| fi | |
| shell: bash | |
| - name: Test import | |
| run: | | |
| python -c "from wvlet import compile; print('Import successful')" | |
| - name: Run tests | |
| run: | | |
| pip install pytest | |
| cd sdks/python | |
| pytest tests/ | |
| publish: | |
| name: Publish to PyPI | |
| needs: [build-wheels, test-wheels] | |
| runs-on: ubuntu-latest | |
| # Only publish on tagged releases | |
| if: | | |
| always() && | |
| needs.build-wheels.result == 'success' && | |
| (needs.test-wheels.result == 'success' || needs.test-wheels.result == 'skipped') && | |
| github.event_name == 'push' && | |
| startsWith(github.ref, 'refs/tags/v') | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/p/wvlet | |
| permissions: | |
| id-token: write # For PyPI trusted publishing | |
| steps: | |
| - name: Download built distributions | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: python-distributions | |
| path: dist/ | |
| - name: Display distributions to publish | |
| run: ls -la dist/ | |
| - name: Publish to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ | |
| skip-existing: true |