Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 #!/bin/sh | |
| 2 | |
| 3 set -ex | |
| 4 | |
| 5 setup_env() { | |
| 6 # Travis sets CC/CXX to the system toolchain, so our .travis.yml | |
| 7 # exports USE_{CC,CXX} for this script to use. | |
| 8 if test -n "$USE_CC"; then | |
|
vapier
2016/04/11 17:13:35
more standard imo is to use [ instead of test
if
Ted Mielczarek
2016/04/12 10:03:06
Done.
| |
| 9 export CC=$USE_CC | |
| 10 fi | |
| 11 if test -n "$USE_CXX"; then | |
|
vapier
2016/04/11 17:13:35
same here
Ted Mielczarek
2016/04/12 10:03:06
Done.
| |
| 12 export CXX=$USE_CXX | |
| 13 fi | |
| 14 } | |
| 15 | |
| 16 build() { | |
| 17 ./configure | |
| 18 # Use -jN for faster builds. Travis build machines under Docker | |
| 19 # have a lot of cores, but resource limits will kill the build | |
| 20 # if we try to use them all, so use at most 4. | |
|
vapier
2016/04/11 17:13:35
you should reference this report:
https://github.
Ted Mielczarek
2016/04/11 17:30:17
Yeah, I understood the root cause, I may have just
Ted Mielczarek
2016/04/12 10:03:06
Done.
| |
| 21 ncpus=$(getconf _NPROCESSORS_ONLN) | |
| 22 jobs=$(($ncpus<4?$ncpus:4)) | |
|
vapier
2016/04/11 17:13:35
there's no need to omit spaces ... that just makes
Ted Mielczarek
2016/04/12 10:03:06
Done.
| |
| 23 make -j${jobs} check | |
| 24 } | |
| 25 | |
| 26 main() { | |
| 27 setup_env | |
| 28 build | |
| 29 } | |
| 30 | |
| 31 main "$@" | |
| OLD | NEW |