Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
pull_request:

jobs:
python:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: |
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]"
- name: Lint
run: python -m ruff check src tests
- name: Test
run: python -m pytest -q

rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Rust check
run: cargo check --workspace
- name: Build Rust Python core
run: |
python -m pip install --upgrade pip maturin
maturin build --manifest-path crates/mcdowell-arc-core/Cargo.toml --release
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,10 @@ build/
*.egg-info/
.env
.DS_Store
.ruff_cache/
.mypy_cache/
target/
*.so
*.dylib
*.dll
profile.out
133 changes: 133 additions & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[workspace]
members = ["crates/mcdowell-arc-core"]
resolver = "2"
25 changes: 25 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.PHONY: install dev test lint doctor rust-core clean

install:
python -m pip install -e .

dev:
python -m pip install --upgrade pip setuptools wheel
python -m pip install -e ".[dev]"

test:
python -m pytest -q

lint:
python -m ruff check src tests

doctor:
mcdowell-arc doctor

rust-core:
python -m pip install maturin
maturin develop --manifest-path crates/mcdowell-arc-core/Cargo.toml --release

clean:
rm -rf .pytest_cache .ruff_cache build dist src/*.egg-info target profile.out
find . -type d -name __pycache__ -prune -exec rm -rf {} +
Loading
Loading