Skip to content

Commit

Permalink
Let's try compiling for Android arm64
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongmario committed Feb 11, 2024
1 parent e05d0a6 commit dd90408
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on: push

env:
LIB_NAME: libImagineBreaker
PATH_TO_CODE_FOLDER: natives/src/main/c
CODE_FILE: zone_rong_imaginebreaker_ImagineBreaker
PATH_TO_CODE: natives/src/main/c/zone_rong_imaginebreaker_ImagineBreaker
PATH_TO_CODE_WIN: natives\src\main\c\zone_rong_imaginebreaker_ImagineBreaker

Expand Down Expand Up @@ -100,3 +102,37 @@ jobs:
name: native
path: output/

android_compile:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Make Directory
run: mkdir output

- name: Install NDK
uses: nttld/setup-ndk@v1
with:
ndk-version: r25c

- name: Create Android MakeFile
uses: DamianReeves/write-file-action@master
with:
path: ${{ env.PATH_TO_CODE_FOLDER }}/Android.mk
write-mode: overwrite
contents: |
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ImagineBreaker_android_arm64
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

- name: Upload Natives
uses: actions/upload-artifact@v3
with:
name: native
path: output/

0 comments on commit dd90408

Please sign in to comment.