mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Install missing dependencies in travis-ci/appveyor
This commit is contained in:
parent
0a9d95dfc9
commit
1366b01790
7 changed files with 46 additions and 34 deletions
|
@ -4,7 +4,8 @@ set -ex
|
||||||
|
|
||||||
if [ $TRAVIS_OS_NAME == osx ]; then
|
if [ $TRAVIS_OS_NAME == osx ]; then
|
||||||
brew update
|
brew update
|
||||||
brew install qt5 lmdb clang-format ninja
|
brew install qt5 lmdb clang-format ninja libsodium spdlog
|
||||||
|
brew upgrade boost
|
||||||
|
|
||||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
sudo python get-pip.py
|
sudo python get-pip.py
|
||||||
|
@ -23,6 +24,7 @@ if [ $TRAVIS_OS_NAME == linux ]; then
|
||||||
QT_PKG="59"
|
QT_PKG="59"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
sudo add-apt-repository -y ppa:chris-lea/libsodium
|
||||||
sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty
|
sudo add-apt-repository -y ppa:beineri/opt-qt${QT_VERSION}-trusty
|
||||||
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
|
sudo add-apt-repository -y ppa:george-edison55/cmake-3.x
|
||||||
sudo apt-get update -qq
|
sudo apt-get update -qq
|
||||||
|
@ -32,5 +34,6 @@ if [ $TRAVIS_OS_NAME == linux ]; then
|
||||||
qt${QT_PKG}svg \
|
qt${QT_PKG}svg \
|
||||||
qt${QT_PKG}multimedia \
|
qt${QT_PKG}multimedia \
|
||||||
cmake \
|
cmake \
|
||||||
liblmdb-dev
|
liblmdb-dev \
|
||||||
|
libsodium-dev
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -10,7 +10,16 @@ if [ $TRAVIS_OS_NAME == osx ]; then
|
||||||
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
|
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
make ci
|
# Build & install dependencies
|
||||||
|
mkdir -p .deps/usr/{lib,include}/
|
||||||
|
cmake -Hdeps -B.deps \
|
||||||
|
-DUSE_BUNDLED_BOOST=${USE_BUNDLED_BOOST} \
|
||||||
|
-DUSE_BUNDLED_SPDLOG=${USE_BUNDLED_SPDLOG}
|
||||||
|
cmake --build .deps
|
||||||
|
|
||||||
|
# Build nheko
|
||||||
|
cmake -GNinja -H. -Bbuild -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
|
cmake --build build
|
||||||
|
|
||||||
if [ $TRAVIS_OS_NAME == osx ]; then
|
if [ $TRAVIS_OS_NAME == osx ]; then
|
||||||
make lint;
|
make lint;
|
||||||
|
|
|
@ -14,6 +14,8 @@ matrix:
|
||||||
compiler: clang
|
compiler: clang
|
||||||
env:
|
env:
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
|
- USE_BUNDLED_BOOST=0
|
||||||
|
- USE_BUNDLED_SPDLOG=0
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env:
|
env:
|
||||||
|
@ -22,6 +24,8 @@ matrix:
|
||||||
- QT_VERSION="-5.10.1"
|
- QT_VERSION="-5.10.1"
|
||||||
- QT_PKG=510
|
- QT_PKG=510
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
|
- USE_BUNDLED_BOOST=1
|
||||||
|
- USE_BUNDLED_SPDLOG=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test"]
|
sources: ["ubuntu-toolchain-r-test"]
|
||||||
|
@ -33,6 +37,8 @@ matrix:
|
||||||
- C_COMPILER=gcc-7
|
- C_COMPILER=gcc-7
|
||||||
- QT_VERSION=571
|
- QT_VERSION=571
|
||||||
- QT_PKG=57
|
- QT_PKG=57
|
||||||
|
- USE_BUNDLED_BOOST=1
|
||||||
|
- USE_BUNDLED_SPDLOG=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test"]
|
sources: ["ubuntu-toolchain-r-test"]
|
||||||
|
@ -44,6 +50,8 @@ matrix:
|
||||||
- C_COMPILER=clang-5.0
|
- C_COMPILER=clang-5.0
|
||||||
- QT_VERSION=592
|
- QT_VERSION=592
|
||||||
- QT_PKG=59
|
- QT_PKG=59
|
||||||
|
- USE_BUNDLED_BOOST=1
|
||||||
|
- USE_BUNDLED_SPDLOG=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"]
|
sources: ["ubuntu-toolchain-r-test", "llvm-toolchain-trusty-5.0"]
|
||||||
|
|
|
@ -39,6 +39,11 @@ if(APPLE)
|
||||||
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl)
|
set(OPENSSL_ROOT_DIR /usr/local/opt/openssl)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT MSVC AND NOT APPLE)
|
||||||
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
|
find_package(Threads REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
#
|
#
|
||||||
# LMDB
|
# LMDB
|
||||||
#
|
#
|
||||||
|
@ -72,7 +77,20 @@ set(CMAKE_C_COMPILER gcc)
|
||||||
set(CMAKE_CXX_STANDARD 14)
|
set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
include(CompilerFlags)
|
if(NOT MSVC)
|
||||||
|
set(
|
||||||
|
CMAKE_CXX_FLAGS
|
||||||
|
"${CMAKE_CXX_FLAGS} \
|
||||||
|
-Wall \
|
||||||
|
-Wextra \
|
||||||
|
-Werror \
|
||||||
|
-pipe \
|
||||||
|
-pedantic \
|
||||||
|
-fsized-deallocation \
|
||||||
|
-fdiagnostics-color=always \
|
||||||
|
-Wunreachable-code"
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(NOT CMAKE_BUILD_TYPE)
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
|
||||||
|
@ -187,10 +205,10 @@ set(SRC_FILES
|
||||||
# ExternalProject dependencies
|
# ExternalProject dependencies
|
||||||
set(EXTERNAL_PROJECT_DEPS "")
|
set(EXTERNAL_PROJECT_DEPS "")
|
||||||
|
|
||||||
|
find_package(ZLIB REQUIRED)
|
||||||
|
find_package(OpenSSL REQUIRED)
|
||||||
find_package(MatrixStructs REQUIRED)
|
find_package(MatrixStructs REQUIRED)
|
||||||
find_package(MatrixClient REQUIRED)
|
find_package(MatrixClient REQUIRED)
|
||||||
find_package(OpenSSL REQUIRED)
|
|
||||||
find_package(ZLIB REQUIRED)
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# tweeny
|
# tweeny
|
||||||
|
|
|
@ -14,6 +14,8 @@ build:
|
||||||
install:
|
install:
|
||||||
- set QT_DIR=C:\Qt\5.10.1\msvc2017_64
|
- set QT_DIR=C:\Qt\5.10.1\msvc2017_64
|
||||||
- set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin
|
- set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin
|
||||||
|
- set PATH=%PATH%;C:\mingw-w64\x86_64-7.2.0-posix-seh-rt_v5-rev1\mingw64\bin
|
||||||
|
- mingw32-make.exe --version
|
||||||
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
- call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
|
||||||
- vcpkg install
|
- vcpkg install
|
||||||
boost-asio:%PLATFORM%-windows
|
boost-asio:%PLATFORM%-windows
|
||||||
|
|
|
@ -1,26 +0,0 @@
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
|
|
||||||
-Wall \
|
|
||||||
-Wextra \
|
|
||||||
-Werror \
|
|
||||||
-pipe \
|
|
||||||
-Wno-unused-function \
|
|
||||||
-pedantic \
|
|
||||||
-Wunreachable-code")
|
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
|
||||||
execute_process(COMMAND ${CMAKE_CXX_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION)
|
|
||||||
|
|
||||||
if (GCC_VERSION VERSION_GREATER 4.9)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" )
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-color=always" )
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT APPLE AND NOT MSVC)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread")
|
|
||||||
endif()
|
|
2
deps/cmake/Olm.cmake
vendored
2
deps/cmake/Olm.cmake
vendored
|
@ -4,8 +4,6 @@ else()
|
||||||
set(MAKE_CMD "make")
|
set(MAKE_CMD "make")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(OLM_NAME "${CMAKE_STATIC_LIBRARY_PREFIX}olm${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
|
||||||
|
|
||||||
ExternalProject_Add(
|
ExternalProject_Add(
|
||||||
Olm
|
Olm
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue