提交 81c86f9b 编写于 作者: H hedaoyuan 提交者: GitHub

Merge pull request #47 from reyoung/master

Add travis support to PaddlePaddle
language: cpp
cache: ccache
sudo: required
dist: trusty
addons:
apt:
packages:
- gcc-4.8
- g++-4.8
- wget
- git
- build-essential
- libatlas-base-dev
- python
- python-pip
- python2.7-dev
- m4
- libprotobuf-dev
- protobuf-compiler
- python-protobuf
- python-numpy
- python-wheel
- libgoogle-glog-dev
- libgflags-dev
- libgtest-dev
before_install:
- pip install wheel protobuf
- sudo paddle/scripts/travis/before_install.sh
script:
- paddle/scripts/travis/build.sh
- paddle/scripts/travis/unittest.sh
notifications:
email:
on_success: change
on_failure: always
......@@ -37,6 +37,7 @@ option(WITH_TIMER "Compile PaddlePaddle use timer" OFF)
option(WITH_TESTING "Compile and run unittest for PaddlePaddle" ${GTEST_FOUND})
option(WITH_DOC "Compile PaddlePaddle with documentation" OFF)
option(WITH_SWIG_PY "Compile PaddlePaddle with py PaddlePaddle prediction api" ${SWIG_FOUND})
option(ON_TRAVIS "Running test on travis-ci or not." OFF)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
"Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel"
......
# PaddlePaddle
[![Build Status](https://travis-ci.org/baidu/Paddle.svg?branch=master)](https://travis-ci.org/baidu/Paddle)
Welcome to the PaddlePaddle GitHub.
......
#!/bin/bash
set -e
pushd /usr/src/gtest
cmake .
make
sudo cp *.a /usr/lib
popd
#!/bin/bash
cd `dirname $0`
cd ../../../
set -e
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_GPU=OFF -DWITH_DOC=OFF -DWITH_TESTING=ON -DON_TRAVIS=ON
make -j `nproc`
#!/bin/bash
set -e
cd `dirname $0`
cd ../../../build
env CTEST_OUTPUT_ON_FAILURE=1 make test ARGS="-j `nproc`"
......@@ -53,12 +53,13 @@ add_test(NAME test_CompareTwoOpts
################# test_CompareSparse ##################
add_unittest_without_exec(test_CompareSparse
test_CompareSparse.cpp)
add_test(NAME test_CompareSparse
if(NOT ON_TRAVIS)
add_test(NAME test_CompareSparse
COMMAND ${PROJ_ROOT}/paddle/.set_python_path.sh -d ${PROJ_ROOT}/python/
./.set_port.sh -p port -n 6
${CMAKE_CURRENT_BINARY_DIR}/test_CompareSparse
WORKING_DIRECTORY ${PROJ_ROOT}/paddle/)
endif()
################# test_recurrent_machine_generation ###############
add_unittest_without_exec(test_recurrent_machine_generation
test_recurrent_machine_generation.cpp)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册