From dec7cbb2abcd454d925f0aa71abb3590af48d644 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Sat, 19 Dec 2015 21:19:52 +0000 Subject: [PATCH 1/2] Updated the LLVM build script to work with Vagrant. --- build/scripts/LLVM.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/build/scripts/LLVM.lua b/build/scripts/LLVM.lua index 2b9d5661..b947f155 100644 --- a/build/scripts/LLVM.lua +++ b/build/scripts/LLVM.lua @@ -7,7 +7,7 @@ local llvm = basedir .. "/../deps/llvm" -- If we are inside vagrant then clone and build LLVM outside the shared folder, -- otherwise file I/O performance will be terrible. if is_vagrant() then - llvm = "~/llvm" + llvm = os.getenv("HOME") .. "/llvm" end local llvm_build = llvm .. "/" .. os.get() @@ -90,9 +90,14 @@ function cmake(gen, conf, options) local cwd = os.getcwd() os.chdir(llvm_build) local cmd = "cmake -G " .. '"' .. gen .. '"' - .. ' -DCLANG_BUILD_EXAMPLES=false -DCLANG_INCLUDE_DOCS=false -DCLANG_INCLUDE_TESTS=false' - .. ' -DCLANG_ENABLE_ARCMT=false -DCLANG_ENABLE_REWRITER=false -DCLANG_ENABLE_STATIC_ANALYZER=false' - .. ' -DLLVM_INCLUDE_EXAMPLES=false -DLLVM_INCLUDE_DOCS=false -DLLVM_INCLUDE_TESTS=false' + .. ' -DCLANG_BUILD_EXAMPLES=false ' + .. ' -DCLANG_INCLUDE_DOCS=false ' + .. ' -DCLANG_INCLUDE_TESTS=false' + .. ' -DCLANG_ENABLE_ARCMT=false' + .. ' -DCLANG_ENABLE_STATIC_ANALYZER=false' + .. ' -DLLVM_INCLUDE_EXAMPLES=false ' + .. ' -DLLVM_INCLUDE_DOCS=false ' + .. ' -DLLVM_INCLUDE_TESTS=false' .. ' -DLLVM_TOOL_BUGPOINT_BUILD=false' .. ' -DLLVM_TOOL_BUGPOINT_PASSES_BUILD=false' .. ' -DLLVM_TOOL_CLANG_TOOLS_EXTRA_BUILD=false' @@ -163,7 +168,7 @@ function cmake(gen, conf, options) end function clean_llvm(llvm_build) - if os.isdir(llvm_build) then os.rmdir(llvm_build) end + if os.isdir(llvm_build) then os.rmdir(llvm_build) end os.mkdir(llvm_build) end From 9dc44ebac10582b9b916b76c9198c685cee8e383 Mon Sep 17 00:00:00 2001 From: Joao Matos Date: Sat, 19 Dec 2015 21:53:25 +0000 Subject: [PATCH 2/2] Run the Travis build as one large command. Travis doesn't stop running script commands after the first one fails --- .travis.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0c5653a5..6dbe403c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,15 +30,14 @@ install: - if [ "$TRAVIS_OS_NAME" = "linux" ]; then PREMAKE=build/premake5-linux-64; else PREMAKE=build/premake5-osx; fi - $PREMAKE --file=build/scripts/LLVM.lua download_llvm -script: - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then PREMAKE=build/premake5-linux-64; else PREMAKE=build/premake5-osx; fi - - if [ "$TRAVIS_OS_NAME" = "linux" ]; then BUILD_CONF=release_x64; else BUILD_CONF=release_x32; fi - - $PREMAKE --file=build/premake4.lua gmake - - config=$BUILD_CONF make -C build/gmake/ - # HACK - work around the native libNamespacesDerived being unable to find its dependency - - BUILD_DIR=`ls build/gmake/lib` - - mkdir -p "$PWD"/build/gmake/lib/lib/"$BUILD_DIR" - - cp "$PWD"/build/gmake/lib/"$BUILD_DIR"/libNamespacesBase.* "$PWD"/build/gmake/lib/lib/"$BUILD_DIR" - - TEST_RESULT=0 - - for test in build/gmake/lib/Release_*/*.Tests.*.dll; do MONO_PATH=deps/NUnit.Runners.2.6.4/tools mono deps/NUnit.Runners.2.6.4/tools/nunit-console.exe -nologo $test || TEST_RESULT=$?; done - - exit "$TEST_RESULT" +script: | + if [ "$TRAVIS_OS_NAME" = "linux" ]; then PREMAKE=build/premake5-linux-64; else PREMAKE=build/premake5-osx; fi && + if [ "$TRAVIS_OS_NAME" = "linux" ]; then BUILD_CONF=release_x64; else BUILD_CONF=release_x32; fi && + $PREMAKE --file=build/premake4.lua gmake && + config=$BUILD_CONF make -C build/gmake/ && + BUILD_DIR=`ls build/gmake/lib` && + mkdir -p "$PWD"/build/gmake/lib/lib/"$BUILD_DIR" && + cp "$PWD"/build/gmake/lib/"$BUILD_DIR"/libNamespacesBase.* "$PWD"/build/gmake/lib/lib/"$BUILD_DIR" && + TEST_RESULT=0 && + for test in build/gmake/lib/Release_*/*.Tests.*.dll; do MONO_PATH=deps/NUnit.Runners.2.6.4/tools mono deps/NUnit.Runners.2.6.4/tools/nunit-console.exe -nologo $test || TEST_RESULT=$?; done && + exit "$TEST_RESULT"