From 6405ac77fd07f42e7e26f90eea6916c0c9c8792e Mon Sep 17 00:00:00 2001 From: Seo Sanghyeon Date: Sat, 4 Jun 2016 16:19:05 +0900 Subject: [PATCH] Do out-of-tree build on Travis --- .travis.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87197a37f1d49..8f185187e9319 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,18 +3,25 @@ sudo: required services: - docker -# LLVM takes awhile to check out and otherwise we'll manage the submodules in -# our configure script, so disable auto submodule management. +# LLVM takes awhile to check out and otherwise we'll manage the submodules +# ourselves, so disable auto submodule management. git: submodules: false +# We want to mount source directory read-only to test out-of-tree build. +# This means configure can't manage submodules, so we do it here. before_install: + - git submodule init + - git submodule deinit src/llvm + - git submodule update - docker build -t rust -f src/etc/Dockerfile src/etc script: - - docker run -v `pwd`:/build rust + - docker run -v `pwd`:/src:ro rust sh -c " - ./configure --llvm-root=/usr/lib/llvm-3.7 && + /src/configure + --llvm-root=/usr/lib/llvm-3.7 + --disable-manage-submodules && make tidy && make check-notidy -j4 "