summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-01-24 18:09:11 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-01-26 16:38:31 +0100
commit8a21c5942b15eb76818db98dd8efb74fb20fbfdb (patch)
treeebf1605f78dce10b62f068a9a15a069c9b6dd0b5
parentUse hunter for bundled dependencies (diff)
downloadnheko-8a21c5942b15eb76818db98dd8efb74fb20fbfdb.tar.xz
Port CI to hunter
-rwxr-xr-x.ci/install.sh10
-rwxr-xr-x.ci/script.sh26
-rw-r--r--.travis.yml20
-rw-r--r--appveyor.yml43
4 files changed, 26 insertions, 73 deletions
diff --git a/.ci/install.sh b/.ci/install.sh
index 776d4d23..f700f303 100755
--- a/.ci/install.sh
+++ b/.ci/install.sh
@@ -3,9 +3,6 @@
 set -ex
 
 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
-    brew tap nlohmann/json
-    brew install --with-cmake nlohmann_json
-
     curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
     sudo python get-pip.py
 
@@ -25,11 +22,4 @@ if [ "$TRAVIS_OS_NAME" = "linux" ]; then
 
     wget https://cmake.org/files/v3.15/cmake-3.15.5-Linux-x86_64.sh
     sudo sh cmake-3.15.5-Linux-x86_64.sh  --skip-license  --prefix=/usr/local
-
-    mkdir -p build-libsodium
-    ( cd build-libsodium
-      curl -L https://download.libsodium.org/libsodium/releases/libsodium-1.0.17.tar.gz -o libsodium-1.0.17.tar.gz
-      tar xfz libsodium-1.0.17.tar.gz
-      cd libsodium-1.0.17/
-      ./configure && make && sudo make install )
 fi
diff --git a/.ci/script.sh b/.ci/script.sh
index 7e9a8d81..9e05998d 100755
--- a/.ci/script.sh
+++ b/.ci/script.sh
@@ -19,19 +19,29 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
     export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
 fi
 
-# Build & install dependencies
-cmake -GNinja -Hdeps -B.deps \
-    -DUSE_BUNDLED_BOOST="${USE_BUNDLED_BOOST}" \
-    -DUSE_BUNDLED_CMARK="${USE_BUNDLED_CMARK}" \
-    -DUSE_BUNDLED_JSON="${USE_BUNDLED_JSON}" \
-    -DMTX_STATIC="${MTX_STATIC:-OFF}"
-cmake --build .deps
+mkdir -p .deps/usr .hunter
 
 # Build nheko
+
+if [ "$TRAVIS_OS_NAME" = "osx" ]; then
+cmake -GNinja -H. -Bbuild \
+    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
+    -DCMAKE_INSTALL_PREFIX=.deps/usr \
+    -DHUNTER_ROOT=".hunter" \
+    -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \
+    -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \
+    -DUSE_BUNDLED_OPENSSL=OFF \
+    -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl \
+    -DOPENSSL_INCLUDE_DIR=/usr/local/opt/openssl/include
+else
 cmake -GNinja -H. -Bbuild \
     -DCMAKE_BUILD_TYPE=RelWithDebInfo \
     -DCMAKE_INSTALL_PREFIX=.deps/usr \
-    -DBUILD_SHARED_LIBS=ON # weird workaround, as the boost 1.70 cmake files seem to be broken?
+    -DHUNTER_ROOT=".hunter" \
+    -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF \
+    -DCMAKE_BUILD_TYPE=RelWithDebInfo -DHUNTER_CONFIGURATION_TYPES=RelWithDebInfo \
+    -DUSE_BUNDLED_OPENSSL=OFF
+fi
 cmake --build build
 
 if [ "$TRAVIS_OS_NAME" = "osx" ]; then
diff --git a/.travis.yml b/.travis.yml
index 1e2bc5b8..ce189749 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,7 +13,7 @@ notifications:
 
 cache:
   directories:
-    - .deps
+    - .hunter
 
 matrix:
     include:
@@ -23,21 +23,12 @@ matrix:
           osx_image: xcode10.2
           env:
             - DEPLOYMENT=1
-            - USE_BUNDLED_BOOST=0
-            - USE_BUNDLED_CMARK=0
-            - USE_BUNDLED_JSON=0
-            - MTX_STATIC=1
           addons:
             homebrew:
               taps: nlohmann/json
               packages:
-                - boost
                 - clang-format
                 - cmake
-                - cmark
-                - icu4c
-                - libsodium
-                - lmdb
                 - ninja
                 - openssl
                 - qt5
@@ -48,9 +39,6 @@ matrix:
               - CC=gcc-7
               - QT_PKG=512
               - DEPLOYMENT=1
