Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into fix-windows-slow-shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master committed Dec 22, 2023
2 parents 5b51d90 + fff50a7 commit 31f2fb2
Show file tree
Hide file tree
Showing 82 changed files with 3,484 additions and 3,861 deletions.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Please sign (check) the below before submitting the Pull Request:

- [ ] I have signed the ntop Contributor License Agreement at https://github.com/ntop/legal/blob/main/individual-contributor-licence-agreement.md
- [ ] I have updated the documentation (in doc/) to reflect the changes made (if applicable)

Link to the related [issue](https://github.com/ntop/n2n/issues):


Describe changes:


84 changes: 60 additions & 24 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,9 @@ jobs:
--enable-natpmp \
--enable-cap \
--enable-pcap \
--with-openssl \
--with-zstd \
CFLAGS="-O3 -DN2N_OPTION_USE_PORTMAPPING"
CFLAGS="-O3"
make test
lint:
Expand Down Expand Up @@ -211,6 +212,45 @@ jobs:
- name: Upload data to codecov
uses: codecov/codecov-action@v3

test_bsd:
name: Test BSD
runs-on: ubuntu-latest
strategy:
matrix:
os:
- name: freebsd
architecture: x86-64
version: '13.2'

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Fix Checkout
run: |
git fetch --force --tags
- name: Test on ${{ matrix.os.name }}
uses: cross-platform-actions/[email protected]
with:
operating_system: ${{ matrix.os.name }}
architecture: ${{ matrix.os.architecture }}
version: ${{ matrix.os.version }}
shell: bash
memory: 5G
cpu_count: 4
run: |
sudo pkg install -y \
autoconf \
automake \
gcc \
git \
gmake \
python3
./autogen.sh
./configure
gmake all
test_macos:
name: Test MacOS
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -306,14 +346,6 @@ jobs:
run: |
git fetch --force --tags
- name: generate a makefile and use it to install more packages
run: |
# This is a pretty big hammer, but gets the windows compile moving
./scripts/hack_fakeautoconf.sh
make build-dep
shell: bash

- name: Run a configure step
run: |
export CFLAGS="-fprofile-arcs -ftest-coverage"
Expand Down Expand Up @@ -378,20 +410,21 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install debhelper build-essential \
devscripts \
crossbuild-essential-${{ matrix.arch }}
- name: Hack dpkg-shlibdeps
run: |
echo '#!/bin/bash' | sudo tee /usr/bin/dpkg-shlibdeps
- name: Configure
# The HOST_TRIPLET line is not easily foldable
# yamllint disable rule:line-length
run: |
# This will warn about CC, but we cannot set CC until we run it :-S
HOST_TRIPLET=$(dpkg-architecture -a${{ matrix.arch }} -q DEB_HOST_GNU_TYPE)
export CC=$HOST_TRIPLET-gcc
export AR=$HOST_TRIPLET-ar
./autogen.sh
./configure --host $HOST_TRIPLET
cd packages/debian/
./configure EXTN=${{ matrix.arch }}
# yamllint enable rule:line-length

- name: Build
Expand Down Expand Up @@ -598,7 +631,6 @@ jobs:
# this is a hack! it assumes the default SDK is the 'right' one
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
./autogen.sh
export CC=clang
export CFLAGS="-target ${{ matrix.arch }}"
export LDFLAGS="-target ${{ matrix.arch }}"
./configure --host=${{ matrix.arch }}
Expand Down Expand Up @@ -647,7 +679,6 @@ jobs:
# this is a hack! it assumes the default SDK is the 'right' one
export SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk
./autogen.sh
export CC=clang
export CFLAGS="-arch x86_64 -arch arm64"
export LDFLAGS="-arch x86_64 -arch arm64"
./configure
Expand All @@ -672,16 +703,23 @@ jobs:
strategy:
fail-fast: true
matrix:
arch:
- arm-linux-gnueabi
include:
- arch: arm-linux-gnueabi
- arch: aarch64-linux-gnu

# Unfortunately, the ubnuts mingw package names dont follow the
# same naming convention as every other cross-compiler.
- arch: i686-w64-mingw32
package_suffix: mingw-w64-i686
- arch: x86_64-w64-mingw32
package_suffix: mingw-w64-x86-64

# I assume these architectures produce working code, but this has
# not been directly confirmed.
# They are compiled dynamically against normal libc, so will not
# work on openwrt.
- aarch64-linux-gnu
- mips-linux-gnu
- mipsel-linux-gnu
- arch: mips-linux-gnu
- arch: mipsel-linux-gnu

steps:
- uses: actions/checkout@v3
Expand All @@ -696,15 +734,13 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install \
binutils-${{ matrix.arch }} \
gcc-${{ matrix.arch }}
binutils-${{ matrix.package_suffix || matrix.arch }} \
gcc-${{ matrix.package_suffix || matrix.arch }}
- name: Configure and Build
shell: bash
run: |
./autogen.sh
export CC=${{ matrix.arch }}-gcc
export AR=${{ matrix.arch }}-ar
./configure --host ${{ matrix.arch }}
make
Expand Down
8 changes: 0 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ config.rpath
config.status
include/config.h
include/config.h.in
tools/config.mak
autom4te.cache
edge
example_edge_embed_quick_edge_init
Expand All @@ -25,14 +24,7 @@ build
.idea
.vscode
.vs
packages/debian/debian/changelog
packages/debian/debian/control
packages/debian/debian/files
packages/debian/debian/rules
packages/etc/systemd/system/[email protected]
packages/etc/systemd/system/edge.service
packages/etc/systemd/system/[email protected]
packages/etc/systemd/system/supernode.service
*dSYM*

__pycache__
Expand Down
Loading

0 comments on commit 31f2fb2

Please sign in to comment.