mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-09-08 12:01:54 -04:00
122 lines
3.1 KiB
YAML
122 lines
3.1 KiB
YAML
# Copyright (c) 2012-2020 Sebastien Rombauts (sebastien.rombauts@gmail.com)
|
|
|
|
language: cpp
|
|
sudo: false
|
|
|
|
# Use Linux unless specified otherwise
|
|
os: linux
|
|
|
|
cache:
|
|
apt: true
|
|
|
|
matrix:
|
|
include:
|
|
|
|
##########################################################################
|
|
# GCC on Linux
|
|
##########################################################################
|
|
|
|
# GCC Debug build with GCov for coverage build
|
|
- dist: bionic
|
|
env:
|
|
- cc=gcc cxx=g++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON GCOV=ON
|
|
- COVERALLS=true
|
|
|
|
# GCC Debug build with Valgrind instead of Address Sanitizer
|
|
- dist: bionic
|
|
env:
|
|
- cc=gcc cxx=g++
|
|
- BUILD_TYPE=Debug
|
|
- VALGRIND=true
|
|
|
|
# GCC Release build
|
|
- dist: bionic
|
|
env:
|
|
- cc=gcc cxx=g++
|
|
- BUILD_TYPE=Release
|
|
|
|
- dist: xenial
|
|
env:
|
|
- cc=gcc cxx=g++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON
|
|
|
|
- dist: trusty
|
|
env:
|
|
- cc=gcc cxx=g++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON
|
|
|
|
##########################################################################
|
|
# Clang on Linux
|
|
##########################################################################
|
|
|
|
- dist: bionic
|
|
env:
|
|
- cc=clang cxx=clang++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON
|
|
|
|
- dist: xenial
|
|
env:
|
|
- cc=clang cxx=clang++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON
|
|
|
|
- dist: trusty
|
|
env:
|
|
- cc=clang cxx=clang++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON
|
|
|
|
##########################################################################
|
|
# Clang on OSX
|
|
##########################################################################
|
|
|
|
# Latest XCode
|
|
- os: osx
|
|
env:
|
|
- cc=clang cxx=clang++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON
|
|
|
|
# XCode 8.3
|
|
- os: osx
|
|
osx_image: xcode8.3
|
|
env:
|
|
- cc=clang cxx=clang++
|
|
- BUILD_TYPE=Debug
|
|
- ASAN=ON
|
|
|
|
before_install:
|
|
# Set the compiler environment variables properly
|
|
- export CC=${cc}
|
|
- export CXX=${cxx}
|
|
- ${CC} --version
|
|
- ${CXX} --version
|
|
- if [[ "$VALGRIND" == "true" ]]; then sudo apt-get install -qq valgrind ; fi
|
|
|
|
install:
|
|
# coveralls test coverage:
|
|
- if [[ "$COVERALLS" == "true" ]]; then pip install --user cpp-coveralls ; fi
|
|
|
|
# scripts to run before build
|
|
before_script:
|
|
- mkdir build
|
|
- cd build
|
|
- cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DSQLITECPP_USE_ASAN=$ASAN -DSQLITECPP_USE_GCOV=$GCOV -DSQLITECPP_BUILD_EXAMPLES=ON -DSQLITECPP_BUILD_TESTS=ON ..
|
|
|
|
# build examples, and run tests (ie make & make test)
|
|
script:
|
|
- cmake --build .
|
|
- export ASAN_OPTIONS=verbosity=1:debug=1
|
|
- ctest --verbose --output-on-failure
|
|
- if [[ "$VALGRIND" == "true" ]]; then valgrind --leak-check=full --error-exitcode=1 ./SQLiteCpp_example1 ; fi
|
|
- if [[ "$VALGRIND" == "true" ]]; then valgrind --leak-check=full --error-exitcode=1 ./SQLiteCpp_tests ; fi
|
|
|
|
# generate and publish GCov coveralls results
|
|
after_success:
|
|
- if [[ "$COVERALLS" == "true" ]]; then coveralls --root .. -e examples -e googletest -e sqlite3 -e tests -E ".*feature_tests.*" -E ".*CompilerId.*" --gcov-options '\-lp' ; fi
|