Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mhils committed Dec 1, 2023
0 parents commit ff1b18f
Show file tree
Hide file tree
Showing 6 changed files with 437 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on: ["push"]

permissions:
contents: read
id-token: write

jobs:
build-and-publish:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
- os: ubuntu-latest
args: --compatibility manylinux2014 --zig --sdist
- os: macos-latest
args: --target universal2-apple-darwin

steps:
- uses: actions/checkout@v3

- run: rustup toolchain install stable --profile minimal
- run: rustup default stable
- if: runner.os == 'macOS'
run: rustup target add aarch64-apple-darwin

- uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install maturin[zig] from PyPI
uses: install-pinned/maturin-with-zig@afa2e7d89f6e72351177ec169bcd766c0b0dfa36 # 1.3.2

- name: Bump version
shell: python
run: |
from pathlib import Path
import os
toml = Path("Cargo.toml").read_text()
toml = toml.replace('.0" # autoupdated', '.%s"' % os.environ["GITHUB_RUN_NUMBER"])
Path("Cargo.toml").write_text(toml)
- run: maturin build --release ${{ matrix.args }}

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf
with:
packages-dir: target/wheels/
72 changes: 72 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
/target

# Byte-compiled / optimized / DLL files
__pycache__/
.pytest_cache/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
.venv/
env/
bin/
build/
develop-eggs/
dist/
eggs/
lib/
lib64/
parts/
sdist/
var/
include/
man/
venv/
*.egg-info/
.installed.cfg
*.egg

# Installer logs
pip-log.txt
pip-delete-this-directory.txt
pip-selfcheck.json

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.cache
nosetests.xml
coverage.xml

# Translations
*.mo

# Mr Developer
.mr.developer.cfg
.project
.pydevproject

# Rope
.ropeproject

# Django stuff:
*.log
*.pot

.DS_Store

# Sphinx documentation
docs/_build/

# PyCharm
.idea/

# VSCode
.vscode/

# Pyenv
.python-version
273 changes: 273 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ff1b18f

Please sign in to comment.