-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Simplify Travis CI configuration #2575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,18 @@ | ||
| #!/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 -DCMAKE_Fortran_COMPILER=/usr/bin/gfortran-4.8 -DWITH_GPU=OFF -DWITH_DOC=OFF -DWITH_STYLE_CHECK=OFF ${EXTRA_CMAKE_OPTS} | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Maybe remove
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. current paddle build openblas does not need gfortran any more. |
||
| cmake .. -DCMAKE_BUILD_TYPE=Debug -DWITH_GPU=OFF -DWITH_DOC=OFF -DWITH_STYLE_CHECK=OFF | ||
| mkdir output | ||
| make -j `nproc` | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why there are two
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I was told once by @QiJune this is because PaddlePaddle relies on SWIG, instead of a C-API, to expose functionalities to Python. But I don't understand the direct reason between SWIG and two runs of CMake.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Because part of Paddle's Python code is generated by C++ header. Only after we complete compiling PaddlePaddle, Paddle's Python package can be built. And So, generate documentation needs Python package. Python package needs to compile Paddle.
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But why we need to run CMake twice to compile Paddle?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Paddle is using So, we must create If we use C-API to expose Paddle library, then |
||
| find .. -name '*whl' | xargs pip install # install all wheels. | ||
| rm -rf * | ||
| cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_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 -DWITH_GPU=OFF -DWITH_DOC=ON | ||
| make -j `nproc` paddle_docs paddle_docs_cn | ||
|
|
||
| # check websites for broken links | ||
| linkchecker doc/en/html/index.html | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,11 @@ | ||
| #!/bin/bash | ||
| cd `dirname $0` | ||
|
|
||
| if [ ${JOB} == "BUILD_AND_TEST" ]; then | ||
| ./build_and_test.sh | ||
| elif [ ${JOB} == "DOCS" ]; then | ||
| ./docs.sh | ||
| if [ ${JOB} == "DOCS" ]; then | ||
| ./build_doc.sh | ||
| elif [ ${JOB} == "PRE_COMMIT" ]; then | ||
| ./precommit.sh | ||
| ./check_style.sh | ||
| else | ||
| echo Unknown job ${JOB} | ||
| exit 1 | ||
| echo "Unknown Travis CI job: ${JOB}" | ||
| exit 0 # Don't fail due to unknown Travis CI job. | ||
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this file,
JOB=BUILD_AND_TESTshould be removed.