Skip to content

ci(python): publish wheels with API token #26

ci(python): publish wheels with API token

ci(python): publish wheels with API token #26

Workflow file for this run

name: Create Python release
on:
push:
tags:
- py-*
env:
RUST_TOOLCHAIN: nightly-2023-06-01
PYTHON_VERSION: '3.7'
MATURIN_VERSION: '1.0.1'
MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
defaults:
run:
shell: bash
jobs:
manylinux-x64_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py-polars/README.md
cp README.md py-polars/README.md
- name: Publish wheel
uses: messense/maturin-action@v1
env:
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
# Needed for Docker on Apple M1
manylinux-aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
# Needed to avoid out-of-memory error
- name: Set Swap Space
uses: pierotofy/set-swap-space@master
with:
swap-size-gb: 10
- name: Fix README symlink
run: |
rm py-polars/README.md
cp README.md py-polars/README.md
- name: Publish wheel
uses: messense/maturin-action@v1
env:
JEMALLOC_SYS_WITH_LG_PAGE: 16
with:
command: publish
args: -m py-polars/Cargo.toml --skip-existing --no-sdist -o wheels -i python -u ritchie46
target: aarch64-unknown-linux-gnu
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
manylinux-bigidx:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py-polars/README.md
cp README.md py-polars/README.md
- name: Prepare bigidx
run: |
sed -i 's/name = "polars"/name = "polars-u64-idx"/' py-polars/pyproject.toml
# A brittle hack to insert the 'bigidx' feature
sed -i 's/"dynamic_groupby",/"dynamic_groupby",\n"bigidx",/' py-polars/Cargo.toml
- name: Publish wheel
uses: messense/maturin-action@v1
env:
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
with:
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
manylinux-x64_64-lts-cpu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py-polars/README.md
cp README.md py-polars/README.md
- name: Prepare lts-cpu
run: sed -i 's/name = "polars"/name = "polars-lts-cpu"/' py-polars/pyproject.toml
- name: Publish wheel
uses: messense/maturin-action@v1
env:
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt --cfg use_mimalloc
with:
command: publish
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
win-macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py-polars/README.md
cp README.md py-polars/README.md
- name: Publish wheel
uses: messense/maturin-action@v1
env:
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
with:
command: publish
args: -m py-polars/Cargo.toml --no-sdist --skip-existing -o wheels -i python -u ritchie46
maturin-version: ${{ env.MATURIN_VERSION }}
rust-toolchain: ${{ env.RUST_TOOLCHAIN }}
macos-aarch64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Fix README symlink
run: |
rm py-polars/README.md
cp README.md py-polars/README.md
- name: Set up Rust targets
run: rustup target add aarch64-apple-darwin
- name: Publish wheel
uses: messense/maturin-action@v1
with:
command: publish
args: -m py-polars/Cargo.toml --target aarch64-apple-darwin --no-sdist -o wheels -i python -u ritchie46
maturin-version: ${{ env.MATURIN_VERSION }}