You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/05/13 15:14:23 UTC

[GitHub] [tvm] KJlaccHoeUM9l commented on a diff in pull request #11241: [Android] Update gradle version and other changes in android apps, CI modification for auto-build Android apps

KJlaccHoeUM9l commented on code in PR #11241:
URL: https://github.com/apache/tvm/pull/11241#discussion_r872497444


##########
.github/workflows/main.yml:
##########
@@ -38,59 +38,125 @@ jobs:
   MacOS:
     runs-on: macOS-latest
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: bash -l {0}
-      run: >-
-        conda build --output-folder=conda/pkg  conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Build iOS RPC
-      run: |
-        IOS_VERSION="14.0"
-        CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
-                     -DCMAKE_SYSTEM_NAME=iOS \
-                     -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
-                     -DCMAKE_OSX_SYSROOT=iphonesimulator \
-                     -DCMAKE_OSX_ARCHITECTURES=x86_64 \
-                     -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
-                     -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
-                     -DUSE_IOS_RPC=ON"
-
-        mkdir build-ios-simulator
-        cd build-ios-simulator
-        cmake .. ${CMAKE_FLAGS}
-        cmake --build . --target ios_rpc
-    - name: Test
-      shell: bash -l {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
-    - name: Test iOS RPC
-      shell: bash -l {0}
-      run: >-
-        python -m pip install tornado psutil cloudpickle &&
-        export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
-        export BUNDLE_ID=org.apache.tvmrpc &&
-        export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
-        python -m pytest -v tests/python/contrib/test_rpc_server_device.py
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: bash -l {0}
+        run: >-
+          conda build --output-folder=conda/pkg  conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Build iOS RPC
+        run: |
+          IOS_VERSION="14.0"
+          CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
+                       -DCMAKE_SYSTEM_NAME=iOS \
+                       -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
+                       -DCMAKE_OSX_SYSROOT=iphonesimulator \
+                       -DCMAKE_OSX_ARCHITECTURES=x86_64 \
+                       -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
+                       -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
+                       -DUSE_IOS_RPC=ON"
+          
+          mkdir build-ios-simulator
+          cd build-ios-simulator
+          cmake .. ${CMAKE_FLAGS}
+          cmake --build . --target ios_rpc
+      - name: Test
+        shell: bash -l {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+      - name: Test iOS RPC
+        shell: bash -l {0}
+        run: >-
+          python -m pip install tornado psutil cloudpickle &&
+          export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
+          export BUNDLE_ID=org.apache.tvmrpc &&
+          export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
+          python -m pytest -v tests/python/contrib/test_rpc_server_device.py
 
   Windows:
     runs-on: windows-2019
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: cmd /C call {0}
-      run: >-
-        conda build --output-folder=conda/pkg conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Test
-      shell: cmd /C call {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: cmd /C call {0}
+        run: >-
+          conda build --output-folder=conda/pkg conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Test
+        shell: cmd /C call {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+
+  Android:
+    runs-on: Ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Set up java
+        uses: actions/setup-java@v3
+        with:
+          distribution: 'zulu'
+          java-version: '11'
+      - name: Set up NDK
+        run: |
+          echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;24.0.8215888" --sdk_root=${ANDROID_SDK_ROOT}
+      - name: Build TVM
+        shell: bash -l {0}
+        run: |
+          mkdir build
+          cd build
+          ../tests/scripts/task_config_build_jvm.sh .
+          cmake ..
+          make -j8

Review Comment:
   It may be enough to build only the runtime part here, try something like this:
   ```Shell
   cmake --build . --target tvm_runtime
   ```



##########
.github/workflows/main.yml:
##########
@@ -38,59 +38,125 @@ jobs:
   MacOS:
     runs-on: macOS-latest
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: bash -l {0}
-      run: >-
-        conda build --output-folder=conda/pkg  conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Build iOS RPC
-      run: |
-        IOS_VERSION="14.0"
-        CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
-                     -DCMAKE_SYSTEM_NAME=iOS \
-                     -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
-                     -DCMAKE_OSX_SYSROOT=iphonesimulator \
-                     -DCMAKE_OSX_ARCHITECTURES=x86_64 \
-                     -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
-                     -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
-                     -DUSE_IOS_RPC=ON"
-
-        mkdir build-ios-simulator
-        cd build-ios-simulator
-        cmake .. ${CMAKE_FLAGS}
-        cmake --build . --target ios_rpc
-    - name: Test
-      shell: bash -l {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
-    - name: Test iOS RPC
-      shell: bash -l {0}
-      run: >-
-        python -m pip install tornado psutil cloudpickle &&
-        export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
-        export BUNDLE_ID=org.apache.tvmrpc &&
-        export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
-        python -m pytest -v tests/python/contrib/test_rpc_server_device.py
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: bash -l {0}
+        run: >-
+          conda build --output-folder=conda/pkg  conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Build iOS RPC
+        run: |
+          IOS_VERSION="14.0"
+          CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
+                       -DCMAKE_SYSTEM_NAME=iOS \
+                       -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
+                       -DCMAKE_OSX_SYSROOT=iphonesimulator \
+                       -DCMAKE_OSX_ARCHITECTURES=x86_64 \
+                       -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
+                       -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
+                       -DUSE_IOS_RPC=ON"
+          
+          mkdir build-ios-simulator
+          cd build-ios-simulator
+          cmake .. ${CMAKE_FLAGS}
+          cmake --build . --target ios_rpc
+      - name: Test
+        shell: bash -l {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+      - name: Test iOS RPC
+        shell: bash -l {0}
+        run: >-
+          python -m pip install tornado psutil cloudpickle &&
+          export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
+          export BUNDLE_ID=org.apache.tvmrpc &&
+          export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
+          python -m pytest -v tests/python/contrib/test_rpc_server_device.py
 
   Windows:
     runs-on: windows-2019
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: cmd /C call {0}
-      run: >-
-        conda build --output-folder=conda/pkg conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Test
-      shell: cmd /C call {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: cmd /C call {0}
+        run: >-
+          conda build --output-folder=conda/pkg conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Test
+        shell: cmd /C call {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+
+  Android:
+    runs-on: Ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Set up java
+        uses: actions/setup-java@v3
+        with:
+          distribution: 'zulu'
+          java-version: '11'
+      - name: Set up NDK
+        run: |
+          echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;24.0.8215888" --sdk_root=${ANDROID_SDK_ROOT}
+      - name: Build TVM
+        shell: bash -l {0}
+        run: |
+          mkdir build
+          cd build
+          ../tests/scripts/task_config_build_jvm.sh .
+          cmake ..
+          make -j8
+      - name: Build TVM4J
+        run: |
+          make jvmpkg
+      - name: Build android_rpc
+        working-directory: apps/android_rpc
+        run: |
+          export PATH="${ANDROID_HOME}/ndk/24.0.8215888:$PATH"
+          gradle clean build
+      - name: Upload android_rpc APK
+        uses: actions/upload-artifact@v2
+        with:
+          name: android_rpc-debug.apk
+          path: ./apps/android_rpc/app/build/outputs/apk/debug/app-debug.apk
+      - name: Build android_deploy
+        working-directory: apps/android_deploy
+        run: |
+          export PATH="${ANDROID_HOME}/ndk/24.0.8215888:$PATH"
+          gradle clean build
+      - name: Upload android_deploy APK
+        uses: actions/upload-artifact@v2
+        with:
+          name: android_deploy-debug.apk
+          path: ./apps/android_deploy/app/build/outputs/apk/debug/app-debug.apk
+      - name: Build android_camera
+        working-directory: apps/android_camera
+        run: |
+          mkdir -p app/src/main/assets/models/
+          export TVM_NDK_CC=${ANDROID_HOME}/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++
+          export TVM_HOME=~/work/tvm/tvm

Review Comment:
   It seems that there was a separate variable in GH Actions to determine the root directory. Maybe try using it instead of the hardcode path?



##########
.github/workflows/main.yml:
##########
@@ -38,59 +38,125 @@ jobs:
   MacOS:
     runs-on: macOS-latest
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: bash -l {0}
-      run: >-
-        conda build --output-folder=conda/pkg  conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Build iOS RPC
-      run: |
-        IOS_VERSION="14.0"
-        CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
-                     -DCMAKE_SYSTEM_NAME=iOS \
-                     -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
-                     -DCMAKE_OSX_SYSROOT=iphonesimulator \
-                     -DCMAKE_OSX_ARCHITECTURES=x86_64 \
-                     -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
-                     -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
-                     -DUSE_IOS_RPC=ON"
-
-        mkdir build-ios-simulator
-        cd build-ios-simulator
-        cmake .. ${CMAKE_FLAGS}
-        cmake --build . --target ios_rpc
-    - name: Test
-      shell: bash -l {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
-    - name: Test iOS RPC
-      shell: bash -l {0}
-      run: >-
-        python -m pip install tornado psutil cloudpickle &&
-        export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
-        export BUNDLE_ID=org.apache.tvmrpc &&
-        export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
-        python -m pytest -v tests/python/contrib/test_rpc_server_device.py
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: bash -l {0}
+        run: >-
+          conda build --output-folder=conda/pkg  conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Build iOS RPC
+        run: |
+          IOS_VERSION="14.0"
+          CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
+                       -DCMAKE_SYSTEM_NAME=iOS \
+                       -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
+                       -DCMAKE_OSX_SYSROOT=iphonesimulator \
+                       -DCMAKE_OSX_ARCHITECTURES=x86_64 \
+                       -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
+                       -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
+                       -DUSE_IOS_RPC=ON"
+          
+          mkdir build-ios-simulator
+          cd build-ios-simulator
+          cmake .. ${CMAKE_FLAGS}
+          cmake --build . --target ios_rpc
+      - name: Test
+        shell: bash -l {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+      - name: Test iOS RPC
+        shell: bash -l {0}
+        run: >-
+          python -m pip install tornado psutil cloudpickle &&
+          export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
+          export BUNDLE_ID=org.apache.tvmrpc &&
+          export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
+          python -m pytest -v tests/python/contrib/test_rpc_server_device.py
 
   Windows:
     runs-on: windows-2019
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: cmd /C call {0}
-      run: >-
-        conda build --output-folder=conda/pkg conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Test
-      shell: cmd /C call {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: cmd /C call {0}
+        run: >-
+          conda build --output-folder=conda/pkg conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Test
+        shell: cmd /C call {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+
+  Android:
+    runs-on: Ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Set up java
+        uses: actions/setup-java@v3
+        with:
+          distribution: 'zulu'
+          java-version: '11'
+      - name: Set up NDK
+        run: |
+          echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;24.0.8215888" --sdk_root=${ANDROID_SDK_ROOT}
+      - name: Build TVM
+        shell: bash -l {0}
+        run: |
+          mkdir build
+          cd build
+          ../tests/scripts/task_config_build_jvm.sh .
+          cmake ..
+          make -j8
+      - name: Build TVM4J
+        run: |
+          make jvmpkg
+      - name: Build android_rpc
+        working-directory: apps/android_rpc
+        run: |
+          export PATH="${ANDROID_HOME}/ndk/24.0.8215888:$PATH"

Review Comment:
   Can we use an environment variable like `NDK_VERSION` for the NDK version?



##########
.github/workflows/main.yml:
##########
@@ -38,59 +38,125 @@ jobs:
   MacOS:
     runs-on: macOS-latest
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: bash -l {0}
-      run: >-
-        conda build --output-folder=conda/pkg  conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Build iOS RPC
-      run: |
-        IOS_VERSION="14.0"
-        CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
-                     -DCMAKE_SYSTEM_NAME=iOS \
-                     -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
-                     -DCMAKE_OSX_SYSROOT=iphonesimulator \
-                     -DCMAKE_OSX_ARCHITECTURES=x86_64 \
-                     -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
-                     -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
-                     -DUSE_IOS_RPC=ON"
-
-        mkdir build-ios-simulator
-        cd build-ios-simulator
-        cmake .. ${CMAKE_FLAGS}
-        cmake --build . --target ios_rpc
-    - name: Test
-      shell: bash -l {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
-    - name: Test iOS RPC
-      shell: bash -l {0}
-      run: >-
-        python -m pip install tornado psutil cloudpickle &&
-        export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
-        export BUNDLE_ID=org.apache.tvmrpc &&
-        export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
-        python -m pytest -v tests/python/contrib/test_rpc_server_device.py
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: bash -l {0}
+        run: >-
+          conda build --output-folder=conda/pkg  conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Build iOS RPC
+        run: |
+          IOS_VERSION="14.0"
+          CMAKE_FLAGS="-DCMAKE_BUILD_TYPE=Release \
+                       -DCMAKE_SYSTEM_NAME=iOS \
+                       -DCMAKE_SYSTEM_VERSION=${IOS_VERSION} \
+                       -DCMAKE_OSX_SYSROOT=iphonesimulator \
+                       -DCMAKE_OSX_ARCHITECTURES=x86_64 \
+                       -DCMAKE_OSX_DEPLOYMENT_TARGET=14.0 \
+                       -DCMAKE_BUILD_WITH_INSTALL_NAME_DIR=ON \
+                       -DUSE_IOS_RPC=ON"
+          
+          mkdir build-ios-simulator
+          cd build-ios-simulator
+          cmake .. ${CMAKE_FLAGS}
+          cmake --build . --target ios_rpc
+      - name: Test
+        shell: bash -l {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+      - name: Test iOS RPC
+        shell: bash -l {0}
+        run: >-
+          python -m pip install tornado psutil cloudpickle &&
+          export PYTHONPATH=tests/python/contrib:${PYTHONPATH} &&
+          export BUNDLE_ID=org.apache.tvmrpc &&
+          export BUNDLE_PATH=build-ios-simulator/apps/ios_rpc/ios_rpc/src/ios_rpc-build/Release-iphonesimulator/tvmrpc.app &&
+          python -m pytest -v tests/python/contrib/test_rpc_server_device.py
 
   Windows:
     runs-on: windows-2019
     steps:
-    - uses: actions/checkout@v2
-      with:
-        submodules: 'recursive'
-    - name: Set up environment
-      uses: ./.github/actions/setup
-    - name: Conda Build
-      shell: cmd /C call {0}
-      run: >-
-        conda build --output-folder=conda/pkg conda/recipe &&
-        conda install tvm -c ./conda/pkg
-    - name: Test
-      shell: cmd /C call {0}
-      run: >-
-        python -m pytest -v tests/python/all-platform-minimal-test
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Conda Build
+        shell: cmd /C call {0}
+        run: >-
+          conda build --output-folder=conda/pkg conda/recipe &&
+          conda install tvm -c ./conda/pkg
+      - name: Test
+        shell: cmd /C call {0}
+        run: >-
+          python -m pytest -v tests/python/all-platform-minimal-test
+
+  Android:
+    runs-on: Ubuntu-20.04
+    steps:
+      - uses: actions/checkout@v2
+        with:
+          submodules: 'recursive'
+      - name: Set up environment
+        uses: ./.github/actions/setup
+      - name: Set up java
+        uses: actions/setup-java@v3
+        with:
+          distribution: 'zulu'
+          java-version: '11'
+      - name: Set up NDK
+        run: |
+          echo "y" | sudo /usr/local/lib/android/sdk/tools/bin/sdkmanager --install "ndk;24.0.8215888" --sdk_root=${ANDROID_SDK_ROOT}
+      - name: Build TVM
+        shell: bash -l {0}
+        run: |
+          mkdir build
+          cd build
+          ../tests/scripts/task_config_build_jvm.sh .
+          cmake ..
+          make -j8
+      - name: Build TVM4J
+        run: |
+          make jvmpkg
+      - name: Build android_rpc
+        working-directory: apps/android_rpc
+        run: |
+          export PATH="${ANDROID_HOME}/ndk/24.0.8215888:$PATH"
+          gradle clean build
+      - name: Upload android_rpc APK
+        uses: actions/upload-artifact@v2
+        with:
+          name: android_rpc-debug.apk
+          path: ./apps/android_rpc/app/build/outputs/apk/debug/app-debug.apk
+      - name: Build android_deploy
+        working-directory: apps/android_deploy
+        run: |
+          export PATH="${ANDROID_HOME}/ndk/24.0.8215888:$PATH"
+          gradle clean build
+      - name: Upload android_deploy APK
+        uses: actions/upload-artifact@v2
+        with:
+          name: android_deploy-debug.apk
+          path: ./apps/android_deploy/app/build/outputs/apk/debug/app-debug.apk
+      - name: Build android_camera
+        working-directory: apps/android_camera
+        run: |
+          mkdir -p app/src/main/assets/models/
+          export TVM_NDK_CC=${ANDROID_HOME}/ndk/24.0.8215888/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android30-clang++
+          export TVM_HOME=~/work/tvm/tvm
+          export PYTHONPATH=$TVM_HOME/python:${PYTHONPATH}
+          pip3 install numpy decorator attrs scipy keras mxnet tensorflow

Review Comment:
   `numpy decorator attrs` packages are required to work with TVM. For this general dependencies, a file something like `requirements.txt` should exist. It is preferable to use it if it exists.
   For `scipy keras mxnet tensorflow` packages, it is probably better to have a separate `requirements.txt` file in the root of `apps/android_camera` directory, because these packages are required for this application to work.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org