Android CI (#1600)

This commit is contained in:
daquexian 2019-10-05 08:39:51 +08:00 committed by Changming Sun
parent bfa1b0e96e
commit e071a1249b
7 changed files with 16 additions and 9 deletions

View file

@ -303,7 +303,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "90cb0f8d60b07e96ca7f0ba92fa50884010599ad",
"commitHash":"647d4c3f4d47d9cf63fb90ec175c414a005adea7",
"repositoryUrl": "https://github.com/JDAI-CV/DNNLibrary.git"
}
}

@ -1 +1 @@
Subproject commit ab22710a3f0166f31c9c14feab98c04bfb86b71b
Subproject commit 647d4c3f4d47d9cf63fb90ec175c414a005adea7

View file

@ -138,6 +138,7 @@ TEST(CApiTest, load_float_tensor_with_external_data) {
}
#if defined(__amd64__) || defined(_M_X64)
#ifndef __ANDROID__
#ifdef NDEBUG
TEST(CApiTest, load_huge_tensor_with_external_data) {
FILE* fp;
@ -187,5 +188,6 @@ TEST(CApiTest, load_huge_tensor_with_external_data) {
}
#endif
#endif
#endif
} // namespace test
} // namespace onnxruntime

View file

@ -509,6 +509,12 @@ int real_main(int argc, char* argv[], Ort::Env& env) {
#endif
#endif
#ifdef USE_NNAPI
broken_tests.insert({"scan9_sum", "Error with the extra graph"});
broken_tests.insert({"scan_sum", "Error with the extra graph"});
broken_tests.insert({"mvn_expanded", "Failed to find kernel for MemcpyFromHost(1) (node Memcpy_1)"});
#endif
#ifdef USE_TENSORRT
broken_tests.insert({"fp16_shufflenet", "TRT EP bug"});
broken_tests.insert({"fp16_inception_v1", "TRT EP bug"});

View file

@ -551,7 +551,7 @@ def adb_push(source_dir, src, dest, **kwargs):
def adb_shell(*args, **kwargs):
return run_subprocess(['adb', 'shell', *args], **kwargs)
def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs, enable_python_tests, enable_tvm = False, enable_tensorrt = False, enable_ngraph = False):
def run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs, enable_python_tests, enable_tvm = False, enable_tensorrt = False, enable_ngraph = False, enable_nnapi=False):
for config in configs:
log.info("Running tests for %s configuration", config)
cwd = get_config_build_dir(build_dir, config)
@ -960,7 +960,8 @@ def main():
if args.test :
run_onnxruntime_tests(args, source_dir, ctest_path, build_dir, configs,
args.enable_pybind and not args.skip_onnx_tests,
args.use_tvm, args.use_tensorrt, args.use_ngraph)
args.use_tvm, args.use_tensorrt, args.use_ngraph,
args.use_dnnlibrary)
# run the onnx model tests if requested explicitly.
if args.enable_onnx_tests and not args.skip_onnx_tests:
# directory from ONNX submodule with ONNX test data

View file

@ -10,14 +10,12 @@ echo "no" | $ANDROID_HOME/tools/bin/avdmanager create avd -n android_emulator -k
echo "Starting emulator"
# Start emulator in background
nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -no-snapshot -no-audio &
nohup $ANDROID_HOME/emulator/emulator -avd android_emulator -partition-size 2048 -no-snapshot -no-audio &
# start server in advance, so that the result of watch will only change when device gets online
$ANDROID_HOME/platform-tools/adb start-server
echo "Waiting for device to come online"
# Sometimes wait-for-device hangs, so add a timeout here
timeout 180 adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 1; done; input keyevent 82'
echo "Emulator is online"

View file

@ -4,7 +4,7 @@ jobs:
vmImage: 'macOS-10.14'
steps:
# cmake 3.15 breaks Android NDK https://gitlab.kitware.com/cmake/cmake/issues/19515. pip install cmake==3.13.2 installs 3.12.2
- script: pip install cmake==3.13.2.post1 && alias cmake=/usr/local/bin/cmake && cmake --version && brew install coreutils && alias time=gtimeout
- script: pip install cmake==3.13.2.post1 && alias cmake=/usr/local/bin/cmake && cmake --version && brew install coreutils
displayName: Install cmake 3.14 and coreutils
- script: 'git submodule update --init --recursive --progress'
displayName: Clone submodules