aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/build.yml
diff options
context:
space:
mode:
authoraouinizied <aouinizied@gmail.com>2022-03-22 13:19:27 +0100
committeraouinizied <aouinizied@gmail.com>2022-03-22 13:19:27 +0100
commitbeef4f997bccc90c545abdf8d387bab600b4af8f (patch)
tree71a608cc34d1b727f2e408033e3d04f480399eb9 /.github/workflows/build.yml
parent93f723d50f789530ca09dd9c5104e629824e30f4 (diff)
Complete rework of nDPI Python bindings (cffi API, automatic generation, packaging and CI integration)
Diffstat (limited to '.github/workflows/build.yml')
-rw-r--r--.github/workflows/build.yml31
1 files changed, 27 insertions, 4 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 842de4aea..724d0b5d1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -43,6 +43,33 @@ jobs:
path: coverage_report
retention-days: 7
+ python-bindings:
+ name: Python Bindings (ubuntu-latest)
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+ - name: Install Ubuntu Prerequisites
+ run: |
+ sudo apt-get update
+ sudo apt-get install autoconf automake libtool pkg-config gettext libjson-c-dev flex bison libpcap-dev
+ - name: Build nDPI library
+ run: |
+ env CC=gcc CFLAGS='-Werror' ./autogen.sh
+ make
+ - name: Generate Python bindings
+ run: |
+ cd python
+ python3 -m pip install --upgrade pip
+ python3 -m pip install -r requirements.txt
+ python3 setup.py install
+ cd ..
+ - name: Test Python Bindings
+ run: |
+ cd python
+ python3 tests.py
+
test-scripts:
name: Test Utils (ubuntu-latest)
runs-on: ubuntu-latest
@@ -267,7 +294,6 @@ jobs:
make all
make -C example ndpiSimpleIntegration
make -C rrdtool
- make -C python
- name: Install nDPI
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows')
run: |
@@ -320,7 +346,6 @@ jobs:
make all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&
- make -C python &&
./tests/do.sh &&
./tests/do-unit.sh
"
@@ -345,7 +370,6 @@ jobs:
make all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&
- make -C python &&
./tests/do.sh &&
./tests/do-unit.sh
"
@@ -370,7 +394,6 @@ jobs:
make all &&
make -C example ndpiSimpleIntegration &&
make -C rrdtool &&
- make -C python &&
./tests/do.sh &&
./tests/do-unit.sh
"