0.26.2-beta.1954 #671
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: Release to PyPI | |
| on: | |
| release: | |
| types: [published] | |
| branches: | |
| - 'main' | |
| jobs: | |
| build-manylinux: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 8 | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4.1.7 | |
| with: | |
| path: io | |
| - name: Set permissions for build-wheels.sh | |
| run: chmod +x io/dev/build-wheels.sh | |
| - name: Build Wheels | |
| run: > | |
| docker run --rm | |
| -e PLAT=manylinux2014_x86_64 | |
| -e PACKAGE_NAME=opteryx | |
| -e PYTHON_VERSION=${{ matrix.python-version }} | |
| -v `pwd`:/io | |
| --workdir /io | |
| quay.io/pypa/manylinux2014_x86_64 | |
| io/dev/build-wheels.sh | |
| - name: Archive Wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-linux-${{ matrix.python-version }} | |
| path: io/dist/*manylinux2014_x86_64*.whl | |
| build-manylinux-arm64: | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 8 | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| runs-on: ubuntu-24.04-arm | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4.1.7 | |
| with: | |
| path: io | |
| - name: Set permissions for build-wheels.sh | |
| run: chmod +x io/dev/build-wheels.sh | |
| - name: Build Wheels | |
| run: > | |
| docker run --rm | |
| -e PLAT=manylinux2014_aarch64 | |
| -e PACKAGE_NAME=opteryx | |
| -e PYTHON_VERSION=${{ matrix.python-version }} | |
| -v `pwd`:/io | |
| --workdir /io | |
| quay.io/pypa/manylinux2014_aarch64 | |
| io/dev/build-wheels.sh | |
| - name: Archive Wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-linux-arm64-${{ matrix.python-version }} | |
| path: io/dist/*manylinux2014_aarch64*.whl | |
| build-macos: | |
| runs-on: macos-latest | |
| strategy: | |
| fail-fast: false | |
| max-parallel: 8 | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install rust toolchain | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python package dependencies | |
| run: python -m pip install --upgrade cython wheel numpy setuptools_rust | |
| - name: Install Rust aarch64-apple-darwin target | |
| run: rustup target add aarch64-apple-darwin | |
| # Dropped x86 macOS support: we no longer build x86_64 mac artifacts | |
| # as Apple stopped support for Intel macs. We build arm64-only mac wheels. | |
| - name: Build on macOS (arm64) | |
| shell: bash | |
| env: | |
| DEVELOPER_DIR: /Applications/Xcode.app/Contents/Developer | |
| MACOSX_DEPLOYMENT_TARGET: "10.15" | |
| # Build for arm64 only for now. Building universal2 in a single | |
| # invocation can cause mac x86_64 assembly / linker errors | |
| # (fixup/linker errors in huf_decompress) reported during release | |
| # builds. We match the regression mac runner (arm64) for now. | |
| ARCHFLAGS: -arch arm64 | |
| PYO3_CROSS_PYTHON_VERSION: ${{ matrix.python-version }} | |
| run: python setup.py bdist_wheel | |
| - name: Archive dist artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-macos-${{ matrix.python-version }} | |
| path: dist | |
| build-windows: | |
| runs-on: windows-latest | |
| strategy: | |
| max-parallel: 8 | |
| matrix: | |
| python-version: ["3.9", "3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@master | |
| - name: Download Build Tools for Visual Studio 2019 | |
| run: Invoke-WebRequest -Uri https://aka.ms/vs/16/release/vs_buildtools.exe -OutFile vs_buildtools.exe | |
| - name: Run vs_buildtools.exe install | |
| run: ./vs_buildtools.exe --quiet --wait --norestart --nocache --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --add Microsoft.VisualStudio.Component.VC.140 --includeRecommended | |
| - name: Set up Python ${{ matrix.python-version }} x64 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| architecture: x64 | |
| - name: Install Python package dependencies | |
| run: python -m pip install --upgrade cython wheel numpy setuptools_rust draken | |
| - name: Build binary wheel | |
| run: python setup.py bdist_wheel | |
| - name: Archive dist artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist-win-${{ matrix.python-version }} | |
| path: dist | |
| upload: | |
| needs: [build-manylinux, build-manylinux-arm64, build-macos] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4.1.7 | |
| - name: Install Python package dependencies | |
| run: python -m pip install --upgrade cython wheel numpy setuptools_rust draken | |
| - name: Create source dist | |
| run: python setup.py sdist | |
| - name: Stage linux 3.9 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-3.9 | |
| path: dist-linux-3.9 | |
| - run: mv -v dist-linux-3.9/* dist/ | |
| - name: Stage linux 3.10 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-3.10 | |
| path: dist-linux-3.10 | |
| - run: mv -v dist-linux-3.10/* dist/ | |
| - name: Stage linux 3.11 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-3.11 | |
| path: dist-linux-3.11 | |
| - run: mv -v dist-linux-3.11/* dist/ | |
| - name: Stage linux 3.12 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-3.12 | |
| path: dist-linux-3.12 | |
| - run: mv -v dist-linux-3.12/* dist/ | |
| - name: Stage linux 3.13 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-3.13 | |
| path: dist-linux-3.13 | |
| - run: mv -v dist-linux-3.13/* dist/ | |
| - name: Stage linux ARM64 3.10 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-arm64-3.10 | |
| path: dist-linux-arm64-3.10 | |
| - run: mv -v dist-linux-arm64-3.10/* dist/ | |
| - name: Stage linux ARM64 3.11 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-arm64-3.11 | |
| path: dist-linux-arm64-3.11 | |
| - run: mv -v dist-linux-arm64-3.11/* dist/ | |
| - name: Stage linux ARM64 3.12 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-arm64-3.12 | |
| path: dist-linux-arm64-3.12 | |
| - run: mv -v dist-linux-arm64-3.12/* dist/ | |
| - name: Stage linux ARM64 3.13 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-linux-arm64-3.13 | |
| path: dist-linux-arm64-3.13 | |
| - run: mv -v dist-linux-arm64-3.13/* dist/ | |
| - name: Stage macos 3.9 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-macos-3.9 | |
| path: dist-macos-3.9 | |
| - run: mv -v dist-macos-3.9/* dist/ | |
| - name: Stage macos 3.10 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-macos-3.10 | |
| path: dist-macos-3.10 | |
| - run: mv -v dist-macos-3.10/* dist/ | |
| - name: Stage macos 3.11 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-macos-3.11 | |
| path: dist-macos-3.11 | |
| - run: mv -v dist-macos-3.11/* dist/ | |
| - name: Stage macos 3.12 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-macos-3.12 | |
| path: dist-macos-3.12 | |
| - run: mv -v dist-macos-3.12/* dist/ | |
| - name: Stage macos 3.13 | |
| uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist-macos-3.13 | |
| path: dist-macos-3.13 | |
| - run: mv -v dist-macos-3.13/* dist/ | |
| # - name: Stage win 3.9 | |
| # uses: actions/download-artifact@v4.1.7 | |
| # with: | |
| # name: dist-win-3.9 | |
| # path: dist-win-3.9 | |
| # - run: mv -v dist-win-3.9/* dist/ | |
| # - name: Stage win 3.10 | |
| # uses: actions/download-artifact@v4.1.7 | |
| # with: | |
| # name: dist-win-3.10 | |
| # path: dist-win-3.10 | |
| # - run: mv -v dist-win-3.10/* dist/ | |
| # - name: Stage win 3.11 | |
| # uses: actions/download-artifact@v4.1.7 | |
| # with: | |
| # name: dist-win-3.11 | |
| # path: dist-win-3.11 | |
| # - run: mv -v dist-win-3.11/* dist/ | |
| # - name: Stage win 3.12 | |
| # uses: actions/download-artifact@v4.1.7 | |
| # with: | |
| # name: dist-win-3.12 | |
| # path: dist-win-3.12 | |
| # - run: mv -v dist-win-3.12/* dist/ | |
| - name: Publish distribution 馃摝 to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| password: ${{ secrets.PYPI_API_TOKEN }} |