Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1788)

Unified Diff: scripts/travis-build.sh

Issue 1873133003: Add travis CI config (Closed) Base URL: https://chromium.googlesource.com/breakpad/breakpad.git@master
Patch Set: Fix review comments Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« .travis.yml ('K') | « .travis.yml ('k') | scripts/travis-checkout.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/travis-build.sh
diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh
new file mode 100755
index 0000000000000000000000000000000000000000..60890deddcf827ea74931122e3bf4abb750c4a13
--- /dev/null
+++ b/scripts/travis-build.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+set -ex
+
+setup_env() {
+ # Travis sets CC/CXX to the system toolchain, so our .travis.yml
+ # exports USE_{CC,CXX} for this script to use.
+ 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.
+ export CC=$USE_CC
+ fi
+ if test -n "$USE_CXX"; then
vapier 2016/04/11 17:13:35 same here
Ted Mielczarek 2016/04/12 10:03:06 Done.
+ export CXX=$USE_CXX
+ fi
+}
+
+build() {
+ ./configure
+ # Use -jN for faster builds. Travis build machines under Docker
+ # have a lot of cores, but resource limits will kill the build
+ # 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.
+ ncpus=$(getconf _NPROCESSORS_ONLN)
+ 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.
+ make -j${jobs} check
+}
+
+main() {
+ setup_env
+ build
+}
+
+main "$@"
« .travis.yml ('K') | « .travis.yml ('k') | scripts/travis-checkout.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698