Skip to content

Add lazy getter for ABI #214

Add lazy getter for ABI

Add lazy getter for ABI #214

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: Linux
python: "3.12"
link: https://github.com/disintar/ton/releases/download/ton-cpython-312-x86_64-linux/
file: python_ton.cpython-312-x86_64-linux-gnu.so
fix_tag: manylinux2014_x86_64
- arch: aarch64
os: macOS
python: "3.12"
link: https://github.com/disintar/ton/releases/download/ton-cpython-312-aarch64-darwin/
file: python_ton.cpython-312-darwin.so
fix_tag: arm64
- arch: x86_64
os: Linux
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@v4
with:
name: python-package-distributions-${{ github.run_id }}-${{ matrix.arch }}-${{ matrix.python }}
path: dist
deploy:
name: Publish DEV 🐍📦 to PyPI
runs-on: Linux
needs:
- build
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: "3.10"
env:
USER: tvorogme
- name: Merge coverage
uses: actions/upload-artifact/merge@v4
if: always()
with:
name: python-package-distributions-${{ github.run_id }}
pattern: python-package-distributions-${{ github.run_id }}-*
delete-merged: true
- name: Download all the dists
uses: actions/download-artifact@v4
with:
name: python-package-distributions-${{ github.run_id }}
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 }}