Switch Android CI java build to JDK 11 (#6552)

* switch to jdk11

* fix java

* Update
This commit is contained in:
Guoyu Wang 2021-02-03 17:49:23 -08:00 committed by GitHub
parent c7feb48083
commit 6cf54ff296
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -23,7 +23,26 @@ jobs:
--emulator-pid-file $(Build.BinariesDirectory)/emulator.pid
displayName: Start Android emulator
- script: python3 tools/ci_build/build.py --android --build_dir build --android_sdk_path $ANDROID_HOME --android_ndk_path $ANDROID_HOME/ndk-bundle --android_abi=x86_64 --android_api=29 --skip_submodule_sync --parallel --cmake_generator=Ninja --build_java
# Start switching to jdk 11 after the Android Emulator is started since Android SDK manager requires java 8
- task: JavaToolInstaller@0
displayName: Use jdk 11
inputs:
versionSpec: '11'
jdkArchitectureOption: 'x64'
jdkSourceOption: 'PreInstalled'
- script: |
python3 tools/ci_build/build.py \
--android \
--build_dir build \
--android_sdk_path $ANDROID_HOME \
--android_ndk_path $ANDROID_HOME/ndk-bundle \
--android_abi=x86_64 \
--android_api=29 \
--skip_submodule_sync \
--parallel \
--cmake_generator=Ninja \
--build_java
displayName: CPU EP, Build and Test on Android Emulator
- script: /bin/bash tools/ci_build/github/android/run_nnapi_code_coverage.sh $(pwd)