Skip to content

Commit

Permalink
[build] Remove libexport_core.so dependency for Android App CI (#6997)
Browse files Browse the repository at this point in the history
Issue: #

### Brief Summary
  • Loading branch information
jim19930609 authored Jan 3, 2023
1 parent 1fbd529 commit 7fbb7e3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 17 deletions.
28 changes: 12 additions & 16 deletions .github/workflows/scripts/aot-demo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export TAICHI_UNITY_EXAMPLE_BRANCH=main


function build-and-smoke-test-android-aot-demo {
setup-android-ndk-env

pushd taichi
GIT_COMMIT=$(git rev-parse HEAD | cut -c1-7)
setup_python
Expand All @@ -26,26 +28,20 @@ function build-and-smoke-test-android-aot-demo {

rm -rf taichi-aot-demo
# IF YOU PIN THIS TO A COMMIT/BRANCH, YOU'RE RESPONSIBLE TO REVERT IT BACK TO MASTER ONCE MERGED.
git clone --depth=1 -b "$TAICHI_AOT_DEMO_BRANCH" "$TAICHI_AOT_DEMO_URL"

APP_ROOT=taichi-aot-demo/implicit_fem
ANDROID_APP_ROOT=$APP_ROOT/android
JNI_PATH=$ANDROID_APP_ROOT/app/src/main/jniLibs/arm64-v8a/
git clone --recursive --depth=1 -b "$TAICHI_AOT_DEMO_BRANCH" "$TAICHI_AOT_DEMO_URL"

# Install taichi-python
pip install /taichi-wheel/*.whl
pushd $APP_ROOT/python
sudo chmod 0777 $HOME/.cache
python implicit_fem.py --aot
popd
mkdir -p $JNI_PATH
cp taichi/build/libtaichi_export_core.so $JNI_PATH
cd $ANDROID_APP_ROOT
sed -i "s/TaichiAOT/AOT-$GIT_COMMIT/g" app/src/main/res/values/strings.xml
./gradlew build

# Build Android Apps
cd taichi-aot-demo
./scripts/build-taichi-android.sh
./scripts/build-android.sh
./scripts/build-android-app.sh E3_implicit_fem

run-android-app \
app/build/outputs/apk/debug/app-debug.apk \
com.taichigraphics.aot_demos.implicit_fem/android.app.NativeActivity
framework/android/app/build/outputs/apk/debug/E3_implicit_fem-debug.apk \
org.taichi.aot_demo/android.app.NativeActivity
}

function prepare-unity-build-env {
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ jobs:
-DTI_WITH_LLVM:BOOL=OFF
-DTI_WITH_C_API=ON
- name: Test For Android AOT (export core)
- name: Test For Android AOT
if: ${{ needs.check_files.outputs.run_job != 'false' }}
run: |
. .github/workflows/scripts/common-utils.sh
Expand Down

0 comments on commit 7fbb7e3

Please sign in to comment.