Skip to content

Slow operation now don't lock GIL, so it can be run in threads #192

Slow operation now don't lock GIL, so it can be run in threads

Slow operation now don't lock GIL, so it can be run in threads #192

Workflow file for this run

name: DEV Wheels & Tests & PyPi
on:
push:
branches: [ dev ]
pull_request:
branches: [ dev ]
workflow_dispatch:
workflow_call:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
strategy:
matrix:
include:
- arch: x86_64
os: kuber
python: "3.9"
link: https://github.com/disintar/ton/releases/download/ton-cpython-39-x86_64-linux/
file: python_ton.cpython-39-x86_64-linux-gnu.so
fix_tag: manylinux2014_x86_64
- arch: aarch64
os: macOS
python: "3.10"
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-aarch64-darwin/
file: python_ton.cpython-310-darwin.so
fix_tag: arm64
- arch: x86_64
os: kuber
python: "3.10"
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-x86_64-linux/
file: python_ton.cpython-310-x86_64-linux-gnu.so
fix_tag: manylinux2014_x86_64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
env:
USER: tvorogme
- name: Install deps
run: |
python -m pip install -r built_requirements.txt
python -m pip install -r requirements.txt
- name: Install deps linux
run: |
sudo apt update
sudo apt install -y curl
if: matrix.os == 'kuber'
- name: Download prebuilt
run: |
curl -Lo ./src/tonpy/libs/${{ matrix.file }} ${{ matrix.link }}${{ matrix.file }}
- name: Run tests
run: |
pytest
- name: Build wheel
run: |
python -m build --verbose --wheel --outdir dist/ .
python fix_whl_name.py
env:
TAG_FIX: ${{ matrix.fix_tag }}
DEV_PYPI: true
- name: Store the binary wheel
uses: actions/upload-artifact@v2
with:
name: python-package-distributions
path: dist
deploy:
name: Publish DEV 🐍📦 to PyPI
runs-on: kuber
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: "3.10"
env:
USER: tvorogme
- name: Download all the dists
uses: actions/download-artifact@v2
with:
name: python-package-distributions
path: dist/
- name: Install deps
run: python -m pip install setuptools==68.0.0 build==0.10.0 twine
- name: Publish distribution 📦 to PyPi
run: |
twine upload dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}