mirror of
				https://github.com/optim-enterprises-bv/nDPId.git
				synced 2025-10-31 02:07:47 +00:00 
			
		
		
		
	Add OpenWrt CI via Github Actions.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
		
							
								
								
									
										70
									
								
								.github/workflows/build-openwrt.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										70
									
								
								.github/workflows/build-openwrt.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -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 | ||||||
							
								
								
									
										2
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
								
							| @@ -1,4 +1,5 @@ | |||||||
| name: Build | name: Build | ||||||
|  |  | ||||||
| on: | on: | ||||||
|   push: |   push: | ||||||
|     branches: |     branches: | ||||||
| @@ -10,6 +11,7 @@ on: | |||||||
|     types: [opened, synchronize, reopened] |     types: [opened, synchronize, reopened] | ||||||
|   release: |   release: | ||||||
|     types: [created] |     types: [created] | ||||||
|  |  | ||||||
| jobs: | jobs: | ||||||
|   test: |   test: | ||||||
|     name: ${{ matrix.os }} ${{ matrix.gcrypt }} |     name: ${{ matrix.os }} ${{ matrix.gcrypt }} | ||||||
|   | |||||||
| @@ -657,9 +657,9 @@ static void * distributor_client_mainloop_thread(void * const arg) | |||||||
|                         break; |                         break; | ||||||
|                     case READ_LAST_ENUM_VALUE: |                     case READ_LAST_ENUM_VALUE: | ||||||
|                     case READ_ERROR: |                     case READ_ERROR: | ||||||
|  |                     case READ_TIMEOUT: | ||||||
|                         logger(1, "Read and verify fd returned an error: %s", strerror(errno)); |                         logger(1, "Read and verify fd returned an error: %s", strerror(errno)); | ||||||
|                         THREAD_ERROR_GOTO(trv); |                         THREAD_ERROR_GOTO(trv); | ||||||
|                     case READ_TIMEOUT: |  | ||||||
|                     case READ_PEER_DISCONNECT: |                     case READ_PEER_DISCONNECT: | ||||||
|                         del_event(dis_epollfd, mock_testfds[PIPE_TEST_READ]); |                         del_event(dis_epollfd, mock_testfds[PIPE_TEST_READ]); | ||||||
|                         pipe_read_finished = 1; |                         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) |         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); |             THREAD_ERROR(trv); | ||||||
|             break; |  | ||||||
|         } |         } | ||||||
|  |  | ||||||
|         nDPIsrvd_cleanup_instance(mock_sock, current_instance, CLEANUP_REASON_APP_SHUTDOWN); |         nDPIsrvd_cleanup_instance(mock_sock, current_instance, CLEANUP_REASON_APP_SHUTDOWN); | ||||||
|   | |||||||
| @@ -4,7 +4,11 @@ PKG_NAME:=nDPId-testing | |||||||
| PKG_VERSION:=1.0 | PKG_VERSION:=1.0 | ||||||
| PKG_RELEASE:=$(AUTORELEASE) | 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:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||||||
| PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) | ||||||
|  |  | ||||||
| @@ -61,6 +65,9 @@ endef | |||||||
| endif | endif | ||||||
|  |  | ||||||
| define Build/Prepare | define Build/Prepare | ||||||
|  | 	@echo 'tar: $(DL_DIR)/$(PKG_SOURCE)' | ||||||
|  | 	@echo 'PKG_DIRECTORY=$(PKG_DIRECTORY)' | ||||||
|  | 	@echo 'PKG_SOURCE_SUBDIR=$(PKG_SOURCE_SUBDIR)' | ||||||
| 	tar \ | 	tar \ | ||||||
| 		--exclude-tag-all='gcov.css' \ | 		--exclude-tag-all='gcov.css' \ | ||||||
| 		--exclude-tag-all='cmake_install.cmake' \ | 		--exclude-tag-all='cmake_install.cmake' \ | ||||||
| @@ -71,9 +78,10 @@ define Build/Prepare | |||||||
| 		--exclude-vcs \ | 		--exclude-vcs \ | ||||||
| 		--exclude-vcs-ignores \ | 		--exclude-vcs-ignores \ | ||||||
| 		--transform 's,^,$(PKG_SOURCE_SUBDIR)/,' \ | 		--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) | 	$(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 \ | 	env \ | ||||||
| 		CC="$(TARGET_CC)" \ | 		CC="$(TARGET_CC)" \ | ||||||
| 		AR="$(TARGET_AR)" \ | 		AR="$(TARGET_AR)" \ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Toni Uhlig
					Toni Uhlig