Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI #1303

Merged
merged 23 commits into from
Sep 22, 2021
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 56 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,63 @@ name: Build
on:
push:
branches:
- master
- dev
pull_request:
branches:
- dev
types: [opened, synchronize, reopened]
release:
types: [created]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
test:
name: ${{ matrix.os }} ${{ matrix.gcrypt }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "ubuntu-18.04", "macOS-latest", "macos-11"]
gcrypt: ["--disable-gcrypt", ""]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install dependencies
run: sudo apt-get install build-essential libc6-dev libpcap-dev libjson-c-dev libgcrypt20-dev gcc-arm-linux-gnueabihf gcc-mingw-w64
- name: Configure
run: env CFLAGS='-Werror' ./autogen.sh
- name: Build
run: make all
- name: Test DIFF
run: ./tests/do.sh
- name: Test UNIT
run: ./tests/unit/unit
- name: Configure (with debug logs)
run: make distclean && env CFLAGS='-Werror' ./autogen.sh --enable-debug-messages
- name: Build
run: make all
- name: Configure ARM
run: make distclean && env CFLAGS='-Werror' ./autogen.sh --host=arm-linux-gnueabihf --with-only-libndpi
- name: Build ARM
run: make all
- name: Configure Mingw-w64
run: make distclean && ./autogen.sh --host=x86_64-w64-mingw32
- name: Build Mingw-w64
run: make all
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install Ubuntu Prerequisites
if: startsWith(matrix.os, 'ubuntu')
run: |
utoni marked this conversation as resolved.
Show resolved Hide resolved
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 gcc-arm-linux-gnueabihf gcc-mingw-w64 libc6-dev
- name: Install Ubuntu Prerequisites (libgcrypt)
if: startsWith(matrix.os, 'ubuntu') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
run: |
sudo apt-get install libgcrypt20-dev
- name: Installing MacOS prerequisites
if: startsWith(matrix.os, 'macOS')
run: |
brew install autoconf automake libtool pkg-config gettext json-c
- name: Install MacOS Prerequisites (libgcrypt)
if: startsWith(matrix.os, 'macOS') && !startsWith(matrix.gcrypt, '--disable-gcrypt')
run: |
brew install libgcrypt
- name: Build nDPI
run: |
env CFLAGS='-Werror' ./autogen.sh --enable-debug-messages ${{ matrix.gcrypt }}
make all
- name: Test nDPI
run: |
cd tests
./do.sh
./do-unit.sh
./do-dga.sh
cd ..
- name: Build nDPI [ARM] (runs only on ubuntu jobs)
if: startsWith(matrix.os, 'ubuntu')
run: |
make distclean && env CFLAGS='-Werror' ./autogen.sh --host=arm-linux-gnueabihf --with-only-libndpi ${{ matrix.gcrypt }}
make all
- name: Build nDPI [Mingw-w64] (runs only on ubuntu jobs)
if: startsWith(matrix.os, 'ubuntu')
run: |
make distclean && ./autogen.sh --host=x86_64-w64-mingw32 ${{ matrix.gcrypt }}
make all
241 changes: 0 additions & 241 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
![ntop][ntopng_logo] ![ntop][ntop_logo]
# nDPI

[![Build Status](https://travis-ci.org/ntop/nDPI.png?branch=dev)](https://travis-ci.org/ntop/nDPI)
[![Build Status](https://img.shields.io/github/workflow/status/ntop/nDPI/Build/dev?logo=github)](https://github.com/ntop/nDPI/actions?query=workflow%3ABuild)
[![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/ntop/nDPI.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ntop/nDPI/context:cpp)
[![Total Alerts](https://img.shields.io/lgtm/alerts/g/ntop/nDPI.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/ntop/nDPI/alerts)
[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/ndpi.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:ndpi)
Expand Down
2 changes: 1 addition & 1 deletion configure.seed
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ case "$host" in
;;
esac
CFLAGS="${CFLAGS}"
LDFLAGS="${LDFLAGS} -lws2_32 -lucrtbase"
LDFLAGS="${LDFLAGS} -lws2_32"
BUILD_MINGW=1
;;
*)
Expand Down