Trigger testpypi publish 3.2.6.8 #62
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: Build and upload to PyPI | |
| # Build on every workflow_dispatch, branch push, tag push, and pull request change | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - test_dll_issue | |
| # Sequence of patterns matched against refs/tags | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| jobs: | |
| build_wheels_windows_64: | |
| name: Build wheels on ${{ matrix.os }} 64-bit | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.1.4 | |
| env: | |
| CIBW_BUILD: "*-win_amd64" | |
| CIBW_SKIP: "cp38-*" | |
| - name: Inject ibm_db_dll.pth into wheels | |
| run: python scripts/inject_pth_into_wheel.py wheelhouse | |
| - uses: actions/upload-artifact@v4.4.3 | |
| with: | |
| name: ibmdb-wheels64-${{ matrix.os }} | |
| path: wheelhouse/*.whl | |
| build_wheels_windows_32: | |
| name: Build wheels on ${{ matrix.os }} 32-bit | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [windows-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.1.4 | |
| env: | |
| CIBW_BUILD: "*-win32" | |
| CIBW_SKIP: "cp38-*" | |
| - name: Inject ibm_db_dll.pth into wheels | |
| run: python scripts/inject_pth_into_wheel.py wheelhouse | |
| - uses: actions/upload-artifact@v4.4.3 | |
| with: | |
| name: ibmdb-wheels32-${{ matrix.os }} | |
| path: wheelhouse/*.whl | |
| build_wheels_linux: | |
| name: Build wheels on ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.1.4 | |
| env: | |
| CIBW_ARCHS_LINUX: "x86_64 i686" | |
| CIBW_MANYLINUX_I686_IMAGE: manylinux2014 | |
| CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014 | |
| CIBW_SKIP: "cp38-* *-musllinux_* *-*linux_{aarch64,ppc64le}" | |
| CIBW_REPAIR_WHEEL_COMMAND_LINUX: | |
| auditwheel repair | |
| --exclude libdb2.so.1 | |
| --exclude libDB2xml4c.so.58 | |
| --exclude libm.so.6 | |
| --exclude libcrypt.so.1 | |
| --exclude libpam.so.0 | |
| --exclude librt.so.1 | |
| --exclude libpthread.so.0 | |
| --exclude libc.so.6 | |
| --exclude libdl.so.2 | |
| --wheel-dir {dest_dir} | |
| {wheel} | |
| - uses: actions/upload-artifact@v4.4.3 | |
| with: | |
| name: ibmdb-wheels-${{ matrix.os }} | |
| path: wheelhouse/*.whl | |
| build_wheels_macos_arm64: | |
| name: Build wheels on macOS ARM64 | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| architecture: [arm64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.1.4 | |
| env: | |
| CIBW_SKIP: "cp38-*" | |
| MACOSX_DEPLOYMENT_TARGET: 14.0 | |
| - uses: actions/upload-artifact@v4.4.3 | |
| with: | |
| name: ibmdb-wheelsarm64 | |
| path: wheelhouse/*.whl | |
| build_wheels_macos_x86: | |
| name: Build wheels for macOS x86_64 | |
| runs-on: macos-15-intel | |
| strategy: | |
| matrix: | |
| architecture: [x86_64] | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Build wheels | |
| uses: pypa/cibuildwheel@v3.1.4 | |
| env: | |
| CIBW_ARCHS: "x86_64" | |
| CIBW_SKIP: "cp38-*" | |
| MACOSX_DEPLOYMENT_TARGET: 10.15 | |
| - uses: actions/upload-artifact@v4.4.3 | |
| with: | |
| name: ibmdb-wheelsx86-${{ matrix.os }} | |
| path: wheelhouse/*.whl | |
| build_sdist: | |
| name: Build source distribution | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Install Python dependencies | |
| run: python -m pip install --upgrade pip build | |
| - name: Build sdist | |
| run: python -m build --sdist --no-isolation | |
| - name: Remove clidriver from sdist | |
| run: | | |
| cd dist | |
| TARBALL=$(ls ibm?db-*.tar.gz | head -1) | |
| DIRNAME="${TARBALL%.tar.gz}" | |
| tar -xzf "$TARBALL" | |
| rm -rf "$DIRNAME"/clidriver* | |
| rm -rf "$TARBALL" | |
| tar -czf "$TARBALL" "$DIRNAME" | |
| rm -rf "$DIRNAME" | |
| - name: Upload sdist | |
| uses: actions/upload-artifact@v4.4.3 | |
| with: | |
| name: ibmdb-sdist | |
| path: dist/*.tar.gz | |
| upload_pypi: | |
| needs: [build_wheels_windows_64, build_wheels_windows_32, build_wheels_linux, build_wheels_macos_arm64, build_wheels_macos_x86, build_sdist] | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| permissions: | |
| # IMPORTANT: this permission is mandatory for trusted publishing | |
| id-token: write | |
| #upload to PyPI on every tag starting with 'v' | |
| if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| path: dist | |
| pattern: ibmdb-* | |
| merge-multiple: true | |
| - name: Publish distribution to PyPI | |
| if: startsWith(github.ref, 'refs/tags') | |
| uses: pypa/gh-action-pypi-publish@release/v1.12 | |
| upload_testpypi: | |
| needs: [build_wheels_windows_64, build_wheels_windows_32, build_sdist] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| #upload to TestPyPI on push to test_dll_issue branch | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/test_dll_issue' | |
| steps: | |
| - uses: actions/download-artifact@v5 | |
| with: | |
| path: dist | |
| pattern: ibmdb-* | |
| merge-multiple: true | |
| - name: Publish distribution to TestPyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1.12 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| verbose: true |