diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d975b2afc9e8bb99466c08e8ecec471f0e33b252..15859581eb47dc166a9e435ccf5e2a518c699f8e 100755 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,8 +12,12 @@ before_script: # merge the latest code - git config --global user.email "you@example.com" - git config --global user.name "Your Name" + - git reset --hard HEAD # ignore any local changes in CI node. - git fetch origin incubate/lite + - git status -s + - git branch - git merge --no-ff origin/incubate/lite + #- git checkout origin/incubate/lite && git log -1 && image: $SERVER_LITE_DOCKER_IMAGE diff --git a/paddle/fluid/lite/CMakeLists.txt b/paddle/fluid/lite/CMakeLists.txt index 27aa12bb0fdeec3ef48c0165f10cf07c58bf74a7..470e52e53a1cdddafab5c6d65421092539322629 100644 --- a/paddle/fluid/lite/CMakeLists.txt +++ b/paddle/fluid/lite/CMakeLists.txt @@ -101,6 +101,8 @@ file(WRITE ${offline_lib_registry_file} "") # clean set(__lite_cc_files "" ; "") set(__lite_cc_files "${CMAKE_BINARY_DIR}/lite_cc_files.txt") file(WRITE ${__lite_cc_files} "") # clean + + # cc_library with branch support. # The branches: # X86_DEPS: works only when LITE_WITH_X86 is ON. diff --git a/paddle/fluid/lite/demo/java/README.md b/paddle/fluid/lite/demo/java/README.md index 3287706dac1d6608c017c0cc41fd68ede8edd0f7..f6e748a3c4defa556910ed15e8c8105cf89c9df9 100644 --- a/paddle/fluid/lite/demo/java/README.md +++ b/paddle/fluid/lite/demo/java/README.md @@ -12,7 +12,7 @@ ## 手动编译(给测试人员需要更新 demo 模型或 .so 库可阅读) -###编译: +### 编译: 首先在PaddleLite的开发Docker镜像中,拉取最新PaddleLite代码,编译对应你手机架构的预测库, 下面我们以arm8 架构举例。进入paddlelite 目录,运行以下cmake 和make 命令: diff --git a/paddle/fluid/lite/demo/java/android/.gitignore b/paddle/fluid/lite/demo/java/android/.gitignore index 2b75303ac58f551de0a327638a60b909c6d33ece..d945664de17e02f49eaefa887fa9f6d7714093d7 100644 --- a/paddle/fluid/lite/demo/java/android/.gitignore +++ b/paddle/fluid/lite/demo/java/android/.gitignore @@ -1,5 +1,4 @@ *.iml -.gradle /local.properties /.idea/caches /.idea/libraries diff --git a/paddle/fluid/lite/demo/java/android/PaddlePredictor/app/build.gradle b/paddle/fluid/lite/demo/java/android/PaddlePredictor/app/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..09134f7e7f7c069fcd197735d09eebfab4b949db --- /dev/null +++ b/paddle/fluid/lite/demo/java/android/PaddlePredictor/app/build.gradle @@ -0,0 +1,30 @@ +apply plugin: 'com.android.application' + +android { + compileSdkVersion 28 + defaultConfig { + applicationId "com.baidu.paddle.lite" + minSdkVersion 23 + targetSdkVersion 28 + versionCode 1 + versionName "1.0" + testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" + } + buildTypes { + release { + minifyEnabled false + proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar']) + implementation 'com.android.support:appcompat-v7:28.0.0' + implementation 'com.android.support.constraint:constraint-layout:1.1.3' + testImplementation 'junit:junit:4.12' + androidTestImplementation 'com.android.support.test:runner:1.0.2' + androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' +} + + diff --git a/paddle/fluid/lite/demo/java/android/PaddlePredictor/build.gradle b/paddle/fluid/lite/demo/java/android/PaddlePredictor/build.gradle new file mode 100644 index 0000000000000000000000000000000000000000..ec235fca71177cae7f78517670b7bf62f6b3f85a --- /dev/null +++ b/paddle/fluid/lite/demo/java/android/PaddlePredictor/build.gradle @@ -0,0 +1,29 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. + +buildscript { + repositories { + google() + jcenter() + + } + dependencies { + classpath 'com.android.tools.build:gradle:3.4.1' + + // NOTE: Do not place your application dependencies here; they belong + // in the individual module build.gradle files + } +} + +allprojects { + repositories { + google() + jcenter() + + } +} + +task clean(type: Delete) { + delete rootProject.buildDir +} + +