From 994141bea389175232f9e64c19444b022715e810 Mon Sep 17 00:00:00 2001 From: Rongmario Date: Sun, 11 Feb 2024 02:08:57 +0000 Subject: [PATCH] Support android arm/arm64/x86/x64 + change path to upload natives --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8ea593..baca9fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -103,6 +103,9 @@ jobs: path: output/ android_compile: + strategy: + matrix: + arch: [[armeabi-v7a, arm], [arm64-v8a, arm64], [x86, x86], [x86_64, x64]] runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -124,15 +127,15 @@ jobs: contents: | LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) - LOCAL_MODULE := ImagineBreaker_android_arm64 + LOCAL_MODULE := ImagineBreaker_android_${{ env.matrix.arch[1] }} LOCAL_SRC_FILES := ${{ env.CODE_FILE }}.c include $(BUILD_SHARED_LIBRARY) - name: Compile and Link - run: cd ${{ env.PATH_TO_CODE_FOLDER }} && ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_PLATFORM=android-21 APP_ABI=arm64-v8a + run: cd ${{ env.PATH_TO_CODE_FOLDER }} && ndk-build NDK_PROJECT_PATH=. APP_BUILD_SCRIPT=Android.mk APP_PLATFORM=android-21 APP_ABI=${{ env.matrix.arch[0] }} - name: Upload Natives uses: actions/upload-artifact@v3 with: name: native - path: output/ + path: src/main/cpp/libs/arm64-v8a