mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-10-01 01:26:01 -04:00
0ff75e7a88
Fixed 2 memory leaks in production code and a few in testcases. As a result leak_check_at_exit ASAN option does not need to turned off for non-gui tests. Smart pointers should be used elsewhere for consistency, but the sooner this fixes are delivered, the lesser memory leaks are introduced.
48 lines
2.1 KiB
YAML
48 lines
2.1 KiB
YAML
language: cpp
|
|
sudo: required
|
|
dist: trusty
|
|
# FIXME : remove when (https://github.com/google/sanitizers/issues/837) is resolved.
|
|
group: deprecated-2017Q3
|
|
services: [docker]
|
|
|
|
os:
|
|
- linux
|
|
# - osx
|
|
|
|
# Define clang compiler without any frills
|
|
compiler:
|
|
- clang
|
|
- gcc
|
|
|
|
env:
|
|
- CONFIG=Release ASAN_OPTIONS=detect_odr_violation=1
|
|
- CONFIG=Debug ASAN_OPTIONS=detect_odr_violation=1
|
|
|
|
git:
|
|
depth: 3
|
|
|
|
before_install:
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq update; fi
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get -qq install cmake libclang-common-3.5-dev libxi-dev qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxtst-dev xvfb libyubikey-dev libykpers-1-dev; fi
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq cmake || brew install cmake; fi
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq qt5 || brew install qt5; fi
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew ls | grep -wq libgcrypt || brew install libgcrypt; fi
|
|
|
|
before_script:
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then CMAKE_ARGS="-DCMAKE_PREFIX_PATH=/usr/local/opt/qt5"; fi
|
|
- mkdir build && pushd build
|
|
|
|
script:
|
|
- cmake -DCMAKE_BUILD_TYPE=${CONFIG} -DWITH_GUI_TESTS=ON -DWITH_ASAN=ON -DWITH_XC_HTTP=ON -DWITH_XC_AUTOTYPE=ON -DWITH_XC_YUBIKEY=ON $CMAKE_ARGS ..
|
|
- make -j2
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make test ARGS+="-E testgui --output-on-failure"; fi
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ASAN_OPTIONS=${ASAN_OPTIONS}:leak_check_at_exit=0 xvfb-run -a --server-args="-screen 0 800x600x24" make test ARGS+="-R testgui --output-on-failure"; fi
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then make test ARGS+="--output-on-failure"; fi
|
|
|
|
# Generate snapcraft build when merging into master/develop branches
|
|
#after_success:
|
|
# - popd
|
|
# - "[[ $DEPLOY = 1 ]] && [[ $CONFIG = Release ]] && [[ $TRAVIS_BRANCH =~ (master|develop) ]] && [[ $TRAVIS_PULL_REQUEST = false ]] \
|
|
# && docker run -v $(pwd):/cwd snapcore/snapcraft sh -c 'cd /cwd && apt update && snapcraft'"
|