summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build-openwrt.yml70
-rw-r--r--.github/workflows/build.yml2
-rw-r--r--nDPId-test.c5
-rw-r--r--packages/openwrt/net/nDPId-testing/001-enable-in-source-build.patch (renamed from packages/openwrt/net/nDPId-testing/patches/001-enable-in-source-build.patch)0
-rw-r--r--packages/openwrt/net/nDPId-testing/Makefile14
5 files changed, 85 insertions, 6 deletions
diff --git a/.github/workflows/build-openwrt.yml b/.github/workflows/build-openwrt.yml
new file mode 100644
index 000000000..a202eefa7
--- /dev/null
+++ b/.github/workflows/build-openwrt.yml
@@ -0,0 +1,70 @@
+name: OpenWrt Build
+
+on:
+ push:
+ branches:
+ - main
+ - tmp
+ pull_request:
+ branches:
+ - master
+ types: [opened, synchronize, reopened]
+ release:
+ types: [created]
+
+jobs:
+ build:
+ name: ${{ matrix.arch }} build
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ include:
+ - arch: arc_archs
+ target: archs38-generic
+
+ - arch: arm_cortex-a9_vfpv3-d16
+ target: mvebu-cortexa9
+
+ - arch: mips_24kc
+ target: ath79-generic
+
+ - arch: mipsel_24kc
+ target: mt7621
+
+ - arch: powerpc_464fp
+ target: apm821xx-nand
+
+ - arch: powerpc_8540
+ target: mpc85xx-p1010
+
+ - arch: aarch64_cortex-a53
+ target: mvebu-cortexa53
+
+ - arch: arm_cortex-a15_neon-vfpv4
+ target: armvirt-32
+
+ - arch: i386_pentium-mmx
+ target: x86-geode
+
+ - arch: x86_64
+ target: x86-64
+
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ fetch-depth: 0
+
+ - name: Build
+ uses: openwrt/gh-action-sdk@master
+ env:
+ ARCH: ${{ matrix.arch }}
+ FEED_DIR: ${{ github.workspace }}/packages/openwrt
+ FEEDNAME: ndpid_openwrt_packages_ci
+ PACKAGES: nDPId-testing
+
+ - name: Store packages
+ uses: actions/upload-artifact@v2
+ with:
+ name: ${{ matrix.arch}}-packages
+ path: bin/packages/${{ matrix.arch }}/packages/*.ipk
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 6e10d680c..af65f4c9f 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,4 +1,5 @@
name: Build
+
on:
push:
branches:
@@ -10,6 +11,7 @@ on:
types: [opened, synchronize, reopened]
release:
types: [created]
+
jobs:
test:
name: ${{ matrix.os }} ${{ matrix.gcrypt }}
diff --git a/nDPId-test.c b/nDPId-test.c
index 93d3080ea..dd5b5091d 100644
--- a/nDPId-test.c
+++ b/nDPId-test.c
@@ -657,9 +657,9 @@ static void * distributor_client_mainloop_thread(void * const arg)
break;
case READ_LAST_ENUM_VALUE:
case READ_ERROR:
+ case READ_TIMEOUT:
logger(1, "Read and verify fd returned an error: %s", strerror(errno));
THREAD_ERROR_GOTO(trv);
- case READ_TIMEOUT:
case READ_PEER_DISCONNECT:
del_event(dis_epollfd, mock_testfds[PIPE_TEST_READ]);
pipe_read_finished = 1;
@@ -762,9 +762,8 @@ static void * distributor_client_mainloop_thread(void * const arg)
{
HASH_ITER(hh, current_instance->flow_table, current_flow, ftmp)
{
- logger(1, "Active flow found during client distributor shutdown: %llu", current_flow->id_as_ull);
+ logger(1, "Active flow found during client distributor shutdown with id: %llu", current_flow->id_as_ull);
THREAD_ERROR(trv);
- break;
}
nDPIsrvd_cleanup_instance(mock_sock, current_instance, CLEANUP_REASON_APP_SHUTDOWN);
diff --git a/packages/openwrt/net/nDPId-testing/patches/001-enable-in-source-build.patch b/packages/openwrt/net/nDPId-testing/001-enable-in-source-build.patch
index 86432dc57..86432dc57 100644
--- a/packages/openwrt/net/nDPId-testing/patches/001-enable-in-source-build.patch
+++ b/packages/openwrt/net/nDPId-testing/001-enable-in-source-build.patch
diff --git a/packages/openwrt/net/nDPId-testing/Makefile b/packages/openwrt/net/nDPId-testing/Makefile
index 8ab38193b..fcb0a491e 100644
--- a/packages/openwrt/net/nDPId-testing/Makefile
+++ b/packages/openwrt/net/nDPId-testing/Makefile
@@ -4,7 +4,11 @@ PKG_NAME:=nDPId-testing
PKG_VERSION:=1.0
PKG_RELEASE:=$(AUTORELEASE)
-SOURCE_DIR:=../../../..
+ifneq ($(wildcard /artifacts),)
+PKG_DIRECTORY:=/artifacts
+else
+PKG_DIRECTORY:=../../../..
+endif
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
@@ -61,6 +65,9 @@ endef
endif
define Build/Prepare
+ @echo 'tar: $(DL_DIR)/$(PKG_SOURCE)'
+ @echo 'PKG_DIRECTORY=$(PKG_DIRECTORY)'
+ @echo 'PKG_SOURCE_SUBDIR=$(PKG_SOURCE_SUBDIR)'
tar \
--exclude-tag-all='gcov.css' \
--exclude-tag-all='cmake_install.cmake' \
@@ -71,9 +78,10 @@ define Build/Prepare
--exclude-vcs \
--exclude-vcs-ignores \
--transform 's,^,$(PKG_SOURCE_SUBDIR)/,' \
- -czf "$(DL_DIR)/$(PKG_SOURCE)" "$(SOURCE_DIR)"
+ -czf "$(DL_DIR)/$(PKG_SOURCE)" -C "$(PKG_DIRECTORY)" .
+ tar -tzf "$(DL_DIR)/$(PKG_SOURCE)"
$(PKG_UNPACK)
- $(Build/Patch)
+ cd '$(PKG_BUILD_DIR)' && patch -p1 < $(PKG_BUILD_DIR)/packages/openwrt/net/nDPId-testing/001-enable-in-source-build.patch
env \
CC="$(TARGET_CC)" \
AR="$(TARGET_AR)" \