-
Notifications
You must be signed in to change notification settings - Fork 319
54 lines (45 loc) · 1.21 KB
/
python_bindings.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
# Build, test, and deploy Python bindings
name: Python bindings
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
container: tfcollins/libiio_ubuntu_22_04-ci:latest
steps:
- uses: actions/checkout@v2
# - name: Set up Python 3.8
# uses: actions/setup-python@v2
# with:
# python-version: 3.8
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-pip python3-virtualenv python3-venv
- name: Install C library
run: |
mkdir build && cd build
cmake ..
make -j
sudo make install
sudo ldconfig
cd ..
- name: Build and test Python bindings
run: |
python3 -m venv venv
source venv/bin/activate
pip3 install build
cd bindings/python
python3 -m build
pip install dist/*.whl
cd ../..
shell: bash
- name: Test Python bindings
run: |
source venv/bin/activate
python3 -c "import iio"
shell: bash
- name: Archive Python bindings
uses: actions/upload-artifact@v4
with:
name: python-wheel
path: bindings/python/dist/*.whl