v1.0.4 #42
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
# This workflow will create wheels files for all major distros for several versions of python. | |
# This only triggers on release tags. | |
name: Release-Wheels | |
on: | |
release: | |
types: | |
- published | |
push: | |
tags: 'v[0-9]+.[0-9]+.[0-9]+' | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build_wheels: | |
name: Build wheel for py${{ matrix.python }}-${{ matrix.platform_id }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 30 | |
strategy: | |
# Ensure that a wheel builder finishes even if another fails | |
fail-fast: false | |
matrix: | |
python: [39, 310, 311, 312, 313] | |
os: [windows-latest, ubuntu-latest, macos-latest] | |
include: | |
# Window 64 bit | |
- os: windows-latest | |
platform_id: win_amd64 | |
# Linux 64 bit manylinux2014 | |
- os: ubuntu-latest | |
platform_id: manylinux_x86_64 | |
manylinux_image: manylinux2014 | |
# MacOS - latest is now arm64, no longer x86_64 | |
- os: macos-latest | |
platform_id: macosx_arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- run: cargo test --all-features | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip setuptools | |
python3 -m pip install cibuildwheel | |
- name: Build wheels | |
env: | |
CIBW_BUILD: cp${{ matrix.python }}-${{ matrix.platform_id }} | |
CIBW_ARCHS: all | |
CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} | |
CIBW_MANYLINUX_I686_IMAGE: ${{ matrix.manylinux_image }} | |
CIBW_TEST_SKIP: "*-macosx_arm64" | |
CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_TERM_COLOR="always"' | |
CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"' | |
CIBW_BEFORE_BUILD: rustup show | |
CIBW_BEFORE_BUILD_LINUX: > | |
curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=minimal -y && | |
rustup show | |
CIBW_TEST_REQUIRES: pytest | |
CIBW_BUILD_VERBOSITY: 1 | |
CONDA_HOME: /usr/local/miniconda | |
run: python3 -m cibuildwheel --output-dir wheelhouse | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: wheel-cp${{ matrix.python }}-${{ matrix.platform_id }} | |
path: ./wheelhouse/*.whl | |
publish-to-pypi: | |
name: Publish Kete to PyPI | |
needs: | |
- build_wheels | |
runs-on: ubuntu-latest | |
environment: | |
name: pypi | |
url: https://pypi.org/p/kete | |
permissions: | |
id-token: write | |
steps: | |
- name: Download all the dists | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: wheel-* | |
path: dist | |
merge-multiple: true | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 |