CI: more parallel work (#2459)

This commit is contained in:
Ivan Nardi
2024-06-05 11:56:03 +02:00
committed by GitHub
parent 7be482f5b1
commit 6a9d4b1ab6
3 changed files with 10 additions and 32 deletions
+6 -28
View File
@@ -30,7 +30,7 @@ jobs:
- name: Build nDPI library - name: Build nDPI library
run: | run: |
./autogen.sh ./autogen.sh
make make -j
sudo make install sudo make install
- name: Generate Python bindings - name: Generate Python bindings
run: | run: |
@@ -271,29 +271,7 @@ jobs:
with: with:
msystem: MINGW64 msystem: MINGW64
update: true update: true
install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86_64-json-c mingw-w64-x86_64-crt-git mingw-w64-x86_64-pcre mingw-w64-x86_64-libpcap install: git mingw-w64-x86_64-toolchain automake1.16 automake-wrapper autoconf libtool make mingw-w64-x86_64-json-c mingw-w64-x86_64-crt-git mingw-w64-x86_64-pcre mingw-w64-x86_64-libpcap mingw-w64-x86_64-libgcrypt parallel
- name: Setup Windows msys2 prerequisites (libgcrypt)
if: startsWith(matrix.os, 'windows') && startsWith(matrix.gcrypt, '--with-local-libgcrypt')
run: |
msys2 -c 'git clone --branch libgpg-error-1.42 https://github.com/gpg/libgpg-error'
cd libgpg-error
msys2 -c './autogen.sh'
msys2 -c './configure -enable-maintainer-mode --enable-static --enable-shared --with-pic --disable-doc --disable-nls'
msys2 -c 'make'
msys2 -c 'make install'
msys2 -c 'cd ..'
msys2 -c 'rm -rf libgpg-error/'
msys2 -c 'git clone --branch libgcrypt-1.8.8 https://github.com/gpg/libgcrypt'
cd libgcrypt
msys2 -c './autogen.sh'
msys2 -c './configure -enable-maintainer-mode --enable-static --enable-shared --with-pic --disable-doc'
msys2 -c 'make'
msys2 -c 'make install'
msys2 -c 'cd ..'
msys2 -c 'rm -rf libgcrypt/'
env:
CC:
CFLAGS:
- name: Installing MacOS prerequisites - name: Installing MacOS prerequisites
if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64') if: startsWith(matrix.os, 'macOS') && startsWith(matrix.arch, 'x86_64')
run: | run: |
@@ -330,7 +308,7 @@ jobs:
- name: Build nDPI on Windows msys2 - name: Build nDPI on Windows msys2
if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'cc') if: startsWith(matrix.os, 'windows') && startsWith(matrix.arch, 'x86_64') && startsWith(matrix.compiler, 'cc')
run: | run: |
msys2 -c 'make all' msys2 -c 'make -j all'
msys2 -c 'ldd ./example/ndpiReader.exe' msys2 -c 'ldd ./example/ndpiReader.exe'
- name: Build nDPI - name: Build nDPI
if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos-14') if: startsWith(matrix.arch, 'x86_64') && !startsWith(matrix.os, 'windows') && !startsWith(matrix.os, 'macos-14')
@@ -341,7 +319,7 @@ jobs:
- name: Build nDPI (MacOS M1) - name: Build nDPI (MacOS M1)
if: startsWith(matrix.os, 'macos-14') if: startsWith(matrix.os, 'macos-14')
run: | run: |
make all make -j all
make -C example ndpiSimpleIntegration make -C example ndpiSimpleIntegration
#There are somes issues with librrd #There are somes issues with librrd
#make -C rrdtool #make -C rrdtool
@@ -376,7 +354,7 @@ jobs:
- name: Test nDPI [DIFF] (runs only on windows jobs) - name: Test nDPI [DIFF] (runs only on windows jobs)
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows') if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
run: | run: |
msys2 -c './tests/do.sh' msys2 -c 'NDPI_FORCE_PARALLEL_UTESTS=1 NDPI_SKIP_PARALLEL_BAR=1 ./tests/do.sh'
- name: Test nDPI [UNIT] (runs only on windows jobs) - name: Test nDPI [UNIT] (runs only on windows jobs)
if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows') if: startsWith(matrix.arch, 'x86_64') && startsWith(matrix.os, 'windows')
run: | run: |
@@ -395,7 +373,7 @@ jobs:
run: | run: |
make distclean make distclean
./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-tls-sigs --host=x86_64-w64-mingw32 ./autogen.sh --enable-option-checking=fatal --enable-debug-messages --enable-tls-sigs --host=x86_64-w64-mingw32
make all make -j $(nproc) all
env: env:
CC: CC:
- name: Display qemu specified architecture (arm64 - little endian) - name: Display qemu specified architecture (arm64 - little endian)
+3 -3
View File
@@ -84,7 +84,7 @@ jobs:
sudo add-apt-repository ppa:longsleep/golang-backports sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update sudo apt-get update
sudo apt-get install libunwind-dev sudo apt-get install libunwind-dev
sudo apt-get install autoconf automake libtool pkg-config gettext flex bison libpcap-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 sudo apt-get install golang-1.16-go libgoogle-perftools-dev graphviz
go install github.com/google/pprof@latest go install github.com/google/pprof@latest
sudo ln -s ${HOME}/go/bin/pprof /usr/bin/pprof sudo ln -s ${HOME}/go/bin/pprof /usr/bin/pprof
@@ -94,10 +94,10 @@ jobs:
./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre2 --with-maxminddb --enable-tls-sigs ./autogen.sh --enable-gprof --enable-option-checking=fatal --with-pcre2 --with-maxminddb --enable-tls-sigs
- name: Build nDPI library - name: Build nDPI library
run: | run: |
make make -j
- name: Performance Profiling - name: Performance Profiling
run: | run: |
./tests/do.sh NDPI_FORCE_PARALLEL_UTESTS=1 NDPI_SKIP_PARALLEL_BAR=1 ./tests/do.sh
mkdir ndpi-performance-upload mkdir ndpi-performance-upload
for d in $(find ./tests/cfgs/* -type d -maxdepth 0 2>/dev/null) ; do for d in $(find ./tests/cfgs/* -type d -maxdepth 0 2>/dev/null) ; do
PROFILE="$(basename $d)" PROFILE="$(basename $d)"
+1 -1
View File
@@ -51,7 +51,7 @@ jobs:
- name: Build nDPI library - name: Build nDPI library
run: | run: |
make make -j
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3 uses: github/codeql-action/analyze@v3