Skip to content

Some tlb test fixes #76

Some tlb test fixes

Some tlb test fixes #76

Workflow file for this run

name: Wheels & Tests & PyPi
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
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: macos-latest
python: "3.10"
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-x86_64-darwin/
file: python_ton.cpython-310-darwin.so
fix_tag: x86_64
- arch: x86_64
os: macos-latest
python: "3.11"
link: https://github.com/disintar/ton/releases/download/ton-cpython-311-x86_64-darwin/
file: python_ton.cpython-311-darwin.so
fix_tag: x86_64
- arch: x86_64
os: Linux
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: 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
- arch: x86_64
os: Linux
python: "3.11"
link: https://github.com/disintar/ton/releases/download/ton-cpython-311-x86_64-linux/
file: python_ton.cpython-311-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: aarch64
os: macOS
python: "3.11"
link: https://github.com/disintar/ton/releases/download/ton-cpython-311-aarch64-darwin/
file: python_ton.cpython-311-darwin.so
fix_tag: arm64
- arch: x86_64
os: windows-2019
python: "3.9"
link: https://github.com/disintar/ton/releases/download/ton-cpython-39-x86_64-windows/
file: python_ton.cp39-win_amd64.pyd
fix_tag:
- arch: x86_64
os: windows-2019
python: "3.10"
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-x86_64-windows/
file: python_ton.cp310-win_amd64.pyd
fix_tag:
- arch: x86_64
os: windows-2019
python: "3.11"
link: https://github.com/disintar/ton/releases/download/ton-cpython-311-x86_64-windows/
file: python_ton.cp311-win_amd64.pyd
fix_tag:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- 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: 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 --wheel --outdir dist/ .
python fix_whl_name.py
env:
TAG_FIX: ${{ matrix.fix_tag }}
- name: Store the binary wheel
uses: actions/upload-artifact@v2
with:
name: python-package-distributions
path: dist
buildMacOs39:
strategy:
matrix:
include:
- arch: x86_64
os: macos-latest
python: "3.9"
link: https://github.com/disintar/ton/releases/download/ton-cpython-39-x86_64-darwin/
file: python_ton.cpython-39-darwin.so
fix_tag: x86_64
- arch: aarch64
os: macOS
python: "3.9"
link: https://github.com/disintar/ton/releases/download/ton-cpython-39-aarch64-darwin/
file: python_ton.cpython-39-darwin.so
fix_tag: arm64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Install python3.9
run: |
/opt/homebrew/bin/brew install [email protected]
if: matrix.os == 'macOS'
- name: Install python3.9
run: |
brew install [email protected]
if: matrix.os == 'macos-latest'
- name: Install deps
run: |
python3.9 -m pip install -r built_requirements.txt
python3.9 -m pip install -r requirements.txt
- name: Download prebuilt
run: |
curl -Lo ./src/tonpy/libs/${{ matrix.file }} ${{ matrix.link }}${{ matrix.file }}
- name: Run tests
run: |
python3.9 -m pytest
- name: Build wheel
run: |
python3.9 -m build --wheel --outdir dist/ .
python3.9 fix_whl_name.py
env:
TAG_FIX: ${{ matrix.fix_tag }}
- name: Store the binary wheel
uses: actions/upload-artifact@v2
with:
name: python-package-distributions
path: dist
buildVirtualLinux:
strategy:
matrix:
include:
- arch: aarch64
os: Linux
python: "3.9"
link: https://github.com/disintar/ton/releases/download/ton-cpython-39-aarch64-linux/
file: python_ton.cpython-39-aarch64-linux-gnu.so
fix_tag: manylinux2014_aarch64
docker_python_tag: 3.9.17-bookworm
- arch: aarch64
os: Linux
python: "3.10"
link: https://github.com/disintar/ton/releases/download/ton-cpython-310-aarch64-linux/
file: python_ton.cpython-310-aarch64-linux-gnu.so
fix_tag: manylinux2014_aarch64
docker_python_tag: 3.10.12-bookworm
- arch: aarch64
os: Linux
python: "3.11"
link: https://github.com/disintar/ton/releases/download/ton-cpython-311-aarch64-linux/
file: python_ton.cpython-311-aarch64-linux-gnu.so
fix_tag: manylinux2014_aarch64
docker_python_tag: 3.11.4-bookworm
runs-on: ${{ matrix.os }}
needs:
- build
steps:
- uses: actions/checkout@v3
- name: Save download prebuilt
run: |
curl -Lo ${PWD}/src/tonpy/libs/${{ matrix.file }} ${{ matrix.link }}${{ matrix.file }}
- name: Run tests in virtual
run: |
docker run --network host --platform linux/aarch64 -e TAG_FIX=${{ matrix.fix_tag }} --rm --volume "${PWD}:/tmp/tonpy" -t arm64v8/python:${{ matrix.docker_python_tag }} /tmp/tonpy/run_test_in_docker.sh
if: (matrix.os == 'Linux' && matrix.arch == 'aarch64')
- name: Show wheel
run: |
ls -lhta ./dist
- name: Store the binary wheel
uses: actions/upload-artifact@v2
with:
name: python-package-distributions
path: dist
deploy:
name: Publish 🐍📦 to PyPI
runs-on: Linux
needs:
- buildVirtualLinux
- buildMacOs39
steps:
- uses: actions/checkout@v3
- 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 }}