-
Notifications
You must be signed in to change notification settings - Fork 319
65 lines (61 loc) · 2 KB
/
matlab.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
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
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()