Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
bf7a278e
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
bf7a278e
编写于
6月 23, 2017
作者:
Y
Yu Yang
提交者:
GitHub
6月 23, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2575 from wangkuiyi/simply_travis_ci
Simplify Travis CI configuration
上级
732be4f0
0cbe120d
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
16 addition
and
60 deletion
+16
-60
.travis.yml
.travis.yml
+4
-20
paddle/scripts/travis/build_and_test.sh
paddle/scripts/travis/build_and_test.sh
+0
-12
paddle/scripts/travis/build_doc.sh
paddle/scripts/travis/build_doc.sh
+8
-5
paddle/scripts/travis/check_style.sh
paddle/scripts/travis/check_style.sh
+4
-4
paddle/scripts/travis/common.sh
paddle/scripts/travis/common.sh
+0
-6
paddle/scripts/travis/main.sh
paddle/scripts/travis/main.sh
+0
-13
未找到文件。
.travis.yml
浏览文件 @
bf7a278e
...
...
@@ -2,7 +2,6 @@ group: deprecated-2017Q2
language
:
cpp
cache
:
directories
:
-
$HOME/third_party
-
$HOME/.ccache
-
$HOME/.cache/pip
sudo
:
required
...
...
@@ -10,15 +9,13 @@ dist: trusty
os
:
-
linux
env
:
-
JOB=DOCS
-
JOB=BUILD_AND_TEST
-
JOB=PRE_COMMIT
-
JOB=build_doc
-
JOB=check_style
addons
:
apt
:
packages
:
-
gcc-4.8
-
g++-4.8
-
gfortran-4.8
-
git
-
build-essential
-
python
...
...
@@ -35,18 +32,7 @@ addons:
-
libtool
-
ccache
before_install
:
-
|
if [ ${JOB} == "BUILD_AND_TEST" ]; then
local change_list=`git diff --name-only $TRAVIS_COMMIT_RANGE`
if [ $? -eq 0 ]; then # if git diff return no zero, then rerun unit test.
if ! echo ${change_list} | grep -qvE '(\.md$)|(\.rst$)|(\.jpg$)|(\.png$)'
then
echo "Only markdown docs were updated, stopping build process."
exit
fi
fi
fi
-
if [[ "$JOB" == "PRE_COMMIT" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
-
if [[ "$JOB" == "check_style" ]]; then sudo ln -s /usr/bin/clang-format-3.8 /usr/bin/clang-format; fi
# Paddle is using protobuf 3.1 currently. Protobuf 3.2 breaks the compatibility. So we specify the python
# protobuf version.
-
pip install numpy wheel 'protobuf==3.1' sphinx==1.5.6 recommonmark sphinx-rtd-theme==0.1.9 virtualenv pre-commit requests==2.9.2 LinkChecker
...
...
@@ -55,9 +41,7 @@ before_install:
-
|
function timeout() { perl -e 'alarm shift; exec @ARGV' "$@"; }
script
:
-
|
timeout 2580 paddle/scripts/travis/main.sh # 43min timeout
RESULT=$?; if [ $RESULT -eq 0 ] || [ $RESULT -eq 142 ]; then true; else false; fi;
-
paddle/scripts/travis/$JOB.sh
notifications
:
email
:
on_success
:
change
...
...
paddle/scripts/travis/build_and_test.sh
已删除
100755 → 0
浏览文件 @
732be4f0
#!/bin/bash
source
./common.sh
NPROC
=
1
export
PYTHONPATH
=
/opt/python/2.7.12/lib/python2.7/site-packages
export
PYTHONHOME
=
/opt/python/2.7.12
export
PATH
=
/opt/python/2.7.12/bin:
${
PATH
}
cmake ..
-DCMAKE_Fortran_COMPILER
=
/usr/bin/gfortran-4.8
-DON_TRAVIS
=
ON
-DWITH_COVERAGE
=
ON
-DCOVERALLS_UPLOAD
=
ON
${
EXTRA_CMAKE_OPTS
}
NRPOC
=
`
nproc
`
make
-j
$NPROC
make coveralls
sudo
make
install
paddle/scripts/travis/
docs
.sh
→
paddle/scripts/travis/
build_doc
.sh
浏览文件 @
bf7a278e
#!/bin/bash
set
-e
# Create the build directory for CMake.
mkdir
-p
$TRAVIS_BUILD_DIR
/build
cd
$TRAVIS_BUILD_DIR
/build
# Add set -e, cd to directory.
source
./common.sh
# Compile Documentation only.
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-D
CMAKE_Fortran_COMPILER
=
/usr/bin/gfortran-4.8
-DWITH_GPU
=
OFF
-DWITH_DOC
=
OFF
-DWITH_STYLE_CHECK
=
OFF
${
EXTRA_CMAKE_OPTS
}
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-D
WITH_GPU
=
OFF
-DWITH_DOC
=
OFF
-DWITH_STYLE_CHECK
=
OFF
mkdir
output
make
-j
`
nproc
`
find ..
-name
'*whl'
| xargs pip
install
# install all wheels.
rm
-rf
*
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-D
CMAKE_Fortran_COMPILER
=
/usr/bin/gfortran-4.8
-DWITH_GPU
=
OFF
-DWITH_DOC
=
ON
${
EXTRA_CMAKE_OPTS
}
make paddle_docs paddle_docs_cn
cmake ..
-DCMAKE_BUILD_TYPE
=
Debug
-D
WITH_GPU
=
OFF
-DWITH_DOC
=
ON
make
-j
`
nproc
`
paddle_docs paddle_docs_cn
# check websites for broken links
linkchecker doc/en/html/index.html
...
...
paddle/scripts/travis/
precommit
.sh
→
paddle/scripts/travis/
check_style
.sh
浏览文件 @
bf7a278e
#!/bin/bash
function
abort
(){
echo
"Your c
ommit not fit PaddlePaddle code style
"
1>&2
echo
"Please use pre-commit
scripts to auto-format your code
"
1>&2
echo
"Your c
hange doesn't follow PaddlePaddle's code style.
"
1>&2
echo
"Please use pre-commit
to reformat your code and git push again.
"
1>&2
exit
1
}
trap
'abort'
0
set
-e
source
common.sh
cd
..
cd
$TRAVIS_BUILD_DIR
export
PATH
=
/usr/bin:
$PATH
pre-commit
install
clang-format
--version
...
...
paddle/scripts/travis/common.sh
已删除
100755 → 0
浏览文件 @
732be4f0
#!/bin/bash
set
-e
mkdir
-p
../../../build
cd
../../../build
mkdir
-p
$HOME
/third_party
EXTRA_CMAKE_OPTS
=
"-DTHIRD_PARTY_PATH=
${
HOME
}
/third_party"
paddle/scripts/travis/main.sh
已删除
100755 → 0
浏览文件 @
732be4f0
#!/bin/bash
cd
`
dirname
$0
`
if
[
${
JOB
}
==
"BUILD_AND_TEST"
]
;
then
./build_and_test.sh
elif
[
${
JOB
}
==
"DOCS"
]
;
then
./docs.sh
elif
[
${
JOB
}
==
"PRE_COMMIT"
]
;
then
./precommit.sh
else
echo
Unknown job
${
JOB
}
exit
1
fi
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录