未验证 提交 43a37f49 编写于 作者: L Liangliang He 提交者: GitHub

Merge pull request #53 from yejw5/update_travis_ci

update travis ci process, add travis badge, update OpenCL-Header commit
language: cpp
os: linux
dist: xenial
sudo: required
before_install:
- sudo pip install pycodestyle
- export BAZEL_VERSION=0.13.1
- wget https://github.com/bazelbuild/bazel/releases/download/$BAZEL_VERSION/bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
- chmod +x bazel-*.sh
- sudo ./bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
- rm -f bazel-$BAZEL_VERSION-installer-linux-x86_64.sh
- pushd /opt/
- sudo wget -q https://dl.google.com/android/repository/android-ndk-r15c-linux-x86_64.zip
- sudo unzip -q android-ndk-r15c-linux-x86_64.zip
- sudo rm -f android-ndk-r15c-linux-x86_64.zip
- export ANDROID_NDK_VERSION=r15c
- export ANDROID_NDK=/opt/android-ndk-${ANDROID_NDK_VERSION}
- export ANDROID_NDK_HOME=${ANDROID_NDK}
- export PATH=${PATH}:${ANDROID_NDK_HOME}
- popd
- sudo apt-get update
- sudo apt-get install -y --no-install-recommends android-tools-adb
- sudo pip install setuptools
- sudo pip install -I tensorflow==1.8.0 "numpy>=1.14.0" scipy jinja2 pyyaml sh==1.12.14 pycodestyle==2.4.0 filelock
script:
- curl -o cpplint.py https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py && python cpplint.py --linelength=80 --counting=detailed $(find mace -name "*.h" -or -name "*.cc") && rm -f cpplint.py
- pycodestyle $(find -name "*.py")
- >
echo "MACE_TEST 0: Check cpp code style";
curl -o cpplint.py https://raw.githubusercontent.com/google/styleguide/gh-pages/cpplint/cpplint.py && python cpplint.py --linelength=80 --counting=detailed $(find mace -name "*.h" -or -name "*.cc") && rm -f cpplint.py || exit 1;
echo "MACE_TEST 1: Check python code style";
pycodestyle $(find -name "*.py") || exit 1;
echo "MACE_TEST 2: Platform compatible test";
mkdir -p mace/codegen/version && bash mace/tools/git/gen_version_source.sh mace/codegen/version/version.cc || exit 1;
mkdir -p mace/codegen/tuning && python mace/python/tools/binary_codegen.py --output_path=mace/codegen/tuning/tuning_params.cc || exit 1;
bazel build mace/core:core || exit 1;
echo "MACE_TEST 3: Ops test";
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
python tools/bazel_adb_run.py --target="//mace/ops:ops_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a --enable_neon=false || exit 1;
echo "MACE_TEST 4: Api test";
python tools/bazel_adb_run.py --target="//mace/test:mace_api_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
python tools/bazel_adb_run.py --target="//mace/test:mace_api_mt_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
echo "MACE_TEST 5: Ops benchmark";
python tools/bazel_adb_run.py --target="//mace/ops:ops_benchmark" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
echo "MACE_TEST 6: Extra test";
python tools/bazel_adb_run.py --target="//mace/kernels:kernels_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
python tools/bazel_adb_run.py --target="//mace/utils:tuner_test" --run_target=False --target_abis=armeabi-v7a,arm64-v8a || exit 1;
......@@ -6,6 +6,7 @@
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](LICENSE)
[![pipeline status](https://gitlab.com/llhe/mace/badges/master/pipeline.svg)](https://gitlab.com/llhe/mace/pipelines)
[![doc build status](https://readthedocs.org/projects/mace/badge/?version=latest)](https://readthedocs.org/projects/mace/badge/?version=latest)
[![Build Status](https://travis-ci.org/travis-ci/travis-web.svg?branch=master)](https://travis-ci.org/travis-ci/travis-web)
[Documentation](https://mace.readthedocs.io) |
[FAQ](https://mace.readthedocs.io/en/latest/faq.html) |
......
......@@ -27,11 +27,11 @@ new_http_archive(
new_http_archive(
name = "opencl_headers",
build_file = "third_party/opencl-headers/opencl-headers.BUILD",
sha256 = "5dc7087680853b5c825360fc04ca26534f4b9f22ac114c4d3a306bfbec3cd0f2",
strip_prefix = "OpenCL-Headers-master",
sha256 = "b2b813dd88a7c39eb396afc153070f8f262504a7f956505b2049e223cfc2229b",
strip_prefix = "OpenCL-Headers-f039db6764d52388658ef15c30b2237bbda49803",
urls = [
"https://cnbj1.fds.api.xiaomi.com/mace/third-party/OpenCL-Headers/OpenCL-Headers-master.zip",
"https://github.com/KhronosGroup/OpenCL-Headers/archive/master.zip",
"https://cnbj1.fds.api.xiaomi.com/mace/third-party/OpenCL-Headers/f039db6764d52388658ef15c30b2237bbda49803.zip",
"https://github.com/KhronosGroup/OpenCL-Headers/archive/f039db6764d52388658ef15c30b2237bbda49803.zip",
],
)
......
......@@ -45,7 +45,7 @@ cat <<EOF > ${OUTPUT_FILENAME}
// This is a generated file. DO NOT EDIT!
namespace mace {
__attribute__((visibility ("default")))
__attribute__((visibility("default")))
const char *MaceVersion() { return "MACEVER-${GIT_VERSION}" + 8; }
} // namespace mace
EOF
......@@ -8,6 +8,16 @@ INCLUDE_DIR=builds/include/mace/public
mkdir -p $LIB_DIR
mkdir -p $INCLUDE_DIR
# generate version code
rm -rf mace/codegen/version
mkdir -p mace/codegen/version
bash mace/tools/git/gen_version_source.sh mace/codegen/version/version.cc
# generate tuning code
rm -rf mace/codegen/tuning
mkdir -p mace/codegen/tuning
python mace/python/tools/binary_codegen.py --output_path=mace/codegen/tuning/tuning_params.cc
# copy include headers
cp mace/public/*.h $INCLUDE_DIR/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册