aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.appveyor.yml13
-rw-r--r--.travis.yml40
-rw-r--r--.valgrind.qmc-example.supp110
3 files changed, 41 insertions, 122 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
index 725adc8c..701028af 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -1,7 +1,7 @@
image: Visual Studio 2017
environment:
- #DEPLOY_DIR: quotient-%APPVEYOR_BUILD_VERSION%
+ CMAKE_ARGS: '-G "NMake Makefiles JOM" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo'
matrix:
- QTDIR: C:\Qt\5.13\msvc2017_64
VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat"
@@ -19,17 +19,14 @@ init:
before_build:
- git submodule update --init --recursive
- git clone https://gitlab.matrix.org/matrix-org/olm.git
-- cd olm
-- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install
-- cmake --build build
-- cmake --build build --target install
-- cd ..
-- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" -DOlm_DIR="olm/install/lib/cmake/Olm"
+- cmake %CMAKE_ARGS% -Holm -Bbuild/olm
+- cmake --build build/olm
build_script:
+- cmake %CMAKE_ARGS% -H. -Bbuild "-DOlm_DIR=build/olm"
- cmake --build build
# qmake uses olm just built by CMake - it can't build olm on its own.
-- qmake "INCLUDEPATH += olm/install/include" "LIBS += -Lbuild" "LIBS += -Lolm/install/lib" && jom
+- qmake "INCLUDEPATH += olm/include" "LIBS += -Lbuild" "LIBS += -Lbuild/olm" && jom
#after_build:
#- cmake --build build --target install
diff --git a/.travis.yml b/.travis.yml
index 68118423..3f6aa27d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -19,6 +19,17 @@ addons:
- qtmultimedia5-dev
- valgrind
+env:
+ global:
+ - DESTDIR="$TRAVIS_BUILD_DIR/install"
+ - CMAKE_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=$DESTDIR/usr"
+ - VALGRIND_OPTIONS="--tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=.valgrind.qmc-example.supp"
+ # RPM spec-style: swallow a command with default parameters into a variable
+ # and add/override parameters further in the code if/as necessary
+ - _CMAKE_CONFIG="cmake $CMAKE_ARGS . -Bbuild"
+ - _CMAKE_BUILD="cmake --build build"
+ - _CMAKE_BUILD_INSTALL="$_CMAKE_BUILD --target install"
+
matrix:
include:
- os: linux
@@ -36,42 +47,37 @@ matrix:
before_install:
- eval "${ENV_EVAL}"
-- if [ "$TRAVIS_OS_NAME" = "linux" ]; then USE_NINJA="-GNinja"; fi
+- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CMAKE_ARGS="$CMAKE_ARGS -GNinja"; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then VALGRIND="valgrind $VALGRIND_OPTIONS"; fi
install:
- git clone https://gitlab.matrix.org/matrix-org/olm.git
- pushd olm
-- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX=install
-- cmake --build build
-- cmake --build build --target install
+- $_CMAKE_CONFIG
+- $_CMAKE_BUILD
+#- $_CMAKE_BUILD_INSTALL
- popd
- git clone https://github.com/quotient-im/matrix-doc.git
- git clone --recursive https://github.com/KitsuneRal/gtad.git
- pushd gtad
-- cmake $USE_NINJA -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} .
+- cmake $CMAKE_ARGS .
- cmake --build .
- popd
before_script:
-- mkdir build && pushd build
-- cmake $USE_NINJA -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" -DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_PREFIX=../install -DOlm_DIR=../olm/install/lib/cmake/Olm ..
-- cmake --build . --target update-api
-- popd
+- $_CMAKE_CONFIG -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" -DOlm_DIR=olm/build
+- $_CMAKE_BUILD --target update-api
script:
-- cmake --build build --target all
-- cmake --build build --target install
+- $_CMAKE_BUILD_INSTALL
# Build qmc-example with the installed library
-- mkdir build-example && pushd build-example
-- cmake -DCMAKE_PREFIX_PATH=../install -DOlm_DIR=../olm/install/lib/cmake/Olm ../examples
-- cmake --build . --target all
-- popd
+- cmake $CMAKE_ARGS examples -Bbuild-example -DOlm_DIR=olm/build
+- cmake --build build-example --target all
# Build with qmake
-- qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/lib" "LIBS += -Lolm/install/lib"
+- qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/lib" "LIBS += -Lolm/build"
- make all
# Run the qmake-compiled qmc-example under valgrind
-- if [ "$QMC_TEST_USER" != "" ]; then LD_LIBRARY_PATH="build/lib" $VALGRIND ./qmc-example "$QMC_TEST_USER" "$QMC_TEST_PWD" qmc-example-travis '#qmc-test:matrix.org' "Travis CI job $TRAVIS_JOB_NUMBER"; fi
+- if [ "$QMC_TEST_USER" != "" ]; then LD_LIBRARY_PATH="olm/build" $VALGRIND ./qmc-example "$QMC_TEST_USER" "$QMC_TEST_PWD" qmc-example-travis '#qmc-test:matrix.org' "Travis CI job $TRAVIS_JOB_NUMBER"; fi
notifications:
webhooks:
diff --git a/.valgrind.qmc-example.supp b/.valgrind.qmc-example.supp
index 6f0bf60a..d65fb52e 100644
--- a/.valgrind.qmc-example.supp
+++ b/.valgrind.qmc-example.supp
@@ -9,27 +9,6 @@
}
{
- sendPostedEvents1
- Memcheck:Leak
- match-leak-kinds: possible
- fun:_Znwm
- fun:_ZN15QtSharedPointer20ExternalRefCountData9getAndRefEPK7QObject
- obj:/opt/qt56/lib/libQt5Network.so.*
-}
-
-{
- sendPostedEvents3
- Memcheck:Leak
- ...
- obj:/opt/qt56/lib/libQt5Network.so.*
- fun:_ZN7QObject5eventEP6QEvent
- fun:_ZN16QCoreApplication6notifyEP7QObjectP6QEvent
- fun:_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent
- fun:_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
- obj:/opt/qt56/lib/libQt5Core.so.*
-}
-
-{
QAuthenticator
Memcheck:Leak
match-leak-kinds: possible
@@ -38,24 +17,6 @@
}
{
- QObject_connect
- Memcheck:Leak
- match-leak-kinds: possible
- ...
- obj:/opt/qt56/lib/libQt5Core.so.*
- fun:_ZN7QObject7connectEPKS_PKcS1_S3_N2Qt14ConnectionTypeE
-}
-
-{
- QNetworkProxy
- Memcheck:Leak
- match-leak-kinds: possible
- fun:_Znwm
- fun:_ZN13QNetworkProxyC1ENS_9ProxyTypeERK7QStringtS3_S3_
- obj:/opt/qt56/lib/libQt5Network.so.*
-}
-
-{
QTimer
Memcheck:Leak
match-leak-kinds: possible
@@ -74,46 +35,6 @@
}
{
- sendPostedEvents6
- Memcheck:Leak
- match-leak-kinds: possible
- fun:_Znwm
- ...
- obj:/opt/qt56/lib/libQt5Network.so.*
- fun:_ZN7QObject5eventEP6QEvent
- fun:_ZN16QCoreApplication6notifyEP7QObjectP6QEvent
- fun:_ZN16QCoreApplication15notifyInternal2EP7QObjectP6QEvent
- fun:_ZN23QCoreApplicationPrivate16sendPostedEventsEP7QObjectiP11QThreadData
-}
-
-{
- QMetaObject_activate_in_QtNetwork
- Memcheck:Leak
- match-leak-kinds: possible
- fun:_Znwm
- ...
- obj:/opt/qt56/lib/libQt5Network.so.*
- fun:_ZN11QMetaObject8activateEP7QObjectiiPPv
-}
-
-{
- QMapDatabase_from_QtNetwork
- Memcheck:Leak
- match-leak-kinds: possible
- fun:_Znwm
- fun:_ZN12QMapDataBase10createDataEv
- obj:/opt/qt56/lib/libQt5Network.so.*
-}
-
-{
- QThread
- Memcheck:Leak
- match-leak-kinds: possible
- ...
- fun:_ZN7QThread5startENS_8PriorityE
-}
-
-{
libcrypto_ASN1
Memcheck:Leak
match-leak-kinds: definite
@@ -123,30 +44,25 @@
}
{
- QObject_from_QtNetwork
- Memcheck:Leak
- match-leak-kinds: possible
- fun:_Znwm
- fun:_ZN7QObjectC1EPS_
- obj:/opt/qt56/lib/libQt5Network.so.*
-}
-
-{
- array_new_from_QtNetwork
+ malloc_from_libcrypto
Memcheck:Leak
match-leak-kinds: possible
- fun:_Znam
- obj:/opt/qt56/lib/libQt5Network.so.*
+ fun:malloc
+ fun:CRYPTO_malloc
+ ...
+ obj:/lib/x86_64-linux-gnu/libcrypto.so.*
}
{
- malloc_from_libcrypto
+ Slot_activation_from_QtNetwork
Memcheck:Leak
- match-leak-kinds: possible
+ match-leak-kinds: definite
fun:malloc
- fun:CRYPTO_malloc
+ fun:inflateInit2_
+ obj:/*/*/*/libQt5Network.so.*
...
- obj:/lib/x86_64-linux-gnu/libcrypto.so.1.0.0
+ fun:_ZN11QMetaObject8activateEP7QObjectiiPPv
...
- obj:/opt/qt56/lib/libQt5Network.so.*
-}
+ fun:_ZN11QMetaObject8activateEP7QObjectiiPPv
+ obj:/*/*/*/libQt5Network.so.*
+} \ No newline at end of file