Skip to content

Commit

Permalink
[travis] Run clad with clang which has asserts enabled.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vgvassilev committed Dec 2, 2019
1 parent 842bdba commit 8f097d1
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 8f097d1

Please sign in to comment.