Skip to content

feat!: new CircuitMatch struct #114

feat!: new CircuitMatch struct

feat!: new CircuitMatch struct #114

Workflow file for this run

name: Continuous integration
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch: {}
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
RUSTFLAGS: "--cfg=ci_run"
MIRIFLAGS: '-Zmiri-permissive-provenance' # Required due to warnings in bitvec 1.0.1
FEATURES: "pyo3, portmatching" # Features to test, ignoring the ones that require c++ bindings
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
with:
prefix-key: v0
- name: Check formatting
run: cargo fmt -- --check
- name: Run clippy
run: cargo clippy --all-targets --features="$FEATURES" -- -D warnings
- name: Build docs
run: cargo doc --no-deps --features="$FEATURES"
env:
RUSTDOCFLAGS: "-Dwarnings"
benches:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
prefix-key: v0
- name: Build benchmarks with no features
run: cargo bench --verbose --no-run --no-default-features
- name: Build benchmarks with all (non c++) features
run: cargo bench --verbose --no-run --features="$FEATURES"
tests:
runs-on: ubuntu-latest
strategy:
matrix:
include:
#- rust: 1.70.0 # Update once MSRV != stable
- rust: stable
cache: true
- rust: beta
cache: true
- rust: nightly
cache: true
steps:
- uses: actions/checkout@v3
- id: toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Configure default rust toolchain
run: rustup override set ${{steps.toolchain.outputs.name}}
- uses: Swatinem/rust-cache@v2
if: ${{ matrix.cache }}
with:
prefix-key: v0-rust-${{ matrix.rust }}
- name: Build with no features
run: cargo build --verbose --no-default-features
- name: Build with all (non c++) features
run: cargo build --verbose --features="$FEATURES"
- name: Tests with no features
run: cargo test --verbose --no-default-features
- name: Tests with all (non c++) features
run: cargo test --verbose --features="$FEATURES"
- name: Test pyo3 bindings
run: |
pip install -r requirements.txt
cd pyrs
maturin build
pip install ../target/wheels/*.whl
pytest