]> git.lizzy.rs Git - rust.git/commitdiff
Add a CI job for parallel rustc using x.py check
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Sat, 17 Mar 2018 21:17:33 +0000 (22:17 +0100)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Sun, 18 Mar 2018 16:04:50 +0000 (17:04 +0100)
config.toml.example
src/bootstrap/configure.py
src/ci/docker/x86_64-gnu-debug/Dockerfile
src/ci/run.sh

index b47f9163c0dacf7a08a9f93cc46f833e1db078cf..86ddefefb43bc4aa7dad754150a2e4a22c8a27b7 100644 (file)
 # Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
 #backtrace = true
 
+# Build rustc with experimental parallelization
+#experimental-parallel-queries = false
+
 # The default linker that will be hard-coded into the generated compiler for
 # targets that don't specify linker explicitly in their target specifications.
 # Note that this is not the linker used to link said compiler.
index 97da7cae07f7c6e9aa99810121584496f5484791..a5c373d5d5e7729ad118615fc0395f33641f1e2c 100755 (executable)
@@ -44,6 +44,7 @@ o("debug", "rust.debug", "debug mode; disables optimization unless `--enable-opt
 o("docs", "build.docs", "build standard library documentation")
 o("compiler-docs", "build.compiler-docs", "build compiler documentation")
 o("optimize-tests", "rust.optimize-tests", "build tests with optimizations")
+o("experimental-parallel-queries", "rust.experimental-parallel-queries", "build rustc with experimental parallelization")
 o("test-miri", "rust.test-miri", "run miri's test suite")
 o("debuginfo-tests", "rust.debuginfo-tests", "build tests with debugger metadata")
 o("quiet-tests", "rust.quiet-tests", "enable quieter output when running tests")
index 95d41028595f83979f5d5f5475c9241ff92a44d4..ff6ab1013b4c22352c7ef29673099d5ca2755663 100644 (file)
@@ -16,6 +16,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
 COPY scripts/sccache.sh /scripts/
 RUN sh /scripts/sccache.sh
 
+ENV PARALLEL_CHECK 1
 ENV RUST_CONFIGURE_ARGS \
       --build=x86_64-unknown-linux-gnu \
       --enable-debug \
index e3f38e4834a92dcf86643532ed9df5930b66fa87..7fc2a963640b146ac375a38c98c79f9802fff128 100755 (executable)
@@ -72,6 +72,13 @@ fi
 # sccache server at the start of the build, but no need to worry if this fails.
 SCCACHE_IDLE_TIMEOUT=10800 sccache --start-server || true
 
+if [ "$PARALLEL_CHECK" != "" ]; then
+  $SRC/configure --enable-experimental-parallel-queries
+  python2.7 ../x.py check
+  rm -f config.toml
+  rm -rf build
+fi
+
 travis_fold start configure
 travis_time_start
 $SRC/configure $RUST_CONFIGURE_ARGS