add scopeSelf for slots #1
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: Language Bindings 🐍 | |
permissions: | |
contents: read | |
on: | |
push: | |
branches: | |
- 'master' | |
paths: | |
- '**/language_bindings.yml' | |
- '**/bindings/python/**' | |
- '**/bindings/python.nim' | |
- '**/bindings/python_types.nim' | |
- '**/constants.nim' | |
pull_request: | |
paths: | |
- '**/language_bindings.yml' | |
- '**/bindings/python/**' | |
- '**/bindings/python.nim' | |
- '**/bindings/python_types.nim' | |
- '**/constants.nim' | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
nim_version: | |
- '2.0.0' | |
python_version: | |
- '3.x' | |
env: | |
TIMEOUT_EXIT_STATUS: 124 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache nimble | |
id: cache-nimble | |
uses: actions/cache@v3 | |
with: | |
path: ~/.nimble | |
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} | |
- uses: jiro4989/setup-nim-action@v1 | |
with: | |
nim-version: ${{ matrix.nim_version }} | |
- name: Set up Python 🔃 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- name: Install dependencies 🔃 | |
run: | | |
nimble refresh | |
nimble install -y -d | |
python -m pip install --upgrade pip | |
pip install -U twine build packaging | |
- name: Python Bindings 🐍 | |
run: | | |
cd src | |
echo "Windows module" | |
echo "Win Module compiled with" | |
echo "nim c --app:lib --out:../bindings/python/happyx/happyx.pyd -d:useRealtimeGC --mm:arc --tlsEmulation:off --passL:-static --t:-flto --l:-flto --opt:speed --threads:off -d:release -d:httpx -d:export2py happyx" | |
echo "Linux module" | |
nim c --app:lib --out:../bindings/python/happyx/happyx.so -d:useRealtimeGC --mm:arc -t:-flto -l:-flto --opt:speed --threads:on -d:release -x:off -a:off -d:httpx -d:export2py happyx | |
shell: bash | |
- name: Build Package 🏗 | |
run: | | |
cd bindings/python | |
python -m build | |
- name: Publish Python package 📢 | |
uses: pypa/gh-action-pypi-publish@8cdc2ab67c943c5edf5fd9ae1995546b4b550602 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} | |
packages_dir: bindings/python/dist/ | |
verbose: true |