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: 35 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Build And Publish

on:
workflow_dispatch:
pull_request:
push:
branches:
- "**"
Expand Down Expand Up @@ -41,23 +42,52 @@ jobs:
uv run --reinstall-package macloop pytest -q tests

- name: Install Rust coverage tooling
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/') }}
run: |
rustup component add llvm-tools-preview
cargo install cargo-llvm-cov --locked

- name: Generate Python coverage report
if: ${{ github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/') }}
run: |
uv run --reinstall-package macloop pytest \
--cov=macloop \
--cov-report=xml:python-coverage.xml \
--cov-report=term-missing \
-q tests/test_public_api.py tests/test_runtime_helpers.py tests/test_e2e_synthetic.py

- name: Generate Rust coverage report (lcov)
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/') }}
shell: bash
run: |
cargo llvm-cov --workspace --lcov --output-path lcov.info
SWIFT_RUSTFLAGS="$RUSTFLAGS"
cargo llvm-cov clean --workspace
source <(cargo llvm-cov show-env --export-prefix)
export CARGO_TARGET_DIR="${CARGO_LLVM_COV_TARGET_DIR:-target/llvm-cov-target}"
export RUSTFLAGS="$RUSTFLAGS $SWIFT_RUSTFLAGS"
cargo llvm-cov --workspace --no-report
uv run maturin develop --manifest-path python_ffi/Cargo.toml
uv run pytest -q tests/test_e2e_synthetic.py tests/test_ffi_backend.py
cargo llvm-cov report --lcov --output-path rust-lcov.info

- name: Upload coverage to Codecov
if: ${{ github.ref == 'refs/heads/main' }}
if: ${{ github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/') }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
files: rust-lcov.info
flags: rust
disable_search: true
fail_ci_if_error: false

- name: Upload Python coverage to Codecov
if: ${{ github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/') }}
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: python-coverage.xml
flags: python
disable_search: true
fail_ci_if_error: false

build:
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ manifest-path = "python_ffi/Cargo.toml"

[dependency-groups]
dev = [
"maturin>=1.0,<2.0",
"pytest>=7.4.4",
"pytest-asyncio>=0.21.2",
"pytest-cov>=5.0.0",
]
2 changes: 1 addition & 1 deletion python_ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ crate-type = ["cdylib"]
[dependencies]
core_engine = { path = "../core_engine" }
numpy = "0.28.0"
pyo3 = { version = "0.28.2", features = ["extension-module", "abi3-py39"] }
pyo3 = { version = "0.28.2", features = ["abi3-py39"] }
182 changes: 0 additions & 182 deletions python_ffi/src/capture.rs

This file was deleted.

112 changes: 0 additions & 112 deletions python_ffi/src/config.rs

This file was deleted.

Loading
Loading