Skip to content

[WIP] MATLAB bindings for v1 #12

[WIP] MATLAB bindings for v1

[WIP] MATLAB bindings for v1 #12

Workflow file for this run

name: Test MATLAB Bindings
on: [push]
jobs:
build:
name: Test MATLAB Bindings
runs-on: ubuntu-latest
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v2
with:
release: R2023b
- name: Check out repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install dependencies
run: |
sudo apt-get -qq update
sudo apt-get install -y git cmake graphviz libavahi-common-dev libavahi-client-dev libaio-dev libusb-1.0-0-dev libxml2-dev rpm tar bzip2 gzip flex bison git libzstd-dev
cmake . -DHAVE_DNS_SD=OFF -DPYTHON_BINDINGS=ON -DCMAKE_CROSSCOMPILING=ON
cd bindings/python
pip install .
cd ../..
make
sudo make install
sudo make clean
mkdir edeps
cd edeps
git clone https://github.com/analogdevicesinc/libtinyiiod.git
cd libtinyiiod
mkdir build && cd build
cmake -DBUILD_EXAMPLES=OFF ..
make
sudo make install
sudo ldconfig
cd ../..
git clone -b v0.1.0 https://github.com/analogdevicesinc/iio-emu.git
cd iio-emu
mkdir build && cd build
cmake ..
make
sudo make install
sudo ldconfig
cd ../..
cd ..
- name: Install pytest-libiio interface
run: |
pip install pytest pyyaml lxml click
git clone https://github.com/tfcollins/pytest-libiio.git
mv pytest-libiio/pytest_libiio bindings/matlab/
cd bindings/matlab
python -c 'import pytest_libiio.plugin'
cd ../..
- name: Run Tests
uses: matlab-actions/run-command@v2
with:
command: cd('bindings/matlab');addpath(genpath('.'));runTests;exit()