-              - USE_BUNDLED_BOOST=1
-              - USE_BUNDLED_CMARK=1
-              - USE_BUNDLED_JSON=1
           addons:
               apt:
                   sources: 
@@ -73,9 +61,6 @@ matrix:
               - CXX=g++-8
               - CC=gcc-8
               - QT_PKG=59
-              - USE_BUNDLED_BOOST=1
-              - USE_BUNDLED_CMARK=1
-              - USE_BUNDLED_JSON=1
           addons:
               apt:
                   sources: 
@@ -98,9 +83,6 @@ matrix:
               - CXX=clang++-6.0
               - CC=clang-6.0
               - QT_PKG=59
-              - USE_BUNDLED_BOOST=1
-              - USE_BUNDLED_CMARK=1
-              - USE_BUNDLED_JSON=1
           addons:
               apt:
                   sources: 
diff --git a/appveyor.yml b/appveyor.yml
index 8228a910..dc6090d8 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,6 +1,6 @@
 ---
 
-version: 0.6.4-{build}
+version: 0.7.0-{build}
 
 configuration: Release
 image: Visual Studio 2019
@@ -11,8 +11,8 @@ environment:
         secure: "iGl5mzE9/ta9kFELUxDw9XtlYMSCMai9xowXIkYzU8WKHz7NfW0mLwMJZvblZFXJ"
 
 cache:
-  - c:\tools\vcpkg\installed\ -> appveyor.yml
-#  - .deps -> appveyor.yml,deps\CMakeLists.txt <- disabled because it randomly seems to break everytime
+  - c:\hunter\ -> appveyor.yml
+  - build\_deps -> appveyor.yml,deps\CMakeLists.txt
 
 build:
     verbosity: minimal
@@ -23,20 +23,6 @@ install:
     - set PATH=%PATH%;C:\mingw-w64\x86_64-7.3.0-posix-seh-rt_v5-rev1\mingw64\bin
     - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
     - cd "C:\Tools\vcpkg"&& git pull && .\bootstrap-vcpkg.bat && cd %APPVEYOR_BUILD_FOLDER%
-    - vcpkg install
-            nlohmann-json:%PLATFORM%-windows
-            boost-asio:%PLATFORM%-windows
-            boost-beast:%PLATFORM%-windows
-            boost-iostreams:%PLATFORM%-windows
-            boost-random:%PLATFORM%-windows
-            boost-signals2:%PLATFORM%-windows
-            boost-system:%PLATFORM%-windows
-            boost-thread:%PLATFORM%-windows
-            libsodium:%PLATFORM%-windows
-            lmdb:%PLATFORM%-windows
-            openssl:%PLATFORM%-windows
-            zlib:%PLATFORM%-windows
-    - vcpkg upgrade --no-dry-run
 
 build_script:
     # VERSION format:     branch-master/branch-1.2
@@ -57,23 +43,12 @@ build_script:
     - echo %INSTVERSION%
     - echo %DATE%
 
-    # Build & install the dependencies
-    - cmake -G "Visual Studio 16 2019" -A x64 -Hdeps -B.deps
-        -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-        -DUSE_BUNDLED_BOOST=OFF
-        -DUSE_BUNDLED_JSON=OFF
-        -DMTX_STATIC=ON
-    - cmake --build .deps --config Release
-
     # Build nheko
-    - rm -f cmake/FindOlm.cmake
     - cmake -G "Visual Studio 16 2019" -A x64 -H. -Bbuild
-      -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
-      -DLMDBXX_INCLUDE_DIR=.deps/usr/include
-      -DTWEENY_INCLUDE_DIR=.deps/usr/include
-      -DCMARK_INCLUDE_DIR=C:/projects/nheko/.deps/usr/include
-      -DCMARK_LIBRARY=C:/projects/nheko/.deps/usr/lib/cmark.lib
-      -DJSON_INCLUDE_DIR=.deps/usr/include
+      -DHUNTER_ROOT="C:\hunter"
+      -DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
+      -DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
+
     - cmake --build build --config Release
 
 after_build:
@@ -84,10 +59,6 @@ after_build:
     - copy build\Release\nheko.exe NhekoRelease\nheko.exe
     - windeployqt --qmldir %QT_DIR%\qml\ --release NhekoRelease\nheko.exe
 
-    - copy C:\Tools\vcpkg\installed\x64-windows\bin\*.dll .\NhekoRelease\
-
-    - copy C:\projects\nheko\.deps\usr\bin\cmark.dll .\NhekoRelease\
-
     - 7z a nheko_win_64.zip .\NhekoRelease\*
     - ls -lh build\Release\
     - ls -lh NhekoRelease\