From 333455ae73d5d678eaa171f3faa597f7c8947089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Wed, 17 Apr 2024 18:01:32 +0900 Subject: [PATCH] feat: add more arch --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 3 ++- Makefile | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 9327ca6..df495f3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,7 +22,7 @@ jobs: uses: nttld/setup-ndk@v1 id: setup-ndk with: - ndk-version: r26d + ndk-version: r16b - name: Setup Go Environment uses: actions/setup-go@master diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b10c83a..3a0dfd8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,7 +14,7 @@ jobs: uses: nttld/setup-ndk@v1 id: setup-ndk with: - ndk-version: r26d + ndk-version: r16b - name: Setup Go Environment uses: actions/setup-go@master @@ -28,6 +28,7 @@ jobs: BUILD_MACHINE: linux run: | echo NDK path is $NDK_HOME + ll $NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin make -e - name: Build and Run Tests diff --git a/Makefile b/Makefile index 5119d00..8401b3e 100644 --- a/Makefile +++ b/Makefile @@ -21,9 +21,12 @@ TEST_EXPECTED := '{"code":200,' all: @BUILD_PATH=$(BUILD_PATH)/aarch64 TARGET_ARCH=aarch64 GOARCH=arm64 $(MAKE) -e shared - @BUILD_PATH=$(BUILD_PATH)/armv7a TARGET_ARCH=armv7a GOARCH=arm TARGET_SDK=androideabi23 $(MAKE) -e shared + @BUILD_PATH=$(BUILD_PATH)/armv7a TARGET_ARCH=armv7a GOARCH=arm GOARM=7 TARGET_SDK=androideabi23 $(MAKE) -e shared + @BUILD_PATH=$(BUILD_PATH)/arm TARGET_ARCH=arm GOARCH=arm GOARM=5 TARGET_SDK=androideabi23 $(MAKE) -e shared @BUILD_PATH=$(BUILD_PATH)/i686 TARGET_ARCH=i686 GOARCH=amd64 $(MAKE) -e shared @BUILD_PATH=$(BUILD_PATH)/x86_64 TARGET_ARCH=x86_64 GOARCH=386 $(MAKE) -e shared + @BUILD_PATH=$(BUILD_PATH)/mips TARGET_ARCH=mips GOOS=linux GOARCH=mipsel GOMIPS=softfloat $(MAKE) -e shared + @BUILD_PATH=$(BUILD_PATH)/mips64 TARGET_ARCH=mips64 GOOS=linux GOARCH=mips64el $(MAKE) -e shared rm -rf $(BUILD_PATH)/*/*.h cd $(BUILD_PATH) && gzip -9 -k aarch64/* armv7a/* i686/* x86_64/* find $(BUILD_PATH) -mindepth 1 -maxdepth 1 -type d -exec mv {}/lib$(PROJECT_NAME).so.gz {}_lib$(PROJECT_NAME).so.gz \;; \