提交 3e892401 编写于 作者: B Bin Li

add build android demo to CI

上级 17ac111e
...@@ -8,6 +8,7 @@ stages: ...@@ -8,6 +8,7 @@ stages:
- ops_test - ops_test
- api_test - api_test
- python_tools_tests - python_tools_tests
- build_android_demo
- ops_benchmark - ops_benchmark
- extra_tests - extra_tests
...@@ -111,3 +112,8 @@ python_tools_tests: ...@@ -111,3 +112,8 @@ python_tools_tests:
python tools/converter.py run --config=${CONF_FILE} --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1; python tools/converter.py run --config=${CONF_FILE} --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1;
python tools/converter.py run --config=${CONF_FILE} --example --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1; python tools/converter.py run --config=${CONF_FILE} --example --round=1 --validate --model_graph_format=file --model_data_format=file || exit 1;
- rm -rf mace-models - rm -rf mace-models
build_android_demo:
stage: build_android_demo
script:
- pushd mace/examples/android/ && bash build.sh build && popd
...@@ -10,6 +10,10 @@ android { ...@@ -10,6 +10,10 @@ android {
versionName "1.0" versionName "1.0"
} }
lintOptions {
abortOnError false
}
signingConfigs { signingConfigs {
release { release {
storeFile file("mace_demo.jks") storeFile file("mace_demo.jks")
......
...@@ -9,8 +9,13 @@ cp -rf builds/mobilenet/include mace/examples/android/macelibrary/src/main/cpp/ ...@@ -9,8 +9,13 @@ cp -rf builds/mobilenet/include mace/examples/android/macelibrary/src/main/cpp/
cp -rf builds/mobilenet/model mace/examples/android/macelibrary/src/main/cpp/ cp -rf builds/mobilenet/model mace/examples/android/macelibrary/src/main/cpp/
bash tools/build-standalone-lib.sh bash tools/build-standalone-lib.sh
cp -rf builds/include mace/examples/android/macelibrary/src/main/cpp/
cp -rf builds/lib mace/examples/android/macelibrary/src/main/cpp/ cp -rf builds/lib mace/examples/android/macelibrary/src/main/cpp/
popd popd
./gradlew installAppRelease if [ $# -eq 1 ] && [ $1 == "build" ]; then
./gradlew build
else
./gradlew installAppRelease
fi
...@@ -14,12 +14,12 @@ cmake_minimum_required(VERSION 3.4.1) ...@@ -14,12 +14,12 @@ cmake_minimum_required(VERSION 3.4.1)
include_directories(${CMAKE_SOURCE_DIR}/) include_directories(${CMAKE_SOURCE_DIR}/)
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/include) include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/include)
set(mace_file ${CMAKE_SOURCE_DIR}/src/main/cpp/lib/arm64-v8a/libmace.a) set(mace_lib ${CMAKE_SOURCE_DIR}/src/main/cpp/lib/arm64-v8a/libmace.a)
set(mobilenet_file ${CMAKE_SOURCE_DIR}/src/main/cpp/model/mobilenet.a) set(mobilenet_lib ${CMAKE_SOURCE_DIR}/src/main/cpp/model/arm64-v8a/mobilenet.a)
add_library (mace_lib STATIC IMPORTED) add_library (mace_lib STATIC IMPORTED)
set_target_properties(mace_lib PROPERTIES IMPORTED_LOCATION ${mace_file}) set_target_properties(mace_lib PROPERTIES IMPORTED_LOCATION ${mace_lib})
add_library (mobilenet_lib STATIC IMPORTED) add_library (mobilenet_lib STATIC IMPORTED)
set_target_properties(mobilenet_lib PROPERTIES IMPORTED_LOCATION ${mobilenet_file}) set_target_properties(mobilenet_lib PROPERTIES IMPORTED_LOCATION ${mobilenet_lib})
add_library( # Sets the name of the library. add_library( # Sets the name of the library.
mace_mobile_jni mace_mobile_jni
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册