From 27f47a94fc212382aebddc62db187a9f187d1743 Mon Sep 17 00:00:00 2001 From: Proton Date: Wed, 13 Jul 2022 16:15:26 +0800 Subject: [PATCH 1/2] [ci] Build & Test taichi-aot-demo & Taichi-UnityExample --- .github/workflows/release.yml | 2 + .github/workflows/scripts/android-build.sh | 24 ++++ .github/workflows/scripts/aot-demo.sh | 86 ++++++++++++ .github/workflows/scripts/libcommon.sh | 144 +++++++++++++++++++++ .github/workflows/scripts/unix_build.sh | 45 +------ .github/workflows/scripts/unix_test.sh | 11 +- .github/workflows/testing.yml | 78 +++++++++++ .gitignore | 1 + ci/Dockerfile.android-sdk.18.04 | 24 ++++ 9 files changed, 362 insertions(+), 53 deletions(-) create mode 100755 .github/workflows/scripts/android-build.sh create mode 100755 .github/workflows/scripts/aot-demo.sh create mode 100644 .github/workflows/scripts/libcommon.sh create mode 100644 ci/Dockerfile.android-sdk.18.04 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c65f268c956b3..d60c11c60fc61 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -113,6 +113,7 @@ jobs: -e DISPLAY -e PY -e GPU_TEST registry.taichigraphics.com/taichidev-ubuntu18.04:v0.3.0 \ /home/dev/unix_test.sh docker cp .github/workflows/scripts/unix_test.sh taichi_test:/home/dev/unix_test.sh + docker cp .github/workflows/scripts/libcommon.sh taichi_test:/home/dev/libcommon.sh docker cp ./requirements_test.txt taichi_test:/home/dev/requirements_test.txt docker cp shared/dist/ taichi_test:/home/dev/ docker cp shared/build/ taichi_test:/home/dev/ @@ -179,6 +180,7 @@ jobs: -e PY -e GPU_TEST registry.taichigraphics.com/taichidev-manylinux2014-cuda:v0.0.0 \ /home/dev/unix_test.sh docker cp .github/workflows/scripts/unix_test.sh taichi_test:/home/dev/unix_test.sh + docker cp .github/workflows/scripts/libcommon.sh taichi_test:/home/dev/libcommon.sh docker cp ./requirements_test.txt taichi_test:/home/dev/requirements_test.txt docker cp shared/dist/ taichi_test:/home/dev/ docker cp shared/build/ taichi_test:/home/dev/ diff --git a/.github/workflows/scripts/android-build.sh b/.github/workflows/scripts/android-build.sh new file mode 100755 index 0000000000000..ae07847874ce3 --- /dev/null +++ b/.github/workflows/scripts/android-build.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -ex + +export TI_SKIP_VERSION_CHECK=ON +export TI_CI=1 + +. $(dirname $0)/libcommon.sh + +cd taichi + +export TAICHI_CMAKE_ARGS="$TAICHI_CMAKE_ARGS -DTI_WITH_LLVM=OFF -DTI_WITH_C_API:BOOL=ON" + +setup-sccache-local +setup_python +setup-android-ndk-env + +python setup.py clean +python3 setup.py build_ext +cd build +aarch64-linux-android-strip libtaichi_export_core.so +aarch64-linux-android-strip libtaichi_c_api.so +rm -f python/CHANGELOG.md + +chmod -R 777 "$SCCACHE_DIR" diff --git a/.github/workflows/scripts/aot-demo.sh b/.github/workflows/scripts/aot-demo.sh new file mode 100755 index 0000000000000..073127e753a0e --- /dev/null +++ b/.github/workflows/scripts/aot-demo.sh @@ -0,0 +1,86 @@ +#!/bin/bash +set -ex + +export TI_SKIP_VERSION_CHECK=ON +export TI_CI=1 + +. $(dirname $0)/libcommon.sh + + +function build-and-smoke-test-android-aot-demo { + pushd taichi + GIT_COMMIT=$(git rev-parse HEAD | cut -c1-7) + popd + + export TAICHI_REPO_DIR=$(pwd)/taichi + + git clone https://github.com/taichi-dev/taichi-aot-demo + APP_ROOT=taichi-aot-demo/implicit_fem + ANDROID_APP_ROOT=$APP_ROOT/android + JNI_PATH=$ANDROID_APP_ROOT/app/src/main/jniLibs/arm64-v8a/ + + # cd $APP_ROOT/python + # python3 implicit_fem.py --aot + + 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 + + run-android-app \ + app/build/outputs/apk/debug/app-debug.apk \ + com.taichigraphics.aot_demos.implicit_fem/android.app.NativeActivity +} + +function prepare-unity-build-env { + cd taichi + + # Dependencies + git clone --reference-if-able /var/lib/git-cache https://github.com/taichi-dev/Taichi-UnityExample + + python misc/generate_unity_language_binding.py + cp c_api/unity/*.cs Taichi-UnityExample/Assets/Taichi/Generated + cp build/libtaichi_c_api.so Taichi-UnityExample/Assets/Plugins/Android + + export TAICHI_REPO_DIR=$(pwd) + + setup-android-ndk-env + git clone --reference-if-able /var/lib/git-cache https://github.com/taichi-dev/taichi-unity2 + mkdir tu2-build + pushd tu2-build + cmake ../taichi-unity2 -DTAICHI_C_API_INSTALL_DIR=$TAICHI_REPO_DIR/_skbuild/linux-x86_64-3.9/cmake-install/c_api $ANDROID_CMAKE_ARGS + cmake --build . + popd + cp tu2-build/bin/libtaichi_unity.so Taichi-UnityExample/Assets/Plugins/Android +} + +function build-unity-demo { + cd taichi + mkdir -p Taichi-UnityExample/Assets/Editor + cp -a /UnityBuilderAction Taichi-UnityExample/Assets/Editor/ + unity-editor \ + -logfile /dev/stdout \ + -quit \ + -customBuildName Android \ + -projectPath Taichi-UnityExample \ + -buildTarget Android \ + -customBuildTarget Android \ + -customBuildPath build/Android/Android.apk \ + -executeMethod UnityBuilderAction.Builder.BuildProject \ + -buildVersion 1.0.0-ci \ + -androidVersionCode 1000000 \ + -androidKeystoreName ~/.android/debug.keystore \ + -androidKeystorePass android \ + -androidKeyaliasName androiddebugkey \ + -androidKeyaliasPass android +} + +function smoke-test-unity-demo { + run-android-app \ + taichi/Taichi-UnityExample/build/Android/Android.apk \ + com.TaichiGraphics.TaichiUnityExample/com.unity3d.player.UnityPlayerActivity \ + 6 +} + +$1 diff --git a/.github/workflows/scripts/libcommon.sh b/.github/workflows/scripts/libcommon.sh new file mode 100644 index 0000000000000..2190c52aefc96 --- /dev/null +++ b/.github/workflows/scripts/libcommon.sh @@ -0,0 +1,144 @@ +#!/bin/bash + +check_in_docker() { + # This is a temporary solution to detect in a docker, but it should work + if [[ $(whoami) == "dev" ]]; then + echo "true" + else + echo "false" + fi +} + +setup_sccache() { + export SCCACHE_DIR=$(pwd)/sccache_cache + export SCCACHE_CACHE_SIZE="128M" + export SCCACHE_LOG=error + export SCCACHE_ERROR_LOG=$(pwd)/sccache_error.log + mkdir -p "$SCCACHE_DIR" + echo "sccache dir: $SCCACHE_DIR" + ls -la "$SCCACHE_DIR" + + if [[ $OSTYPE == "linux-"* ]]; then + wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz + tar -xzf sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz + chmod +x sccache-v0.2.15-x86_64-unknown-linux-musl/sccache + export PATH=$(pwd)/sccache-v0.2.15-x86_64-unknown-linux-musl:$PATH + elif [[ $(uname -m) == "arm64" ]]; then + wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-aarch64-apple-darwin.tar.gz + tar -xzf sccache-v0.2.15-aarch64-apple-darwin.tar.gz + chmod +x sccache-v0.2.15-aarch64-apple-darwin/sccache + export PATH=$(pwd)/sccache-v0.2.15-aarch64-apple-darwin:$PATH + else + wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-apple-darwin.tar.gz + tar -xzf sccache-v0.2.15-x86_64-apple-darwin.tar.gz + chmod +x sccache-v0.2.15-x86_64-apple-darwin/sccache + export PATH=$(pwd)/sccache-v0.2.15-x86_64-apple-darwin:$PATH + fi +} + +setup_python() { + if [[ "$IN_DOCKER" == "true" ]]; then + source $HOME/miniconda/etc/profile.d/conda.sh + conda activate "$PY" + fi + python3 -m pip uninstall taichi taichi-nightly -y + python3 -m pip install -r requirements_dev.txt +} + +function setup-sccache-local { + if [ -z $SCCACHE_ROOT ]; then + echo "Skipping sccache setup since SCCACHE_ROOT is not set" + return + fi + + mkdir -p $SCCACHE_ROOT/{bin,cache} + + export SCCACHE_DIR=$SCCACHE_ROOT/cache + export SCCACHE_CACHE_SIZE="10G" + export SCCACHE_LOG=error + export SCCACHE_ERROR_LOG=$SCCACHE_ROOT/sccache_error.log + + echo "SCCACHE_ROOT: $SCCACHE_ROOT" + + if [ ! -x $SCCACHE_ROOT/bin/sccache ]; then + if [[ $OSTYPE == "linux-"* ]]; then + wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz + tar -xzf sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz + mv sccache-v0.2.15-x86_64-unknown-linux-musl/* $SCCACHE_ROOT/bin + elif [[ $(uname -m) == "arm64" ]]; then + wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-aarch64-apple-darwin.tar.gz + tar -xzf sccache-v0.2.15-aarch64-apple-darwin.tar.gz + mv sccache-v0.2.15-aarch64-apple-darwin/* $SCCACHE_ROOT/bin + else + wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-apple-darwin.tar.gz + tar -xzf sccache-v0.2.15-x86_64-apple-darwin.tar.gz + mv sccache-v0.2.15-x86_64-apple-darwin/* $SCCACHE_ROOT/bin + fi + chmod +x $SCCACHE_ROOT/bin/sccache + fi + + export PATH=$SCCACHE_ROOT/bin:$PATH + export TAICHI_CMAKE_ARGS="$TAICHI_CMAKE_ARGS -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache" +} + +function setup-android-ndk-env { + export ANDROID_NDK_ROOT=/android-sdk/ndk-bundle + export ANDROID_CMAKE_ARGS="-DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_ROOT}/build/cmake/android.toolchain.cmake -DANDROID_NATIVE_API_LEVEL=29 -DANDROID_ABI=arm64-v8a" + export TAICHI_CMAKE_ARGS="$TAICHI_CMAKE_ARGS $ANDROID_CMAKE_ARGS" + export PATH=$ANDROID_NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/bin:$PATH +} + +function grab-android-bot { + if [ -z "$REDIS_HOST" ]; then + echo "REDIS_HOST is not set" + exit 1 + fi + + export BOT_LOCK_COOKIE=$(cat /proc/sys/kernel/random/uuid) + while true; do + for bot in $(redis-cli -h $REDIS_HOST --raw lrange android-bots 0 -1); do + export BOT_LOCK_KEY="android-bot-lock:$bot" + LOCKED=$(redis-cli -h $REDIS_HOST --raw setnx $BOT_LOCK_KEY $BOT_LOCK_COOKIE) + if [ $LOCKED -eq 1 ]; then + redis-cli -h $REDIS_HOST --raw expire android-bot-lock:$bot 300 > /dev/null + break + fi + done + + if [ "$LOCKED" == "1" ]; then + export BOT=$bot + break + fi + + echo "No bots available, retrying..." + sleep 1 + done +} + +function release-android-bot { + if [ $(redis-cli -h $REDIS_HOST --raw get $BOT_LOCK_KEY) == $BOT_LOCK_COOKIE ]; then + redis-cli -h $REDIS_HOST --raw del $BOT_LOCK_KEY + fi +} + +function run-android-app { + APK=$1 + ACTIVITY=$2 + WAIT_TIME=${3:-5} + grab-android-bot + /android-sdk/platform-tools/adb connect $BOT + /android-sdk/platform-tools/adb devices + /android-sdk/platform-tools/adb install $APK + sleep 1 + /android-sdk/platform-tools/adb logcat -c + /android-sdk/platform-tools/adb shell am start $ACTIVITY + sleep $WAIT_TIME + /android-sdk/platform-tools/adb logcat -d -v time 'CRASH:E *:F' | tee logcat.log + /android-sdk/platform-tools/adb shell am force-stop $(echo $ACTIVITY | sed 's#/.*$##g') + /android-sdk/platform-tools/adb disconnect + release-android-bot + if [ -s logcat.log ]; then + echo "!!!!!!!!!!!!!! Something is wrong !!!!!!!!!!!!!!" + exit 1 + fi +} diff --git a/.github/workflows/scripts/unix_build.sh b/.github/workflows/scripts/unix_build.sh index e9737c58506a3..7edbec77430b1 100755 --- a/.github/workflows/scripts/unix_build.sh +++ b/.github/workflows/scripts/unix_build.sh @@ -1,54 +1,11 @@ #!/bin/bash set -ex -check_in_docker() { - # This is a temporary solution to detect in a docker, but it should work - if [[ $(whoami) == "dev" ]]; then - echo "true" - else - echo "false" - fi -} +. $(dirname $0)/libcommon.sh IN_DOCKER=$(check_in_docker) [[ "$IN_DOCKER" == "true" ]] && cd taichi -setup_sccache() { - export SCCACHE_DIR=$(pwd)/sccache_cache - export SCCACHE_CACHE_SIZE="128M" - export SCCACHE_LOG=error - export SCCACHE_ERROR_LOG=$(pwd)/sccache_error.log - mkdir -p "$SCCACHE_DIR" - echo "sccache dir: $SCCACHE_DIR" - ls -la "$SCCACHE_DIR" - - if [[ $OSTYPE == "linux-"* ]]; then - wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz - tar -xzf sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz - chmod +x sccache-v0.2.15-x86_64-unknown-linux-musl/sccache - export PATH=$(pwd)/sccache-v0.2.15-x86_64-unknown-linux-musl:$PATH - elif [[ $(uname -m) == "arm64" ]]; then - wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-aarch64-apple-darwin.tar.gz - tar -xzf sccache-v0.2.15-aarch64-apple-darwin.tar.gz - chmod +x sccache-v0.2.15-aarch64-apple-darwin/sccache - export PATH=$(pwd)/sccache-v0.2.15-aarch64-apple-darwin:$PATH - else - wget https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-apple-darwin.tar.gz - tar -xzf sccache-v0.2.15-x86_64-apple-darwin.tar.gz - chmod +x sccache-v0.2.15-x86_64-apple-darwin/sccache - export PATH=$(pwd)/sccache-v0.2.15-x86_64-apple-darwin:$PATH - fi -} - -setup_python() { - if [[ "$IN_DOCKER" == "true" ]]; then - source $HOME/miniconda/etc/profile.d/conda.sh - conda activate "$PY" - fi - python3 -m pip uninstall taichi taichi-nightly -y - python3 -m pip install -r requirements_dev.txt -} - build_taichi_wheel() { git fetch origin master PROJECT_TAGS="" diff --git a/.github/workflows/scripts/unix_test.sh b/.github/workflows/scripts/unix_test.sh index 6a0cf923d80c9..ab3a46227cf2d 100755 --- a/.github/workflows/scripts/unix_test.sh +++ b/.github/workflows/scripts/unix_test.sh @@ -1,16 +1,9 @@ #!/bin/bash set -ex -export PYTHONUNBUFFERED=1 +. $(dirname $0)/libcommon.sh -check_in_docker() { - # This is a temporary solution to detect in a docker, but it should work - if [[ $(whoami) == "dev" ]]; then - echo "true" - else - echo "false" - fi -} +export PYTHONUNBUFFERED=1 export TI_SKIP_VERSION_CHECK=ON export TI_CI=1 diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index 5281a89ab4b58..adf4582b3557f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -160,6 +160,7 @@ jobs: fi docker create --user dev --name taichi_test -e PY -e TI_WANTED_ARCHS ghcr.io/taichi-dev/taichidev-cpu-ubuntu18.04:v0.3.2 /home/dev/unix_test.sh docker cp .github/workflows/scripts/unix_test.sh taichi_test:/home/dev/unix_test.sh + docker cp .github/workflows/scripts/libcommon.sh taichi_test:/home/dev/libcommon.sh docker cp shared/dist/ taichi_test:/home/dev/ docker cp shared/build/ taichi_test:/home/dev/ docker cp ./requirements_test.txt taichi_test:/home/dev/requirements_test.txt @@ -416,6 +417,7 @@ jobs: registry.taichigraphics.com/taichidev-ubuntu18.04:v0.3.1 \ /home/dev/unix_test.sh docker cp .github/workflows/scripts/unix_test.sh taichi_test:/home/dev/unix_test.sh + docker cp .github/workflows/scripts/libcommon.sh taichi_test:/home/dev/libcommon.sh docker cp shared/dist/ taichi_test:/home/dev/ docker cp shared/build/ taichi_test:/home/dev/ docker cp pyproject.toml taichi_test:/home/dev/ @@ -630,3 +632,79 @@ jobs: if: always() run: | docker rm taichi_build_desktop -f + + build_android_demos: + name: Build Android Demos + needs: check_files + runs-on: [self-hosted, Linux, cn] + timeout-minutes: 60 + permissions: + packages: read + contents: read + env: + REDIS_HOST: 172.16.5.8 + steps: + - uses: actions/checkout@v2 + name: Checkout taichi + with: + submodules: "recursive" + + - name: Build For Android + run: | + docker rm taichi_build_android -f + mkdir -p ~/build-cache/pip; chmod 0777 ~/build-cache/pip + chown -R 1000:1000 . + docker run -i --user dev --name taichi_build_android \ + -e SCCACHE_ROOT=/var/lib/sccache \ + -v $(pwd):/home/dev/taichi \ + -v $(readlink -f ~/sccache):/var/lib/sccache \ + -v $(readlink -f ~/git-cache):/var/lib/git-cache \ + -v $(readlink -f ~/build-cache)/pip:/home/dev/.cache/pip \ + registry.taichigraphics.com/taichidev-androidsdk18.04:v0.0.5 \ + /home/dev/taichi/.github/workflows/scripts/android-build.sh build-ext + + redis-cli --raw -h $REDIS_HOST get android-build-credentials >> $GITHUB_ENV + + - name: Test For Android AOT (export core) + run: | + docker rm taichi_test_android -f + mkdir -p ~/build-cache/dot-gradle; chmod 0777 ~/build-cache/dot-gradle + mkdir -p ~/build-cache/pip; chmod 0777 ~/build-cache/pip + chown -R 1000:1000 . + docker run -i --user dev --name taichi_test_android \ + -e REDIS_HOST \ + -v $(pwd):/home/dev/taichi \ + -v $(readlink -f ~/build-cache)/pip:/home/dev/.cache/pip \ + -v $(readlink -f ~/build-cache)/dot-gradle:/home/dev/.gradle \ + registry.taichigraphics.com/taichidev-androidsdk18.04:v0.0.5 \ + /home/dev/taichi/.github/workflows/scripts/aot-demo.sh build-and-smoke-test-android-aot-demo + + - name: Prepare Unity Build Environment + run: | + chown -R 1000:1000 . + docker run -i --rm --user dev \ + -v $(pwd):/home/dev/taichi \ + -v $(readlink -f ~/git-cache):/var/lib/git-cache \ + -v $(readlink -f ~/build-cache)/pip:/home/dev/.cache/pip \ + registry.taichigraphics.com/taichidev-androidsdk18.04:v0.0.5 \ + /home/dev/taichi/.github/workflows/scripts/aot-demo.sh prepare-unity-build-env + + - name: Build Taichi-UnityExample + run: | + docker run -i --rm --user dev \ + -v $(pwd):/home/dev/taichi \ + -v $(readlink -f ~/git-cache):/var/lib/git-cache \ + -v $(readlink -f ~/build-cache)/pip:/home/dev/.cache/pip \ + -v $(readlink -f ~/build-cache)/dot-gradle:/home/dev/.gradle \ + registry.taichigraphics.com/unityci-editor:ubuntu-2020.3.14f1-android-1-with-secret-sauce \ + /home/dev/taichi/.github/workflows/scripts/aot-demo.sh build-unity-demo + + - name: Run Taichi-UnityExample (C-API) + run: | + chown -R 1000:1000 . + docker run -i --rm --user dev \ + -v $(pwd):/home/dev/taichi \ + -v $(readlink -f ~/git-cache):/var/lib/git-cache \ + -e REDIS_HOST \ + registry.taichigraphics.com/taichidev-androidsdk18.04:v0.0.5 \ + /home/dev/taichi/.github/workflows/scripts/aot-demo.sh smoke-test-unity-demo diff --git a/.gitignore b/.gitignore index cddc467e7953f..8894b5810b3cd 100644 --- a/.gitignore +++ b/.gitignore @@ -87,3 +87,4 @@ imgui.ini /venv/ /_skbuild/ .cache +.do-not-clean diff --git a/ci/Dockerfile.android-sdk.18.04 b/ci/Dockerfile.android-sdk.18.04 new file mode 100644 index 0000000000000..65db067219386 --- /dev/null +++ b/ci/Dockerfile.android-sdk.18.04 @@ -0,0 +1,24 @@ +FROM registry.taichigraphics.com/taichidev-ubuntu18.04:v0.3.1 +ENV ANDROID_SDK_ROOT=/android-sdk +USER root +RUN mkdir /android-sdk && \ + wget https://dl.google.com/android/repository/commandlinetools-linux-8512546_latest.zip && \ + unzip commandlinetools-linux-8512546_latest.zip && \ + mv cmdline-tools /android-sdk && \ + rm commandlinetools-linux-8512546_latest.zip && \ + rm /etc/apt/sources.list.d/* && apt-get update && apt-get install openjdk-11-jdk redis-tools -y && \ + yes | /android-sdk/cmdline-tools/bin/sdkmanager --sdk_root=/android-sdk --install \ + 'ndk-bundle' \ + 'build-tools;30.0.3' \ + 'build-tools;33.0.0' \ + 'cmake;3.10.2.4988404' \ + 'platforms;android-30' \ + 'platforms;android-33' \ + 'platform-tools' \ + 'patcher;v4' \ + emulator \ + && \ + chown -R dev:dev /android-sdk +USER dev +# Manually add adb pairing keys +# ADD --chown dev:dev dot-android /home/dev/.android From 01d83732ce13cc7dfb566ffe08cc627d8f21fe00 Mon Sep 17 00:00:00 2001 From: Proton Date: Wed, 3 Aug 2022 11:41:01 +0800 Subject: [PATCH 2/2] comply review requirements --- .github/workflows/scripts/android-build.sh | 3 +-- .github/workflows/scripts/aot-demo.sh | 3 --- .github/workflows/testing.yml | 2 -- 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/scripts/android-build.sh b/.github/workflows/scripts/android-build.sh index ae07847874ce3..fdcb42ed9ae0e 100755 --- a/.github/workflows/scripts/android-build.sh +++ b/.github/workflows/scripts/android-build.sh @@ -15,10 +15,9 @@ setup_python setup-android-ndk-env python setup.py clean -python3 setup.py build_ext +python setup.py build_ext cd build aarch64-linux-android-strip libtaichi_export_core.so aarch64-linux-android-strip libtaichi_c_api.so -rm -f python/CHANGELOG.md chmod -R 777 "$SCCACHE_DIR" diff --git a/.github/workflows/scripts/aot-demo.sh b/.github/workflows/scripts/aot-demo.sh index 073127e753a0e..f93a4e3700465 100755 --- a/.github/workflows/scripts/aot-demo.sh +++ b/.github/workflows/scripts/aot-demo.sh @@ -19,9 +19,6 @@ function build-and-smoke-test-android-aot-demo { ANDROID_APP_ROOT=$APP_ROOT/android JNI_PATH=$ANDROID_APP_ROOT/app/src/main/jniLibs/arm64-v8a/ - # cd $APP_ROOT/python - # python3 implicit_fem.py --aot - mkdir -p $JNI_PATH cp taichi/build/libtaichi_export_core.so $JNI_PATH cd $ANDROID_APP_ROOT diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index adf4582b3557f..98a1edc3bbe5d 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -663,8 +663,6 @@ jobs: registry.taichigraphics.com/taichidev-androidsdk18.04:v0.0.5 \ /home/dev/taichi/.github/workflows/scripts/android-build.sh build-ext - redis-cli --raw -h $REDIS_HOST get android-build-credentials >> $GITHUB_ENV - - name: Test For Android AOT (export core) run: | docker rm taichi_test_android -f