From 8f097d1f6def91f9f79e96bd4ff787b1e22bc6c3 Mon Sep 17 00:00:00 2001 From: Vassil Vassilev Date: Sun, 1 Dec 2019 14:45:54 +0200 Subject: [PATCH] [travis] Run clad with clang which has asserts enabled. This gives us a great deal of coverage. Clang has well-developed assert system which often can detect malformed AST. This is very essential for clad as until today I would need to run that by hand, locally on every pull request. At the moment we rely on the fact that llvmlab has such clang builds but unfortunately only for OSX. --- .travis.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.travis.yml b/.travis.yml index 407828d27..255683367 100644 --- a/.travis.yml +++ b/.travis.yml @@ -516,6 +516,13 @@ matrix: addons: <<: *addons-9 + - os: osx + env: CLANG_RUNTIME=9 LLVMLAB_CLANG_ASSERTS=clang-r354636-b54157 CXX=clang++ CC=clang + osx_image: xcode9.4 + compiler: clang + addons: + <<: *addons-9 + # Ubuntu, GCC 5 - env: CLANG_RUNTIME=9 CXX=g++-5 CC=gcc compiler: gcc @@ -661,6 +668,16 @@ install: # directory is not owned by the current user and the cache has been disabled. sudo -H pip install lit # LLVM lit is not part of the llvm releases... + # Fetch clang with RelWithDebInfo which is very useful as it has asserts on + # This allows us to verify if clad produces correct AST. + if [ -n "$LLVMLAB_CLANG_ASSERTS" ]; then + git clone https://github.com/llvm-mirror/zorg.git zorg + cd zorg/llvmbisect + sudo python setup.py install + llvmlab fetch clang-stage1-configure-RA $LLVMLAB_CLANG_ASSERTS + export CLANG=$(pwd)/$LLVMLAB_CLANG_ASSERTS + fi + before_script: - cmake --version - $CC --version