feat: expose staged index segment transactions #2
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 python wheels | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: "Git ref to checkout (branch, tag, or SHA)" | |
| required: false | |
| default: "" | |
| type: string | |
| debug: | |
| description: "Build debug wheels (with debug symbols)" | |
| required: false | |
| default: true | |
| type: boolean | |
| pull_request: | |
| branches: | |
| - main | |
| - release/** | |
| paths: | |
| - ".github/workflows/pypi-publish.yml" | |
| - ".github/workflows/build_linux_wheel/**" | |
| - ".github/workflows/build_mac_wheel/**" | |
| - ".github/workflows/build_windows_wheel/**" | |
| - ".github/workflows/upload_wheel/**" | |
| permissions: | |
| contents: read | |
| jobs: | |
| linux: | |
| timeout-minutes: 60 | |
| name: Python Linux 3.${{ matrix.python-minor-version }} ${{ matrix.config.platform }} manylinux${{ matrix.config.manylinux }} | |
| strategy: | |
| matrix: | |
| python-minor-version: ["10"] | |
| config: | |
| - platform: x86_64 | |
| manylinux: "2_17" | |
| extra_args: "" | |
| runner: ubuntu-22.04 | |
| - platform: x86_64 | |
| manylinux: "2_28" | |
| extra_args: "--features fp16kernels" | |
| runner: ubuntu-22.04 | |
| - platform: aarch64 | |
| manylinux: "2_17" | |
| extra_args: "" | |
| runner: ubuntu-24.04-arm64-4x | |
| - platform: aarch64 | |
| manylinux: "2_28" | |
| extra_args: "--features fp16kernels" | |
| runner: ubuntu-24.04-arm64-4x | |
| runs-on: ${{ matrix.config.runner }} | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| ref: ${{ inputs.ref || github.ref }} | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Set up Python | |
| uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4 | |
| with: | |
| python-version: 3.${{ matrix.python-minor-version }} | |
| - name: Handle tag | |
| id: handle_tag | |
| run: | | |
| # If the tag ends with -beta.N or -rc.N, we need to call setup_version.py | |
| # and export repo as "fury" instead of "pypi" | |
| if [[ ${{ github.ref }} == refs/tags/*-beta.* ]] || [[ ${{ github.ref }} == refs/tags/*-rc.* ]]; then | |
| TAG=$(echo ${{ github.ref }} | sed 's/refs\/tags\///') | |
| pip install packaging | |
| python ci/setup_version.py $TAG | |
| echo "repo=fury" >> $GITHUB_OUTPUT | |
| else | |
| echo "repo=pypi" >> $GITHUB_OUTPUT | |
| fi | |
| - uses: ./.github/workflows/build_linux_wheel | |
| with: | |
| python-minor-version: ${{ matrix.python-minor-version }} | |
| args: "--release ${{ (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && !inputs.debug)) && '--strip' || '' }} ${{ matrix.config.extra_args }}" | |
| arm-build: ${{ matrix.config.platform == 'aarch64' }} | |
| manylinux: ${{ matrix.config.manylinux }} | |
| - name: Upload wheels as artifacts | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: pylance-debug-manylinux_${{ matrix.config.manylinux }}_${{ matrix.config.platform }} | |
| path: python/target/wheels/*.whl | |
| retention-days: 90 | |
| - uses: ./.github/workflows/upload_wheel | |
| if: github.event_name == 'release' | |
| with: | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| fury_token: ${{ secrets.FURY_TOKEN }} | |
| repo: ${{ steps.handle_tag.outputs.repo }} | |
| mac: | |
| timeout-minutes: 60 | |
| runs-on: ${{ matrix.config.runner }} | |
| strategy: | |
| matrix: | |
| python-minor-version: ["10"] | |
| config: | |
| - target: aarch64-apple-darwin | |
| runner: warp-macos-14-arm64-6x | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 10.15 | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| ref: ${{ inputs.ref || github.ref }} | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Set up Python | |
| uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4 | |
| with: | |
| python-version: 3.13 | |
| - name: Handle tag | |
| id: handle_tag | |
| run: | | |
| # If the tag ends with -beta.N or -rc.N, we need to call setup_version.py | |
| # and export repo as "fury" instead of "pypi" | |
| if [[ ${{ github.ref }} == refs/tags/*-beta.* ]] || [[ ${{ github.ref }} == refs/tags/*-rc.* ]]; then | |
| TAG=$(echo ${{ github.ref }} | sed 's/refs\/tags\///') | |
| pip install packaging | |
| python ci/setup_version.py $TAG | |
| echo "repo=fury" >> $GITHUB_OUTPUT | |
| else | |
| echo "repo=pypi" >> $GITHUB_OUTPUT | |
| fi | |
| - uses: ./.github/workflows/build_mac_wheel | |
| with: | |
| python-minor-version: ${{ matrix.python-minor-version }} | |
| args: "--release ${{ (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && !inputs.debug)) && '--strip' || '' }} --target ${{ matrix.config.target }} --features fp16kernels" | |
| - name: Upload wheels as artifacts | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: pylance-debug-macosx_arm64 | |
| path: python/target/wheels/*.whl | |
| retention-days: 90 | |
| - uses: ./.github/workflows/upload_wheel | |
| if: github.event_name == 'release' | |
| with: | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| fury_token: ${{ secrets.FURY_TOKEN }} | |
| repo: ${{ steps.handle_tag.outputs.repo }} | |
| windows: | |
| timeout-minutes: 60 | |
| runs-on: windows-latest-4x | |
| strategy: | |
| matrix: | |
| python-minor-version: ["10"] | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| ref: ${{ inputs.ref || github.ref }} | |
| fetch-depth: 0 | |
| lfs: true | |
| - name: Set up Python | |
| uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c # v4 | |
| with: | |
| python-version: 3.${{ matrix.python-minor-version }} | |
| - name: Handle tag | |
| id: handle_tag | |
| shell: bash | |
| run: | | |
| # If the tag ends with -beta.N or -rc.N, we need to call setup_version.py | |
| # and export repo as "fury" instead of "pypi" | |
| if [[ ${{ github.ref }} == refs/tags/*-beta.* ]] || [[ ${{ github.ref }} == refs/tags/*-rc.* ]]; then | |
| TAG=$(echo ${{ github.ref }} | sed 's/refs\/tags\///') | |
| pip install packaging | |
| python ci/setup_version.py $TAG | |
| echo "repo=fury" >> $GITHUB_OUTPUT | |
| else | |
| echo "repo=pypi" >> $GITHUB_OUTPUT | |
| fi | |
| - uses: ./.github/workflows/build_windows_wheel | |
| with: | |
| python-minor-version: ${{ matrix.python-minor-version }} | |
| args: "--release ${{ (github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && !inputs.debug)) && '--strip' || '' }}" | |
| - name: Upload wheels as artifacts | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| with: | |
| name: pylance-debug-win_amd64 | |
| path: python/target/wheels/*.whl | |
| retention-days: 90 | |
| - uses: ./.github/workflows/upload_wheel | |
| if: github.event_name == 'release' | |
| with: | |
| pypi_token: ${{ secrets.PYPI_TOKEN }} | |
| fury_token: ${{ secrets.FURY_TOKEN }} | |
| repo: ${{ steps.handle_tag.outputs.repo }} | |
| report-failure: | |
| name: Report Workflow Failure | |
| runs-on: ubuntu-latest | |
| needs: [linux, mac, windows] | |
| permissions: | |
| contents: read | |
| issues: write | |
| if: always() && (github.event_name == 'release' || github.event_name == 'workflow_dispatch') | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - uses: ./.github/actions/create-failure-issue | |
| with: | |
| job-results: ${{ toJSON(needs) }} | |
| workflow-name: ${{ github.workflow }} |