gsim 1.1.4

High speed digital logic simulation
Documentation
name: Tests

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always
  PYTHON_SYS_EXECUTABLE: python3.8

jobs:

  test:
    name: test
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: build
      run: cargo build
    - name: test
      run: cargo test
    - name: build c-api
      run: cargo build --features=c-api

  tools:
    name: tools
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: taiki-e/install-action@v2
      with:
        tool: cargo-hack,cargo-msrv
    - name: hack
      run: cargo hack check --feature-powerset --no-dev-deps
    - name: msrv
      run: cargo msrv verify -- cargo check --all-features

  format:
    name: format
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions-rust-lang/setup-rust-toolchain@v1
      with:
        components: rustfmt
    - uses: actions-rust-lang/rustfmt@v1

  python:
    name: python
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - uses: actions/setup-python@v4
      with:
        python-version: '3.8'
    - name: update pip
      run: pip install --upgrade pip
    - name: setup venv
      run: python3.8 -m venv .venv
    - uses: PyO3/maturin-action@v1
      with:
        command: develop
        args: --features python-bindings
    - name: test
      run: |
        source .venv/bin/activate
        python3.8 ./python_tests/main.py -v