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
Changes from 3 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
78 changes: 49 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,56 @@ 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=y", "DISABLE_GCRYPT=n"]

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 libgcrypt20-dev
utoni marked this conversation as resolved.
Show resolved Hide resolved
sudo apt-get install gcc-arm-linux-gnueabihf gcc-mingw-w64 libc6-dev
- name: Installing MacOS prerequisites
if: startsWith(matrix.os, 'macOS')
run: |
brew install autoconf automake libtool pkg-config gettext json-c libgcrypt
utoni marked this conversation as resolved.
Show resolved Hide resolved
- name: Build nDPI
run: |
export ${{ matrix.gcrypt }}
env CFLAGS='-Werror' ./autogen.sh --enable-debug-messages
make all
- name: Test nDPI
run: |
cd tests
./do.sh
./do-unit.sh
./do-dga.sh
cd ..
- name: Build nDPI (ARM)
if: startsWith(matrix.os, 'ubuntu-latest')
run: |
make distclean && env CFLAGS='-Werror' ./autogen.sh --host=arm-linux-gnueabihf --with-only-libndpi
make all
- name: Build nDPI (Mingw-w64)
if: startsWith(matrix.os, 'ubuntu-latest')
run: |
make distclean && ./autogen.sh --host=x86_64-w64-mingw32
make all