Skip to content

v0.9.6

v0.9.6 #82

Workflow file for this run

name: publish
on:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
PACKAGE_NAME: pycrdt
jobs:
macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels - universal2
uses: PyO3/maturin-action@v1
with:
args: --release --target universal2-apple-darwin --out dist -i 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
- name: Test built wheel - universal2
run: |
pip install pycrdt --no-index --find-links dist --force-reinstall
pip install pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26"
pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
windows:
runs-on: windows-latest
name: windows (${{ matrix.platform.target }})
strategy:
matrix:
platform:
- target: x64
interpreter: 3.8 3.9 3.10 3.11 3.12
- target: x86
interpreter: 3.8 3.9 3.10 3.11 3.12
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: ${{ matrix.platform.target }}
- uses: dtolnay/rust-toolchain@stable
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
target: ${{ matrix.platform.target }}
args: --release --out dist -i ${{ matrix.platform.interpreter }}
- name: Test built wheel
run: |
pip install pycrdt --no-index --find-links dist --force-reinstall
pip install pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26"
pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
linux:
runs-on: ubuntu-latest
strategy:
matrix:
target: [x86_64, i686]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64
- name: Build sdist
if: ${{ matrix.target == 'x86_64' }}
uses: PyO3/maturin-action@v1
with:
command: sdist
args: --out dist
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
- name: Test built wheel
if: matrix.target == 'x86_64'
run: |
pip install pycrdt --no-index --find-links dist --force-reinstall
pip install pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26"
pytest
- name: Upload wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: dist
linux-cross:
runs-on: ubuntu-latest
strategy:
matrix:
target: [aarch64, armv7, s390x, ppc64le]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Build wheels
uses: PyO3/maturin-action@v1
with:
rust-toolchain: stable
target: ${{ matrix.target }}
manylinux: auto
args: --release --out dist -i 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 pypy3.10
- uses: uraimo/run-on-arch-action@v2.3.0
if: matrix.target != 'ppc64'
name: Test built wheel
with:
arch: ${{ matrix.target }}
distro: ubuntu20.04
githubToken: ${{ github.token }}
install: |
apt-get update
apt-get install -y --no-install-recommends python3 python3-pip
pip3 install -U pip pytest "pydantic>=2.5.2,<3" "anyio>=4.4.0,<5" "trio>=0.25.1,<0.26"
run: |
pip3 install pycrdt --no-index --find-links dist/ --force-reinstall
pytest
- name: Upload wheels
uses: actions/upload-artifact@v3
with:
name: wheels
path: dist
pypi-release:
name: Publish to PyPI on Release
runs-on: ubuntu-latest
needs:
- macos
- windows
- linux
- linux-cross
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v2
with:
name: wheels
- uses: actions/setup-python@v2
- name: Publish to PyPI
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
pip install --upgrade twine
twine upload --skip-existing *