Since g++-4.9 has an ICE occasionally in travis add a retry.
authorAndrew Woloszyn <awoloszyn@google.com>
Tue, 19 Jan 2016 21:13:45 +0000 (16:13 -0500)
committerAndrew Woloszyn <awoloszyn@google.com>
Tue, 19 Jan 2016 21:14:47 +0000 (16:14 -0500)
Try to re-run the build with ninja -j 1 if the build fails,
this should reduce the number of build failures we see.

.travis.yml

index 9e3bc5d..67f0486 100644 (file)
@@ -52,7 +52,11 @@ before_script:
 script:
   - mkdir build && cd build
   - cmake -GNinja -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ..
-  - ninja
+    # Sometimes g++-4.9 flakes with an ICE. This may be an OOM thing when
+    # expanding many templates.
+    # If we fail the build the first time, then try to continue in
+    # single-process mode.
+  - ninja || ninja -j 1
   - ./UnitSPIRV --gtest_break_on_failure