From b5f9e1bd20f985c18ec630fa496510018547b728 Mon Sep 17 00:00:00 2001 From: Alexey Andreyev Date: Wed, 26 Jun 2019 16:36:45 +0300 Subject: Change libQtOlm location. Fix .travis.yml and .appveyor.yml --- .appveyor.yml | 3 +++ 1 file changed, 3 insertions(+) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 410ad12e..fb5903c1 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -26,6 +26,9 @@ init: before_build: - git submodule update --init --recursive +- cd 3rdparty/libQtOlm +- git clone https://gitlab.matrix.org/matrix-org/olm.git +- cd ../.. - if %MAKETOOL% == cmake cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" build_script: -- cgit v1.2.3 From a4d1acb8e9e3f101c891f9089a07e214e5cc55f8 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 6 Jul 2019 21:03:13 +0900 Subject: .appveyor.yml: stick with static libs --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index fb5903c1..8831b2e3 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -29,7 +29,7 @@ before_build: - cd 3rdparty/libQtOlm - git clone https://gitlab.matrix.org/matrix-org/olm.git - cd ../.. -- if %MAKETOOL% == cmake cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" +- if %MAKETOOL% == cmake cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" build_script: - if %MAKETOOL% == cmake cmake --build build -- cgit v1.2.3 From d5b4e6440dae82eebc86657dd2f828edaf81b180 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 7 Jul 2019 09:22:14 +0900 Subject: Fix qmake builds in CI --- .appveyor.yml | 14 ++++---------- .travis.yml | 4 ++-- libqmatrixclient.pri | 2 ++ 3 files changed, 8 insertions(+), 12 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 8831b2e3..4e2d4b5d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,16 +7,9 @@ environment: QTDIR: C:\Qt\5.9\msvc2017_64 VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" PLATFORM: - MAKETOOL: cmake - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - QTDIR: C:\Qt\5.9\msvc2017_64 - VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" - PLATFORM: - MAKETOOL: qmake - QTDIR: C:\Qt\5.9\msvc2015 VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" PLATFORM: x86 - MAKETOOL: cmake init: - call "%QTDIR%\bin\qtenv2.bat" @@ -29,11 +22,12 @@ before_build: - cd 3rdparty/libQtOlm - git clone https://gitlab.matrix.org/matrix-org/olm.git - cd ../.. -- if %MAKETOOL% == cmake cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" +- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" build_script: -- if %MAKETOOL% == cmake cmake --build build -- if %MAKETOOL% == qmake qmake && jom +- cmake --build build +# qmake uses olm just built by CMake - it can't build olm on its own. +- qmake "INCLUDEPATH += 3rdparty/libQtOlm/olm/include" "LIBS += -Lbuild" && jom #after_build: #- cmake --build build --target install diff --git a/.travis.yml b/.travis.yml index 4654f60c..79d5d0e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -57,8 +57,8 @@ script: - cmake -DCMAKE_PREFIX_PATH=../install ../examples - cmake --build . --target all - popd -# Build and install with qmake -- qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" +# Build with qmake +- qmake qmc-example.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" "INCLUDEPATH += 3rdparty/libQtOlm/olm/include" "LIBS += -Lbuild/lib" - make all # Run the qmake-compiled qmc-example under valgrind - if [ "$QMC_TEST_USER" != "" ]; then $VALGRIND ./qmc-example "$QMC_TEST_USER" "$QMC_TEST_PWD" qmc-example-travis '#qmc-test:matrix.org' "Travis CI job $TRAVIS_JOB_NUMBER"; fi diff --git a/libqmatrixclient.pri b/libqmatrixclient.pri index dfd45c04..c561a415 100644 --- a/libqmatrixclient.pri +++ b/libqmatrixclient.pri @@ -7,6 +7,8 @@ win32-msvc* { QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter } +include(3rdparty/libQtOlm/libQtOlm.pri) + SRCPATH = $$PWD/lib INCLUDEPATH += $$SRCPATH -- cgit v1.2.3 From 5d9016c865c0f5eafbc4e2fe24438447c8896e4a Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Mon, 15 Jul 2019 21:33:01 +0900 Subject: .appveyor.yml: Switch to Qt 5.12; no more Visual Studio 2015 builds --- .appveyor.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 4e2d4b5d..f596b856 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,14 +1,13 @@ -image: Visual Studio 2015 +image: Visual Studio 2017 environment: #DEPLOY_DIR: libqmatrixclient-%APPVEYOR_BUILD_VERSION% matrix: - - APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017 - QTDIR: C:\Qt\5.9\msvc2017_64 + - QTDIR: C:\Qt\5.12\msvc2017_64 VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" PLATFORM: - - QTDIR: C:\Qt\5.9\msvc2015 - VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" + - QTDIR: C:\Qt\5.12\msvc2017 + VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat" PLATFORM: x86 init: -- cgit v1.2.3 From 0c425aedbf3729941e40b1606a7c54169b84cf97 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 11 Aug 2019 09:31:59 +0900 Subject: Cleanup [skip ci] --- .appveyor.yml | 2 +- lib/events/accountdataevents.h | 2 +- lib/events/encryptedevent.cpp | 2 +- lib/events/encryptionevent.cpp | 2 +- lib/events/reactionevent.cpp | 2 +- lib/networksettings.h | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index f596b856..76f6b70f 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -13,7 +13,7 @@ environment: init: - call "%QTDIR%\bin\qtenv2.bat" - set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% -- call "%VCVARS%" %platform% +- call "%VCVARS%" %PLATFORM% - cd /D "%APPVEYOR_BUILD_FOLDER%" before_build: diff --git a/lib/events/accountdataevents.h b/lib/events/accountdataevents.h index 600fa5be..68392a32 100644 --- a/lib/events/accountdataevents.h +++ b/lib/events/accountdataevents.h @@ -48,7 +48,7 @@ struct JsonObjectConverter { static void fillFrom(const QJsonObject& jo, TagRecord& rec) { // Parse a float both from JSON double and JSON string because - // libqmatrixclient previously used to use strings to store order. + // the library previously used to use strings to store order. const auto orderJv = jo.value("order"_ls); if (orderJv.isDouble()) rec.order = fromJson(orderJv); diff --git a/lib/events/encryptedevent.cpp b/lib/events/encryptedevent.cpp index dac245fa..b5cedc69 100644 --- a/lib/events/encryptedevent.cpp +++ b/lib/events/encryptedevent.cpp @@ -2,7 +2,7 @@ #include "room.h" -using namespace QMatrixClient; +using namespace Quotient; using namespace QtOlm; EncryptedEvent::EncryptedEvent(const QJsonObject& ciphertext, diff --git a/lib/events/encryptionevent.cpp b/lib/events/encryptionevent.cpp index 945e6696..073303b0 100644 --- a/lib/events/encryptionevent.cpp +++ b/lib/events/encryptionevent.cpp @@ -30,7 +30,7 @@ struct JsonConverter { return EncryptionType::Undefined; } }; -} // namespace QMatrixClient +} // namespace Quotient using namespace Quotient; diff --git a/lib/events/reactionevent.cpp b/lib/events/reactionevent.cpp index df8910fe..003c8ead 100644 --- a/lib/events/reactionevent.cpp +++ b/lib/events/reactionevent.cpp @@ -18,7 +18,7 @@ #include "reactionevent.h" -using namespace QMatrixClient; +using namespace Quotient; void JsonObjectConverter::dumpTo( QJsonObject& jo, const EventRelation& pod) diff --git a/lib/networksettings.h b/lib/networksettings.h index a82a44d0..a6a13f93 100644 --- a/lib/networksettings.h +++ b/lib/networksettings.h @@ -40,4 +40,4 @@ public: Q_INVOKABLE void setupApplicationProxy() const; }; -} // namespace QMatrixClient +} // namespace Quotient -- cgit v1.2.3 From 35d9c4dd6743d706ed9382c021923ef790e7c446 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 11 Aug 2019 15:47:10 +0900 Subject: Configure MSVC warnings in CMakeLists.txt; build in AppVeyor with Qt 5.13 --- .appveyor.yml | 6 +++--- CMakeLists.txt | 16 ++++++++++------ 2 files changed, 13 insertions(+), 9 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 76f6b70f..1dbdf237 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,10 +3,10 @@ image: Visual Studio 2017 environment: #DEPLOY_DIR: libqmatrixclient-%APPVEYOR_BUILD_VERSION% matrix: - - QTDIR: C:\Qt\5.12\msvc2017_64 + - QTDIR: C:\Qt\5.13\msvc2017_64 VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" PLATFORM: - - QTDIR: C:\Qt\5.12\msvc2017 + - QTDIR: C:\Qt\5.13\msvc2017 VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat" PLATFORM: x86 @@ -21,7 +21,7 @@ before_build: - cd 3rdparty/libQtOlm - git clone https://gitlab.matrix.org/matrix-org/olm.git - cd ../.. -- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DCMAKE_CXX_FLAGS="/EHsc /W3" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" +- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" build_script: - cmake --build build diff --git a/CMakeLists.txt b/CMakeLists.txt index d0ce98a6..d90b2d88 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,12 +36,16 @@ endif() set(CMAKE_CXX_STANDARD 17) -foreach (FLAG all "" pedantic extra error=return-type no-unused-parameter no-gnu-zero-variadic-macro-arguments) - CHECK_CXX_COMPILER_FLAG("-W${FLAG}" WARN_${FLAG}_SUPPORTED) - if ( WARN_${FLAG}_SUPPORTED AND NOT CMAKE_CXX_FLAGS MATCHES "(^| )-W?${FLAG}($| )") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -W${FLAG}") - endif () -endforeach () +if (MSVC) + add_compile_options(/EHsc /W4) +else() + foreach (FLAG all "" pedantic extra error=return-type no-unused-parameter no-gnu-zero-variadic-macro-arguments) + CHECK_CXX_COMPILER_FLAG("-W${FLAG}" WARN_${FLAG}_SUPPORTED) + if ( WARN_${FLAG}_SUPPORTED AND NOT CMAKE_CXX_FLAGS MATCHES "(^| )-W?${FLAG}($| )") + add_compile_options(-W${FLAG}) + endif () + endforeach () +endif() find_package(Qt5 5.9 REQUIRED Network Gui Multimedia) get_filename_component(Qt5_Prefix "${Qt5_DIR}/../../../.." ABSOLUTE) -- cgit v1.2.3 From e454cee984b97d178a8c1d272431d1749576fbf0 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Thu, 26 Sep 2019 22:35:08 -0700 Subject: Fix appveyor build #1. --- .appveyor.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 89ad3e13..01e64e7c 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,11 +20,10 @@ before_build: - git submodule update --init --recursive - git clone https://gitlab.matrix.org/matrix-org/olm.git - cd olm -- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" +- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO - 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="%DEPLOY_DIR%" +- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX="%DEPLOY_DIR%" -DOlm_DIR="./olm/build" build_script: - cmake --build build -- cgit v1.2.3 From f376c1d46897e149e5393b5ef84667c06ca7f673 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Thu, 26 Sep 2019 23:02:52 -0700 Subject: Fix AppVeyor #2. --- .appveyor.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 01e64e7c..5abe2ec7 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,10 +20,11 @@ before_build: - git submodule update --init --recursive - git clone https://gitlab.matrix.org/matrix-org/olm.git - cd olm -- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO +- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO -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/build" +- 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" build_script: - cmake --build build -- cgit v1.2.3 From 3995077cf3be380d4f06aeb6e5b753f39ff6cd15 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Fri, 27 Sep 2019 00:03:54 -0700 Subject: try to fix AppVeyor --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 5abe2ec7..e066db30 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,7 +20,7 @@ before_build: - git submodule update --init --recursive - git clone https://gitlab.matrix.org/matrix-org/olm.git - cd olm -- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX=install +- cmake -G "NMake Makefiles JOM" -H. -Bbuild -DBUILD_SHARED_LIBS=NO -DCMAKE_INSTALL_PREFIX=install - cmake --build build - cmake --build build --target install - cd .. -- cgit v1.2.3 From 12ac9d60cc0d6cbedb5be2fcdb030683247c4e1d Mon Sep 17 00:00:00 2001 From: Black Hat Date: Fri, 27 Sep 2019 00:32:58 -0700 Subject: Olm relwithdebuginfo build --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index e066db30..26d4841d 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -20,7 +20,7 @@ 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=NO -DCMAKE_INSTALL_PREFIX=install +- 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 .. -- cgit v1.2.3 From 71e7bbfbe774b422af178db57fe3e800a17f336d Mon Sep 17 00:00:00 2001 From: Black Hat Date: Sat, 28 Sep 2019 14:49:08 -0700 Subject: Enable QMake for AppVeyor --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 26d4841d..10eeafd0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -29,7 +29,7 @@ before_build: build_script: - cmake --build build # qmake uses olm just built by CMake - it can't build olm on its own. -# - qmake "INCLUDEPATH += 3rdparty/libQtOlm/olm/include" "LIBS += -Lbuild" && jom +- qmake "INCLUDEPATH += olm/install/include" "LIBS += -Lbuild" "LIBS += -Lolm/install/lib" && jom #after_build: #- cmake --build build --target install -- cgit v1.2.3 From f9c0e04259be9fd3be70486bc1eb76bf8f2612fe Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 29 Sep 2019 18:05:17 +0900 Subject: Rename pieces with qmc/qmatrixclient --- .appveyor.yml | 6 +++--- lib/jobs/downloadfilejob.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 1dbdf237..a9f67ee4 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -1,7 +1,7 @@ image: Visual Studio 2017 environment: - #DEPLOY_DIR: libqmatrixclient-%APPVEYOR_BUILD_VERSION% + #DEPLOY_DIR: quotient-%APPVEYOR_BUILD_VERSION% matrix: - QTDIR: C:\Qt\5.13\msvc2017_64 VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars64.bat" @@ -30,7 +30,7 @@ build_script: #after_build: #- cmake --build build --target install -#- 7z a libqmatrixclient.zip "%DEPLOY_DIR%\" +#- 7z a quotient.zip "%DEPLOY_DIR%\" # Uncomment this to connect to the AppVeyor build worker #on_finish: @@ -39,4 +39,4 @@ build_script: test: off #artifacts: -#- path: libqmatrixclient.zip +#- path: quotient.zip diff --git a/lib/jobs/downloadfilejob.cpp b/lib/jobs/downloadfilejob.cpp index 4e997326..3e037680 100644 --- a/lib/jobs/downloadfilejob.cpp +++ b/lib/jobs/downloadfilejob.cpp @@ -12,7 +12,7 @@ public: explicit Private(const QString& localFilename) : targetFile(new QFile(localFilename)) - , tempFile(new QFile(targetFile->fileName() + ".qmcdownload")) + , tempFile(new QFile(targetFile->fileName() + ".qtntdownload")) {} QScopedPointer targetFile; -- cgit v1.2.3 From a4538e65359ea71f285d352d9cb44bdcdcab7139 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sat, 12 Oct 2019 14:56:12 +0900 Subject: CI: use env variables to group common CMake (and other) values For AppVeyor, skip olm installation as we don't intend to check dynamic linkage. --- .appveyor.yml | 13 +++++-------- .travis.yml | 35 ++++++++++++++++++++++++++--------- 2 files changed, 31 insertions(+), 17 deletions(-) (limited to '.appveyor.yml') 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 5cd45ac7..db92dc59 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,15 +47,22 @@ matrix: before_install: - eval "${ENV_EVAL}" -- export CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_PREFIX_PATH=../install -DCMAKE_INSTALL_PREFIX=../install" +#- export DESTDIR=$TRAVIS_BUILD_DIR/install +#- export CMAKE_ARGS="-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH} -DCMAKE_PREFIX_PATH=${DESTDIR}/install" - if [ "$TRAVIS_OS_NAME" = "linux" ]; then export CMAKE_ARGS="$CMAKE_ARGS -GNinja"; fi - if [ "$TRAVIS_OS_NAME" = "linux" ]; then VALGRIND="valgrind $VALGRIND_OPTIONS"; fi +# RPM spec-style: swallow a command with default parameters into a variable +# and add/override parameters further in the code if/as necessary +#- export _CMAKE_CONFIG="cmake $CMAKE_ARGS . -Bbuild" +#- export _CMAKE_BUILD="cmake --build build" +#- export _CMAKE_BUILD_INSTALL="$_CMAKE_BUILD --target install" + install: - git clone https://gitlab.matrix.org/matrix-org/olm.git - pushd olm -- cmake . -Bbuild -DBUILD_SHARED_LIBS=NO $CMAKE_ARGS -- cmake --build build --target install +- $_CMAKE_CONFIG -DBUILD_SHARED_LIBS=NO +- $_CMAKE_BUILD_INSTALL - popd - git clone https://github.com/quotient-im/matrix-doc.git - git clone --recursive https://github.com/KitsuneRal/gtad.git @@ -54,17 +72,16 @@ install: - popd before_script: -- cmake . -Bbuild -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" $CMAKE_ARGS -- cmake --build build --target update-api +- $_CMAKE_CONFIG -DMATRIX_DOC_PATH="matrix-doc" -DGTAD_PATH="gtad/gtad" +- $_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 -- cmake examples -Bbuild-example $CMAKE_ARGS +- cmake $CMAKE_ARGS examples -Bbuild-example - 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 += $DESTDIR/include" "LIBS += -Lbuild/lib" "LIBS += -L$DESTDIR/lib" - 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 -- cgit v1.2.3 From 6ff843d2d4915c037ad2dbe7470a34b2cbb279bc Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 21 Apr 2020 07:23:58 +0200 Subject: .appveyor.yml: cleanup --- .appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 701028af..13991ada 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -4,16 +4,16 @@ environment: 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" + VCVARS: "vcvars64.bat" PLATFORM: - QTDIR: C:\Qt\5.13\msvc2017 - VCVARS: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\vcvars32.bat" + VCVARS: "vcvars32.bat" PLATFORM: x86 init: - call "%QTDIR%\bin\qtenv2.bat" - set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% -- call "%VCVARS%" %PLATFORM% +- call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\%VCVARS%" %PLATFORM% - cd /D "%APPVEYOR_BUILD_FOLDER%" before_build: -- cgit v1.2.3 From 4237a138f9ad1baa7384f3a539e9343a1471b538 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Tue, 9 Jun 2020 15:09:37 +0200 Subject: CI: test more configurations --- .appveyor.yml | 22 ++++++++++++++++------ .travis.yml | 43 ++++++++++++++++++++++++++++++------------- 2 files changed, 46 insertions(+), 19 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 13991ada..764d56d6 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -3,12 +3,22 @@ image: Visual Studio 2017 environment: CMAKE_ARGS: '-G "NMake Makefiles JOM" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo' matrix: - - QTDIR: C:\Qt\5.13\msvc2017_64 - VCVARS: "vcvars64.bat" - PLATFORM: - - QTDIR: C:\Qt\5.13\msvc2017 + - QTDIR: C:\Qt\5.13\msvc2017 # Fresh Qt, 32-bit VCVARS: "vcvars32.bat" PLATFORM: x86 + - QTDIR: C:\Qt\5.13\msvc2017_64 # Fresh Qt, 64-bit + VCVARS: "vcvars64.bat" + PLATFORM: + - QTDIR: C:\Qt\5.9\msvc2017_64 # Oldest supported Qt, 64-bit, E2EE + VCVARS: "vcvars64.bat" + QMAKE_E2EE_ARGS: '"DEFINES += Quotient_E2EE_ENABLED USE_INTREE_LIBQOLM" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/olm"' + CMAKE_E2EE_ARGS: '-DQuotient_ENABLE_E2EE=ON -DOlm_DIR=build/olm' + PLATFORM: + - QTDIR: C:\Qt\5.13\msvc2017_64 # Fresh Qt, 64-bit, E2EE + VCVARS: "vcvars64.bat" + QMAKE_E2EE_ARGS: '"DEFINES += Quotient_E2EE_ENABLED USE_INTREE_LIBQOLM" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/olm"' + CMAKE_E2EE_ARGS: '-DQuotient_ENABLE_E2EE=ON -DOlm_DIR=build/olm' + PLATFORM: init: - call "%QTDIR%\bin\qtenv2.bat" @@ -23,10 +33,10 @@ before_build: - cmake --build build/olm build_script: -- cmake %CMAKE_ARGS% -H. -Bbuild "-DOlm_DIR=build/olm" +- cmake %CMAKE_ARGS% %CMAKE_E2EE_ARGS% -H. -Bbuild - cmake --build build # qmake uses olm just built by CMake - it can't build olm on its own. -- qmake "INCLUDEPATH += olm/include" "LIBS += -Lbuild" "LIBS += -Lbuild/olm" && jom +- qmake -Wall quotest.pro -- %QMAKE_E2EE_ARGS% && jom #after_build: #- cmake --build build --target install diff --git a/.travis.yml b/.travis.yml index d1a62c7f..9982be30 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,18 +19,15 @@ env: - CMAKE_ARGS="-DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_PREFIX_PATH=$DESTDIR/usr" - VALGRIND="valgrind --tool=memcheck --leak-check=yes --gen-suppressions=all --suppressions=tests/.valgrind.supp $VALGRIND_OPTIONS" -matrix: +matrix: # TODO: consider parallel execution, this thing takes an hour to run include: - os: linux compiler: gcc - - os: linux - compiler: gcc - env: [ 'E2EE="-DQuotient_ENABLE_E2EE=ON"', 'UPDATE_API=1' ] - os: linux compiler: clang - os: osx osx_image: xcode10.1 - env: [ 'PATH=/usr/local/opt/qt/bin:$PATH', 'VALGRIND=' ] + env: [ 'E2EE=1', 'VALGRIND=' ] addons: homebrew: update: true @@ -41,15 +38,32 @@ matrix: cache: directories: - $HOME/Library/Caches/Homebrew + # Check a few more advanced configurations + - os: linux + compiler: gcc + env: [ E2EE=1, UPDATE_API=1 ] # Check UPDATE_API with one of fatter options + - os: linux + compiler: clang + env: [ E2EE=1 ] + - os: linux + compiler: gcc + env: [ E2EE=1 ] before_install: - if [ -f "$(which ninja)" ]; then export CMAKE_ARGS="$CMAKE_ARGS -GNinja"; fi +- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH=/usr/local/opt/qt/bin:$PATH; fi # The recent GTAD uses std::filesystem that's not available in stock bionic - | if [ -n "$UPDATE_API" ]; then export CC=gcc-8 CXX=g++-8 export CMAKE_UPDATE_API_ARGS="-DMATRIX_DOC_PATH=../matrix-doc -DGTAD_PATH=../gtad/gtad" fi +- | + if [ -n "$E2EE" ]; then + export CMAKE_E2EE_ARGS="-DQuotient_ENABLE_E2EE=ON" + export QMAKE_E2EE_ARGS='"DEFINES += Quotient_E2EE_ENABLED USE_INTREE_LIBQOLM" "INCLUDEPATH += olm/include" "LIBS += -Lolm/build"' + export LIB_PATH_E2EE=olm/build + fi # RPM spec-style: swallow a command with default parameters into an alias # and add/override parameters further in the code if/as necessary - shopt -s expand_aliases @@ -58,11 +72,14 @@ before_install: install: - pushd .. # Go out of libQuotient source tree -- git clone https://gitlab.matrix.org/matrix-org/olm.git -- pushd olm -- _cmake_config -- _cmake_build --target install -- popd +- | + if [ -n "$E2EE" ]; then + git clone https://gitlab.matrix.org/matrix-org/olm.git + pushd olm + _cmake_config + _cmake_build --target install + popd + fi - | if [ -n "$UPDATE_API" ]; then @@ -76,7 +93,7 @@ install: - popd # back to libQuotient source tree before_script: -- _cmake_config $CMAKE_UPDATE_API_ARGS $E2EE +- _cmake_config $CMAKE_UPDATE_API_ARGS $CMAKE_E2EE_ARGS - if [ -n "$UPDATE_API" ]; then _cmake_build --target update-api; fi script: @@ -85,10 +102,10 @@ script: - cmake $CMAKE_ARGS tests -Bbuild-test - cmake --build build-test --target all # Build with qmake -- qmake quotest.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/lib" "LIBS += -Lolm/build" +- qmake -Wall quotest.pro "CONFIG += debug" "CONFIG -= app_bundle" "QMAKE_CC = $CC" "QMAKE_CXX = $CXX" -- $QMAKE_E2EE_ARGS - make all # Run the qmake-compiled quotest under valgrind -- if [ "$TEST_USER" != "" ]; then LD_LIBRARY_PATH="olm/build" $VALGRIND ./quotest "$TEST_USER" "$TEST_PWD" quotest-travis '#quotest:matrix.org' "Travis CI job $TRAVIS_JOB_NUMBER"; fi +- if [ "$TEST_USER" != "" ]; then LD_LIBRARY_PATH="$LIB_PATH_E2EE" $VALGRIND ./quotest "$TEST_USER" "$TEST_PWD" quotest-travis '#quotest:matrix.org' "Travis CI job $TRAVIS_JOB_NUMBER"; fi notifications: webhooks: -- cgit v1.2.3 From cf661d5e85441f849c0e0faca1c929810d4fd752 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Thu, 28 Jan 2021 16:03:28 +0100 Subject: Drop qmake from CI If someone still needs it - fix it; otherwise building with qmake will be dropped in 0.7 --- .appveyor.yml | 2 -- 1 file changed, 2 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 764d56d6..69a58ba0 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -35,8 +35,6 @@ before_build: build_script: - cmake %CMAKE_ARGS% %CMAKE_E2EE_ARGS% -H. -Bbuild - cmake --build build -# qmake uses olm just built by CMake - it can't build olm on its own. -- qmake -Wall quotest.pro -- %QMAKE_E2EE_ARGS% && jom #after_build: #- cmake --build build --target install -- cgit v1.2.3 From 21db98f32bc7e87685c7bd813945cbba75ec0fb7 Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Sun, 13 Jun 2021 17:06:41 +0200 Subject: AppVeyor: disable E2EE building, drop older Qt E2EE will be remade anyway so building it now makes little sense. --- .appveyor.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml index 69a58ba0..fa031ed8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -9,16 +9,6 @@ environment: - QTDIR: C:\Qt\5.13\msvc2017_64 # Fresh Qt, 64-bit VCVARS: "vcvars64.bat" PLATFORM: - - QTDIR: C:\Qt\5.9\msvc2017_64 # Oldest supported Qt, 64-bit, E2EE - VCVARS: "vcvars64.bat" - QMAKE_E2EE_ARGS: '"DEFINES += Quotient_E2EE_ENABLED USE_INTREE_LIBQOLM" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/olm"' - CMAKE_E2EE_ARGS: '-DQuotient_ENABLE_E2EE=ON -DOlm_DIR=build/olm' - PLATFORM: - - QTDIR: C:\Qt\5.13\msvc2017_64 # Fresh Qt, 64-bit, E2EE - VCVARS: "vcvars64.bat" - QMAKE_E2EE_ARGS: '"DEFINES += Quotient_E2EE_ENABLED USE_INTREE_LIBQOLM" "INCLUDEPATH += olm/include" "LIBS += -Lbuild/olm"' - CMAKE_E2EE_ARGS: '-DQuotient_ENABLE_E2EE=ON -DOlm_DIR=build/olm' - PLATFORM: init: - call "%QTDIR%\bin\qtenv2.bat" @@ -28,12 +18,9 @@ init: before_build: - git submodule update --init --recursive -- git clone https://gitlab.matrix.org/matrix-org/olm.git -- cmake %CMAKE_ARGS% -Holm -Bbuild/olm -- cmake --build build/olm build_script: -- cmake %CMAKE_ARGS% %CMAKE_E2EE_ARGS% -H. -Bbuild +- cmake %CMAKE_ARGS% -H. -Bbuild - cmake --build build #after_build: -- cgit v1.2.3 From 92efa87eff1b35bc857633af20ea8987d926dd5e Mon Sep 17 00:00:00 2001 From: Alexey Rusakov Date: Wed, 1 Sep 2021 21:51:24 +0200 Subject: Drop .appveyor.yml --- .appveyor.yml | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 .appveyor.yml (limited to '.appveyor.yml') diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index fa031ed8..00000000 --- a/.appveyor.yml +++ /dev/null @@ -1,37 +0,0 @@ -image: Visual Studio 2017 - -environment: - CMAKE_ARGS: '-G "NMake Makefiles JOM" -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo' - matrix: - - QTDIR: C:\Qt\5.13\msvc2017 # Fresh Qt, 32-bit - VCVARS: "vcvars32.bat" - PLATFORM: x86 - - QTDIR: C:\Qt\5.13\msvc2017_64 # Fresh Qt, 64-bit - VCVARS: "vcvars64.bat" - PLATFORM: - -init: -- call "%QTDIR%\bin\qtenv2.bat" -- set PATH=C:\Qt\Tools\QtCreator\bin;%PATH% -- call "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Auxiliary\\Build\\%VCVARS%" %PLATFORM% -- cd /D "%APPVEYOR_BUILD_FOLDER%" - -before_build: -- git submodule update --init --recursive - -build_script: -- cmake %CMAKE_ARGS% -H. -Bbuild -- cmake --build build - -#after_build: -#- cmake --build build --target install -#- 7z a quotient.zip "%DEPLOY_DIR%\" - -# Uncomment this to connect to the AppVeyor build worker -#on_finish: -# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1')) - -test: off - -#artifacts: -#- path: quotient.zip -- cgit v1.2.3