eerie 0.2.4

Rustic binding to the IREE Compiler/Runtime
name: Rust

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

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v3
      with:
        submodules: recursive
    - name: install iree-compile
      run: pip3 install iree-compiler
    - name: create config.toml
      run: |
        library_path=$(python3 -c "import iree.compiler as _; print(f'{_.__path__[0]}/_mlir_libs/')")
        mkdir -p .cargo
        echo "[build]
        rustflags = [\"-C\", \"link-arg=-Wl,-rpath=${library_path}\"]
        rustdocflags = [\"-C\", \"link-arg=-Wl,-rpath=${library_path}\"]
        [env]
        LIB_IREE_COMPILER = \"${library_path}\"" > .cargo/config.toml
        
    - name: Run tests
      run: RUST_BACKTRACE=1 cargo test -vv --release