Przeglądaj źródła

speed up bazel build

donghuixu 6 lat temu
rodzic
commit
a30f552c64
1 zmienionych plików z 4 dodań i 4 usunięć
  1. 4 4
      build_in_travis_ci.sh

+ 4 - 4
build_in_travis_ci.sh

@@ -22,11 +22,11 @@ runcmd(){
 echo "build combination: PURPOSE=$PURPOSE CXX=$CXX CC=$CC"
 
 if [ "$PURPOSE" = "compile-with-bazel" ]; then
-    runcmd "bazel build -c opt --copt -DHAVE_ZLIB=1 //..."
-    runcmd "bazel test -c opt --copt -DHAVE_ZLIB=1 --define=unittest=true //..."
+    runcmd "bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 //..."
+    runcmd "bazel test -j 12 -c opt --copt -DHAVE_ZLIB=1 --define=unittest=true //..."
     # Build with glog
-    runcmd "bazel build  -c opt --copt -DHAVE_ZLIB=1 --define=with_glog=true //..."
-    runcmd "bazel test -c opt --copt -DHAVE_ZLIB=1 --define=with_glog=true  --define=unittest=true //..."
+    runcmd "bazel build -j 12 -c opt --copt -DHAVE_ZLIB=1 --define=with_glog=true //..."
+    runcmd "bazel test -j 12 -c opt --copt -DHAVE_ZLIB=1 --define=with_glog=true  --define=unittest=true //..."
     exit 0
 fi