Add minimum supported Rust version 1.66 #96
Workflow file for this run
This file contains 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: dists | |
on: | |
pull_request: | |
push: | |
branches: [master] | |
release: | |
types: [released, prereleased] | |
workflow_dispatch: # allows running workflow manually from the Actions tab | |
concurrency: # https://stackoverflow.com/questions/66335225#comment133398800_72408109 | |
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
wheel: | |
name: ${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- { os: macos-15, target: x86_64, manylinux: auto} | |
- { os: macos-15, target: aarch64, manylinux: auto} | |
- { os: ubuntu-24.04, target: x86_64, manylinux: auto} | |
- { os: ubuntu-24.04, target: aarch64, manylinux: auto} | |
- { os: ubuntu-24.04, target: i686, manylinux: auto} | |
- { os: ubuntu-24.04, target: armv7, manylinux: auto} | |
- { os: ubuntu-24.04, target: ppc64le, manylinux: auto} | |
- { os: ubuntu-24.04, target: s390x, manylinux: auto} | |
- { os: ubuntu-24.04, target: x86_64, manylinux: musllinux_1_1 } | |
- { os: ubuntu-24.04, target: aarch64, manylinux: musllinux_1_1 } | |
- { os: windows-2025, target: x86_64, manylinux: auto} | |
- { os: windows-2025, target: i686, manylinux: auto} | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
# keep python versions in sync with tests.yml | |
# all python versions need to be present for linking to succeed | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.8' | |
architecture: ${{ ( startsWith(matrix.os, 'windows') && matrix.target == 'i686' ) && 'x86' || null }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
architecture: ${{ ( startsWith(matrix.os, 'windows') && matrix.target == 'i686' ) && 'x86' || null }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.10' | |
architecture: ${{ ( startsWith(matrix.os, 'windows') && matrix.target == 'i686' ) && 'x86' || null }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.11' | |
architecture: ${{ ( startsWith(matrix.os, 'windows') && matrix.target == 'i686' ) && 'x86' || null }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.12' | |
architecture: ${{ ( startsWith(matrix.os, 'windows') && matrix.target == 'i686' ) && 'x86' || null }} | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.13' | |
architecture: ${{ ( startsWith(matrix.os, 'windows') && matrix.target == 'i686' ) && 'x86' || null }} | |
- uses: PyO3/[email protected] | |
with: | |
target: ${{ matrix.target }} | |
manylinux: ${{ matrix.manylinux }} | |
# keep python versions in sync with tests.yml | |
args: --release --out dist --interpreter '3.8 3.9 3.10 3.11 3.12 3.13' | |
rust-toolchain: stable | |
docker-options: -e CI | |
# the following two steps are separated out because of a setup-python issue on windows causing maturin-action to pick up 3.13t exe instead of 3.13t exe https://github.com/oconnor663/blake3-py/issues/52 | |
- uses: Quansight-Labs/setup-python@v5 # 3.13t support not yet merged ref https://github.com/actions/setup-python/pull/973#issuecomment-2495900996 | |
with: | |
python-version: '3.13t' | |
architecture: ${{ ( startsWith(matrix.os, 'windows') && matrix.target == 'i686' ) && 'x86' || null }} | |
- uses: PyO3/[email protected] | |
with: | |
target: ${{ matrix.target }} | |
manylinux: ${{ matrix.manylinux }} | |
# keep python versions in sync with tests.yml | |
args: --release --out dist --interpreter '3.13t' | |
rust-toolchain: stable | |
docker-options: -e CI | |
- run: ${{ (startsWith(matrix.os, 'windows') && 'dir') || 'ls -ltra' }} dist/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-${{ matrix.os }}-${{ matrix.target }}-${{ matrix.manylinux }} | |
path: dist | |
sdist: | |
name: sdist | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: PyO3/[email protected] | |
with: | |
command: sdist | |
args: --out dist | |
rust-toolchain: stable | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: dist-sdist | |
path: dist | |
publish: | |
if: github.event_name == 'release' | |
needs: [wheel, sdist] | |
runs-on: ubuntu-24.04 | |
permissions: | |
contents: write # softprops/action-gh-release | |
id-token: write # pypa/gh-action-pypi-publish | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: dist/ | |
pattern: dist-* | |
merge-multiple: true | |
- run: ls -ltra dist/ | |
# 2.2.0 has a bug ref https://github.com/softprops/action-gh-release/issues/555 | |
- name: Upload release assets | |
uses: softprops/[email protected] | |
with: | |
files: dist/* | |
# trusted publisher in https://pypi.org/manage/project/blake3/settings/publishing/ | |
- name: Publish package distributions to PyPI | |
uses: pypa/[email protected] | |
with: | |
skip-existing: true |