diff --git a/.travis.yml b/.travis.yml index 37599a5abaa4..fa5dfe3a9ea4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,18 @@ matrix: # Documentation - env: BUILD=Doc sudo: required + # make sure the fuzzers still build ok + - env: COMPILER=clang++-6.0 BUILD=Debug STANDARD=14 ENABLE_FUZZING=1 + compiler: clang + addons: + apt: + update: true + packages: + - clang-6.0 + sources: + - ubuntu-toolchain-r-test + - llvm-toolchain-trusty + - llvm-toolchain-trusty-6.0 # g++ 6 on Linux with C++14 - env: COMPILER=g++-6 BUILD=Debug STANDARD=14 compiler: gcc diff --git a/support/travis-build.py b/support/travis-build.py index d71a7ae6cb4e..669bb71d8c88 100755 --- a/support/travis-build.py +++ b/support/travis-build.py @@ -83,19 +83,24 @@ def install_dependencies(): build_dir = os.path.join(fmt_dir, "_build") test_build_dir = os.path.join(fmt_dir, "_build_test") -# Configure library. +# Configure the library. makedirs_if_not_exist(build_dir) cmake_flags = [ '-DCMAKE_INSTALL_PREFIX=' + install_dir, '-DCMAKE_BUILD_TYPE=' + build, '-DCMAKE_CXX_STANDARD=' + standard ] + +# make sure the fuzzers still compile +if 'ENABLE_FUZZING' in os.environ: + cmake_flags += ['-DFMT_FUZZ=ON', '-DFMT_FUZZ_LINKMAIN=On'] + check_call(['cmake', '-DFMT_DOC=OFF', '-DFMT_PEDANTIC=ON', '-DFMT_WERROR=ON', fmt_dir] + cmake_flags, cwd=build_dir) -# Build library. -check_call(['make', '-j4'], cwd=build_dir) +# Build the library. +check_call(['cmake', '--build','.'], cwd=build_dir) -# Test library. +# Test the library. env = os.environ.copy() env['CTEST_OUTPUT_ON_FAILURE'] = '1' if call(['make', 'test'], env=env, cwd=build_dir): @@ -103,7 +108,7 @@ def install_dependencies(): print(f.read()) sys.exit(-1) -# Install library. +# Install the library. check_call(['make', 'install'], cwd=build_dir) # Test installation.