Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: cargo build validator in CI #468

Merged
merged 2 commits into from
Sep 9, 2024
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
6 changes: 6 additions & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ jobs:
- name: Install Guppy with llvm-based execution
run: uv sync --extra execution

- name: Cargo build validator
run: cargo build -p validator --release

- name: Run tests
run: uv run pytest

Expand Down Expand Up @@ -106,6 +109,9 @@ jobs:
- name: Install Guppy with execution and pytket
run: uv sync --extra execution --extra pytket

- name: Cargo build validator
run: cargo build -p validator --release

- name: Run python tests with coverage instrumentation
run: uv run pytest --cov=./ --cov-report=xml

Expand Down
4 changes: 2 additions & 2 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ class LLVMException(Exception):

@pytest.fixture
def run_int_fn():
def f(hugr: Hugr, expected: int, fn_name: str = "main"):
def f(hugr: Package, expected: int, fn_name: str = "main"):
try:
import execute_llvm

if not hasattr(execute_llvm, "run_int_function"):
pytest.skip("Skipping llvm execution")

hugr_json: str = hugr.to_json()
hugr_json: str = hugr.modules[0].to_json()
res = execute_llvm.run_int_function(hugr_json, fn_name)
if res != expected:
raise LLVMException(
Expand Down
Loading