From 65d246f2a31e89b535ba738ed1e6f8f2718c619a Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Mon, 12 Jul 2021 19:22:33 +0200 Subject: [PATCH 1/8] setup github actions workflow --- .github/workflows/c-cpp.yml | 33 +++++++++++++++++++++++++++++++++ .travis.yml | 35 ----------------------------------- 2 files changed, 33 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/c-cpp.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..083465e --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,33 @@ +name: C/C++ CI + +on: + push: + branches: '*' + pull_request: + branches: '*' + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get -y install git build-essential autoconf libtool libpcap-dev pkg-config libxml2-dev gawk libcurl4-openssl-dev libxml2-dev libyaml-dev make python3 python3-dev python3-pip python3-setuptools libxml2-dev libxml2 libpcap0.8-dev libpcap0.8 libidn2-0-dev + ( cd /tmp; wget -qO - http://libnf.net/packages/libnf-1.25.tar.gz | tar -xzf - && cd libnf-1.25 && ./configure -q && sudo make -j3 install; ) + - name: init repository + run: git submodule init; git submodule update + - name: autoreconf + run: autoreconf -i + - name: configure + run: ./configure --enable-repobuild + - name: make + run: make -j10 + - name: make check + run: make check + - name: make distcheck + run: make distcheck + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 2890fa3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,35 +0,0 @@ -language: c -compiler: - - gcc -os: - - linux - -branches: - only: - - master - -addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - gcc-multilib - - gcc - - g++ - - autoconf - - pkg-config - - make - - automake - - libxml2-dev - - libxml2 - - libpcap0.8-dev - - libpcap0.8 - - libidn2-0-dev - -before_install: - - ( wget -qO - http://libnf.net/packages/libnf-1.25.tar.gz | tar -xzf - && cd libnf-1.25 && ./configure -q && sudo make -j3 install; ) - -script: - - git submodule init; git submodule update - - ./bootstrap.sh && ./configure --enable-repobuild && make clean && make -j5 - From 8e81f92d61f9ece88f5d281dc61bcb2ad319cc94 Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Mon, 12 Jul 2021 19:23:05 +0200 Subject: [PATCH 2/8] update submodules --- detectors | 2 +- modules | 2 +- nemea-framework | 2 +- nemea-supervisor | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/detectors b/detectors index f0c539f..8da9197 160000 --- a/detectors +++ b/detectors @@ -1 +1 @@ -Subproject commit f0c539f31728c354b5c30c16cbb456e290685540 +Subproject commit 8da919746d3a1b9c993996007c13272d960ade6b diff --git a/modules b/modules index cf5b717..c087d9a 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit cf5b717a8aa587d8b45c2853d67feecce2a459bc +Subproject commit c087d9a63f8feb0023e9f6400400450d2474f725 diff --git a/nemea-framework b/nemea-framework index 6a47066..8b21855 160000 --- a/nemea-framework +++ b/nemea-framework @@ -1 +1 @@ -Subproject commit 6a470665d6db82a47db72dd5f0decf5a9a949b08 +Subproject commit 8b218558b62d6e3d7e921ab9175eb3bed8c2bb24 diff --git a/nemea-supervisor b/nemea-supervisor index 95b8a65..76ef020 160000 --- a/nemea-supervisor +++ b/nemea-supervisor @@ -1 +1 @@ -Subproject commit 95b8a653a6244dd148734baf30ba1897731d06fc +Subproject commit 76ef02097724974bb3630f6c6ae0562696306ef3 From cd513359cb7552e9bbe42bdc564b4ca8988e99bd Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Thu, 15 Jul 2021 15:17:41 +0200 Subject: [PATCH 3/8] update nemea-framework - fixed tls test in libtrap --- nemea-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nemea-framework b/nemea-framework index 8b21855..34219c9 160000 --- a/nemea-framework +++ b/nemea-framework @@ -1 +1 @@ -Subproject commit 8b218558b62d6e3d7e921ab9175eb3bed8c2bb24 +Subproject commit 34219c9a0db3dbab1d8e4de072a2d641f160002b From d29127704900b0d4daed8b910c54d8d81b50225e Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Sun, 18 Jul 2021 00:04:38 +0200 Subject: [PATCH 4/8] ghactions: install framework components before checks --- .github/workflows/c-cpp.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 083465e..e34f429 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -16,16 +16,18 @@ jobs: - name: Install dependencies run: | sudo apt-get update - sudo apt-get -y install git build-essential autoconf libtool libpcap-dev pkg-config libxml2-dev gawk libcurl4-openssl-dev libxml2-dev libyaml-dev make python3 python3-dev python3-pip python3-setuptools libxml2-dev libxml2 libpcap0.8-dev libpcap0.8 libidn2-0-dev + sudo apt-get -y install git wget build-essential autoconf libtool libpcap-dev pkg-config libxml2-dev gawk libcurl4-openssl-dev libxml2-dev libyaml-dev make python3 python3-dev python3-pip python3-setuptools libxml2-dev libxml2 libpcap0.8-dev libpcap0.8 libidn2-0-dev ( cd /tmp; wget -qO - http://libnf.net/packages/libnf-1.25.tar.gz | tar -xzf - && cd libnf-1.25 && ./configure -q && sudo make -j3 install; ) - name: init repository run: git submodule init; git submodule update - name: autoreconf run: autoreconf -i - name: configure - run: ./configure --enable-repobuild + run: ./configure --enable-repobuild --prefix=/usr --bindir=/usr/bin/nemea/ - name: make - run: make -j10 + run: make -j10 install + - name: Install python components + run: ( cd nemea-framework/pytrap; python3 setup.py install; cd ../pycommon; python3 setup.py install; ) - name: make check run: make check - name: make distcheck From 5138f3bb8939e979881fcd61eb0bd8ccf2879ebf Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Sun, 18 Jul 2021 00:10:14 +0200 Subject: [PATCH 5/8] ghactions: installation with sudo --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index e34f429..81d03a9 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -25,9 +25,9 @@ jobs: - name: configure run: ./configure --enable-repobuild --prefix=/usr --bindir=/usr/bin/nemea/ - name: make - run: make -j10 install + run: make -j10; sudo make install - name: Install python components - run: ( cd nemea-framework/pytrap; python3 setup.py install; cd ../pycommon; python3 setup.py install; ) + run: ( cd nemea-framework/pytrap; sudo python3 setup.py install; cd ../pycommon; sudo python3 setup.py install; ) - name: make check run: make check - name: make distcheck From f699e7a401b906ba1e457ae1e47ada881b4576c5 Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Sun, 18 Jul 2021 00:34:26 +0200 Subject: [PATCH 6/8] ghactions: ldconfig and log for debug --- .github/workflows/c-cpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 81d03a9..a17ce6a 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -25,11 +25,11 @@ jobs: - name: configure run: ./configure --enable-repobuild --prefix=/usr --bindir=/usr/bin/nemea/ - name: make - run: make -j10; sudo make install + run: make -j10; sudo make install; sudo ldconfig - name: Install python components run: ( cd nemea-framework/pytrap; sudo python3 setup.py install; cd ../pycommon; sudo python3 setup.py install; ) - name: make check - run: make check + run: make check || find -name '*.sh.log' -exec cat {} + - name: make distcheck run: make distcheck From 509c94f562f3cb57f6015231492a574eaff258c1 Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Sun, 18 Jul 2021 01:04:40 +0200 Subject: [PATCH 7/8] ghactions: init submodule in modules --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index a17ce6a..1c90419 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -19,7 +19,7 @@ jobs: sudo apt-get -y install git wget build-essential autoconf libtool libpcap-dev pkg-config libxml2-dev gawk libcurl4-openssl-dev libxml2-dev libyaml-dev make python3 python3-dev python3-pip python3-setuptools libxml2-dev libxml2 libpcap0.8-dev libpcap0.8 libidn2-0-dev ( cd /tmp; wget -qO - http://libnf.net/packages/libnf-1.25.tar.gz | tar -xzf - && cd libnf-1.25 && ./configure -q && sudo make -j3 install; ) - name: init repository - run: git submodule init; git submodule update + run: ( git submodule init; git submodule update --recursive; cd modules; git submodule init; git submodule update --recursive; ) - name: autoreconf run: autoreconf -i - name: configure From 47c3d4ceb4a10b5e5428ee7c58a9e36dd52df91a Mon Sep 17 00:00:00 2001 From: Tomas Cejka Date: Sun, 18 Jul 2021 01:15:28 +0200 Subject: [PATCH 8/8] ghactions: remove distcheck --- .github/workflows/c-cpp.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 1c90419..57c1021 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -30,6 +30,4 @@ jobs: run: ( cd nemea-framework/pytrap; sudo python3 setup.py install; cd ../pycommon; sudo python3 setup.py install; ) - name: make check run: make check || find -name '*.sh.log' -exec cat {} + - - name: make distcheck - run: make distcheck