Scheduled builds #638
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Scheduled builds | |
on: | |
workflow_dispatch: | |
schedule: | |
#At the end of every day | |
- cron: '0 0 * * *' | |
jobs: | |
coverage: | |
name: Coverage (ubuntu-latest) | |
runs-on: ubuntu-latest | |
env: | |
CFLAGS: -Werror | |
steps: | |
- uses: actions/checkout@v4 | |
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 | |
sudo apt-get install rrdtool librrd-dev | |
sudo apt-get install libpcre3-dev libmaxminddb-dev lcov | |
sudo apt-get install wdiff colordiff | |
- name: Configure | |
run: ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-code-coverage --with-pcre2 --with-maxminddb --enable-tls-sigs | |
- name: Build | |
run: make all | |
- name: Test | |
run: | | |
make check VERBOSE=1 | |
- name: Generate Coverage Report | |
run: | | |
make coverage | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ndpi-coverage-report | |
path: coverage_report | |
retention-days: 7 | |
documentation: | |
name: Documentation (ubuntu-latest) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
- name: Install Ubuntu Prerequisites | |
run: | | |
sudo apt-get update | |
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison doxygen | |
- name: Configure nDPI library | |
run: | | |
./autogen.sh --with-only-libndpi --enable-option-checking=fatal --enable-debug-build | |
- name: Generate Documentation | |
run: | | |
pip install --upgrade pip | |
pip install -r doc/requirements.txt | |
make doc | |
mkdir -vp doc/_build/ndpi-documentation-upload/ndpi-documentation | |
mv -v doc/_build/html doc/_build/ndpi-documentation-upload/ndpi-documentation/html | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ndpi-documentation | |
path: doc/_build/ndpi-documentation-upload | |
retention-days: 7 | |
performance: | |
name: Performance (ubuntu-latest) | |
runs-on: ubuntu-latest | |
env: | |
GO111MODULE: on | |
CFLAGS: -Werror | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Ubuntu Prerequisites | |
run: | | |
sudo add-apt-repository ppa:longsleep/golang-backports | |
sudo apt-get update | |
sudo apt-get install libunwind-dev | |
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison libpcap-dev parallel | |
sudo apt-get install golang-1.16-go libgoogle-perftools-dev graphviz | |
go install github.com/google/pprof@latest | |
sudo ln -s ${HOME}/go/bin/pprof /usr/bin/pprof | |
pprof -h | |
- name: Configure nDPI library | |
run: | | |
./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre2 --with-maxminddb --enable-tls-sigs | |
- name: Build nDPI library | |
run: | | |
make -j | |
- name: Performance Profiling | |
run: | | |
NDPI_FORCE_PARALLEL_UTESTS=1 NDPI_SKIP_PARALLEL_BAR=1 ./tests/do.sh | |
mkdir ndpi-performance-upload | |
for d in $(find ./tests/cfgs/* -type d -maxdepth 0 2>/dev/null) ; do | |
PROFILE="$(basename $d)" | |
mv -v tests/cfgs/${PROFILE}/result/cpu_profile.png ndpi-performance-upload/${PROFILE}_cpu_profile.png | |
mv -v tests/cfgs/${PROFILE}/result/heap_profile.png ndpi-performance-upload/${PROFILE}_heap_profile.png | |
done | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: ndpi-performance | |
path: ndpi-performance-upload | |
retention-days: 7 |