From 7fbb7e34ed598c94a9bb826134aa815b6298e48f Mon Sep 17 00:00:00 2001 From: Zhanlue Yang Date: Tue, 3 Jan 2023 14:04:16 +0800 Subject: [PATCH] [build] Remove libexport_core.so dependency for Android App CI (#6997) Issue: # ### Brief Summary --- .github/workflows/scripts/aot-demo.sh | 28 ++++++++++++--------------- .github/workflows/testing.yml | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/scripts/aot-demo.sh b/.github/workflows/scripts/aot-demo.sh index 6b20e58cff1ba..b887f80713916 100755 --- a/.github/workflows/scripts/aot-demo.sh +++ b/.github/workflows/scripts/aot-demo.sh @@ -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 @@ -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 { diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 1025f1d117a39..db60e112e5a1b 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -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