v0.3.5 #17
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: publish | |
on: | |
release: | |
types: [published] | |
pull_request: | |
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 - x86_64 | |
uses: PyO3/maturin-action@v1 | |
with: | |
target: x86_64 | |
args: --release --out dist --sdist -i 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 | |
- name: Test built wheel - x86_64 | |
run: | | |
pip install pycrdt --no-index --find-links dist --force-reinstall | |
pip install pytest y-py | |
pytest | |
- 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 | |
- name: Test built wheel - universal2 | |
run: | | |
pip install pycrdt --no-index --find-links dist --force-reinstall | |
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.7 3.8 3.9 3.10 3.11 | |
- target: x86 | |
interpreter: 3.7 3.8 3.9 3.10 3.11 | |
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 y-py | |
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 wheels | |
uses: PyO3/maturin-action@v1 | |
with: | |
rust-toolchain: stable | |
target: ${{ matrix.target }} | |
manylinux: auto | |
args: --release --out dist -i 3.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 | |
- name: Test built wheel | |
if: matrix.target == 'x86_64' | |
run: | | |
pip install pycrdt --no-index --find-links dist --force-reinstall | |
pip install pytest y-py | |
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.7 3.8 3.9 3.10 3.11 3.12 pypy3.8 pypy3.9 | |
- uses: uraimo/[email protected] | |
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 y-py | |
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 * |