mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Update CI with cmark
This commit is contained in:
parent
074608dec1
commit
1192dc5134
8 changed files with 66 additions and 20 deletions
|
@ -4,7 +4,7 @@ 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 libsodium
|
brew install qt5 lmdb clang-format ninja libsodium cmark
|
||||||
brew upgrade boost cmake
|
brew upgrade boost cmake
|
||||||
|
|
||||||
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
|
|
|
@ -22,7 +22,9 @@ if [ $TRAVIS_OS_NAME == osx ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build & install dependencies
|
# Build & install dependencies
|
||||||
cmake -GNinja -Hdeps -B.deps -DUSE_BUNDLED_BOOST=${USE_BUNDLED_BOOST}
|
cmake -GNinja -Hdeps -B.deps \
|
||||||
|
-DUSE_BUNDLED_BOOST=${USE_BUNDLED_BOOST} \
|
||||||
|
-DUSE_BUNDLED_CMARK=${USE_BUNDLED_CMARK}
|
||||||
cmake --build .deps
|
cmake --build .deps
|
||||||
|
|
||||||
# Build nheko
|
# Build nheko
|
||||||
|
|
|
@ -15,6 +15,7 @@ matrix:
|
||||||
env:
|
env:
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
- USE_BUNDLED_BOOST=0
|
- USE_BUNDLED_BOOST=0
|
||||||
|
- USE_BUNDLED_CMARK=0
|
||||||
- os: linux
|
- os: linux
|
||||||
compiler: gcc
|
compiler: gcc
|
||||||
env:
|
env:
|
||||||
|
@ -24,6 +25,7 @@ matrix:
|
||||||
- QT_PKG=510
|
- QT_PKG=510
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
- USE_BUNDLED_BOOST=1
|
- USE_BUNDLED_BOOST=1
|
||||||
|
- USE_BUNDLED_CMARK=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test"]
|
sources: ["ubuntu-toolchain-r-test"]
|
||||||
|
@ -36,6 +38,7 @@ matrix:
|
||||||
- QT_VERSION="-5.10.1"
|
- QT_VERSION="-5.10.1"
|
||||||
- QT_PKG=510
|
- QT_PKG=510
|
||||||
- USE_BUNDLED_BOOST=1
|
- USE_BUNDLED_BOOST=1
|
||||||
|
- USE_BUNDLED_CMARK=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test"]
|
sources: ["ubuntu-toolchain-r-test"]
|
||||||
|
@ -48,6 +51,7 @@ matrix:
|
||||||
- QT_VERSION=571
|
- QT_VERSION=571
|
||||||
- QT_PKG=57
|
- QT_PKG=57
|
||||||
- USE_BUNDLED_BOOST=1
|
- USE_BUNDLED_BOOST=1
|
||||||
|
- USE_BUNDLED_CMARK=1
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources: ["ubuntu-toolchain-r-test"]
|
sources: ["ubuntu-toolchain-r-test"]
|
||||||
|
@ -60,6 +64,7 @@ matrix:
|
||||||
- QT_VERSION=592
|
- QT_VERSION=592
|
||||||
- QT_PKG=59
|
- QT_PKG=59
|
||||||
- USE_BUNDLED_BOOST=1
|
- USE_BUNDLED_BOOST=1
|
||||||
|
- USE_BUNDLED_CMARK=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"]
|
||||||
|
|
|
@ -87,6 +87,7 @@ sudo port install nheko
|
||||||
- CMake 3.1 or greater.
|
- CMake 3.1 or greater.
|
||||||
- [mtxclient](https://github.com/mujx/mtxclient)
|
- [mtxclient](https://github.com/mujx/mtxclient)
|
||||||
- [LMDB](https://symas.com/lightning-memory-mapped-database/)
|
- [LMDB](https://symas.com/lightning-memory-mapped-database/)
|
||||||
|
- [cmark](https://github.com/commonmark/cmark)
|
||||||
- Boost 1.66 or greater.
|
- Boost 1.66 or greater.
|
||||||
- [libolm](https://git.matrix.org/git/olm)
|
- [libolm](https://git.matrix.org/git/olm)
|
||||||
- [libsodium](https://github.com/jedisct1/libsodium)
|
- [libsodium](https://github.com/jedisct1/libsodium)
|
||||||
|
@ -115,6 +116,7 @@ sudo pacman -S qt5-base \
|
||||||
gcc \
|
gcc \
|
||||||
fontconfig \
|
fontconfig \
|
||||||
lmdb \
|
lmdb \
|
||||||
|
cmark \
|
||||||
boost \
|
boost \
|
||||||
libsodium
|
libsodium
|
||||||
```
|
```
|
||||||
|
@ -139,7 +141,7 @@ sudo apt-get install -y g++-7 qt59base qt59svg qt59tools qt59multimedia cmake li
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew update
|
brew update
|
||||||
brew install qt5 lmdb cmake llvm libsodium spdlog boost
|
brew install qt5 lmdb cmake llvm libsodium spdlog boost cmark
|
||||||
```
|
```
|
||||||
|
|
||||||
##### Windows
|
##### Windows
|
||||||
|
@ -166,6 +168,7 @@ cd vcpkg
|
||||||
boost-signals2 \
|
boost-signals2 \
|
||||||
boost-system \
|
boost-system \
|
||||||
boost-thread \
|
boost-thread \
|
||||||
|
cmark \
|
||||||
libsodium \
|
libsodium \
|
||||||
lmdb \
|
lmdb \
|
||||||
openssl \
|
openssl \
|
||||||
|
|
|
@ -64,6 +64,8 @@ build_script:
|
||||||
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
||||||
-DLMDBXX_INCLUDE_DIR=.deps/usr/include
|
-DLMDBXX_INCLUDE_DIR=.deps/usr/include
|
||||||
-DTWEENY_INCLUDE_DIR=.deps/usr/include
|
-DTWEENY_INCLUDE_DIR=.deps/usr/include
|
||||||
|
-DCMARK_INCLUDE_DIR=.deps/usr/include
|
||||||
|
-DCMARK_LIBRARY=.deps/usr/lib/cmark_static.lib
|
||||||
- cmake --build build --config Release
|
- cmake --build build --config Release
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
|
|
|
@ -2,23 +2,25 @@
|
||||||
# CMake module to search for the cmark library
|
# CMake module to search for the cmark library
|
||||||
#
|
#
|
||||||
|
|
||||||
find_path(CMARK_INCLUDE_DIR
|
include(FindPkgConfig)
|
||||||
|
pkg_check_modules(PC_CMARK QUIET cmark)
|
||||||
|
|
||||||
|
if(NOT CMARK_INCLUDE_DIR)
|
||||||
|
find_path(CMARK_INCLUDE_DIR
|
||||||
NAMES cmark.h
|
NAMES cmark.h
|
||||||
PATHS /usr/include
|
PATHS ${PC_CMARK_INCLUDEDIR}
|
||||||
/usr/local/include
|
${PC_CMARK_INCLUDE_DIRS}
|
||||||
$ENV{LIB_DIR}/include
|
/usr/include
|
||||||
$ENV{LIB_DIR}/include/cmark)
|
/usr/local/include)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_library(CMARK_LIBRARY
|
if(NOT CMARK_LIBRARY)
|
||||||
|
find_library(CMARK_LIBRARY
|
||||||
NAMES cmark
|
NAMES cmark
|
||||||
PATHS /usr/lib /usr/local/lib $ENV{LIB_DIR}/lib)
|
HINTS ${PC_CMARK_LIBDIR}
|
||||||
|
${PC_CMARK_LIBRARY_DIRS}
|
||||||
if(OLM_FOUND)
|
/usr/lib
|
||||||
set(OLM_INCLUDE_DIRS ${CMARK_INCLUDE_DIR})
|
/usr/local/lib)
|
||||||
|
|
||||||
if(NOT OLM_LIBRARIES)
|
|
||||||
set(OLM_LIBRARIES ${CMARK_LIBRARY})
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT TARGET cmark::cmark)
|
if(NOT TARGET cmark::cmark)
|
||||||
|
@ -37,3 +39,6 @@ find_package_handle_standard_args(cmark
|
||||||
CMARK_LIBRARY)
|
CMARK_LIBRARY)
|
||||||
|
|
||||||
mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR)
|
mark_as_advanced(CMARK_LIBRARY CMARK_INCLUDE_DIR)
|
||||||
|
|
||||||
|
set(CMARK_LIBRARIES ${CMARK_LIBRARY})
|
||||||
|
set(CMARK_INCLUDE_DIRS ${CMARK_INCLUDE_DIR})
|
||||||
|
|
12
deps/CMakeLists.txt
vendored
12
deps/CMakeLists.txt
vendored
|
@ -22,6 +22,7 @@ set(DEPS_DOWNLOAD_DIR "${DEPS_BUILD_DIR}/downloads"
|
||||||
option(USE_BUNDLED "Use bundled dependencies." ON)
|
option(USE_BUNDLED "Use bundled dependencies." ON)
|
||||||
|
|
||||||
option(USE_BUNDLED_BOOST "Use the bundled version of Boost." ${USE_BUNDLED})
|
option(USE_BUNDLED_BOOST "Use the bundled version of Boost." ${USE_BUNDLED})
|
||||||
|
option(USE_BUNDLED_CMARK "Use the bundled version of cmark." ${USE_BUNDLED})
|
||||||
option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${USE_BUNDLED})
|
option(USE_BUNDLED_SPDLOG "Use the bundled version of spdlog." ${USE_BUNDLED})
|
||||||
option(USE_BUNDLED_OLM "Use the bundled version of libolm." ${USE_BUNDLED})
|
option(USE_BUNDLED_OLM "Use the bundled version of libolm." ${USE_BUNDLED})
|
||||||
option(USE_BUNDLED_TWEENY "Use the bundled version of Tweeny." ${USE_BUNDLED})
|
option(USE_BUNDLED_TWEENY "Use the bundled version of Tweeny." ${USE_BUNDLED})
|
||||||
|
@ -38,10 +39,10 @@ set(BOOST_SHA256
|
||||||
|
|
||||||
set(
|
set(
|
||||||
MTXCLIENT_URL
|
MTXCLIENT_URL
|
||||||
https://github.com/mujx/mtxclient/archive/659bfe7cd9b87bb009ebc703398fd93dc098b0f0.tar.gz
|
https://github.com/mujx/mtxclient/archive/1a539721ec86cb8b5f9d0b51cbe2251e46257a9b.tar.gz
|
||||||
)
|
)
|
||||||
set(MTXCLIENT_HASH
|
set(MTXCLIENT_HASH
|
||||||
d6794940354fd6e163ca52cab7878bba3c71ebfe3ca9a51ada5485a09c0d27f8)
|
7c458f57f774c75afaf403869e57a753620b5b619b1a7cd0b63bbc4735fc8993)
|
||||||
|
|
||||||
set(
|
set(
|
||||||
TWEENY_URL
|
TWEENY_URL
|
||||||
|
@ -60,6 +61,9 @@ set(LMDBXX_HASH
|
||||||
set(OLM_URL https://git.matrix.org/git/olm.git)
|
set(OLM_URL https://git.matrix.org/git/olm.git)
|
||||||
set(OLM_TAG 4065c8e11a33ba41133a086ed3de4da94dcb6bae)
|
set(OLM_TAG 4065c8e11a33ba41133a086ed3de4da94dcb6bae)
|
||||||
|
|
||||||
|
set(CMARK_URL https://github.com/commonmark/cmark/archive/0.28.3.tar.gz)
|
||||||
|
set(CMARK_HASH acc98685d3c1b515ff787ac7c994188dadaf28a2d700c10c1221da4199bae1fc)
|
||||||
|
|
||||||
set(SPDLOG_URL https://github.com/gabime/spdlog/archive/v1.1.0.tar.gz)
|
set(SPDLOG_URL https://github.com/gabime/spdlog/archive/v1.1.0.tar.gz)
|
||||||
set(SPDLOG_HASH
|
set(SPDLOG_HASH
|
||||||
3dbcbfd8c07e25f5e0d662b194d3a7772ef214358c49ada23c044c4747ce8b19)
|
3dbcbfd8c07e25f5e0d662b194d3a7772ef214358c49ada23c044c4747ce8b19)
|
||||||
|
@ -84,6 +88,10 @@ if(USE_BUNDLED_OLM)
|
||||||
include(Olm)
|
include(Olm)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(USE_BUNDLED_CMARK)
|
||||||
|
include(cmark)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(USE_BUNDLED_TWEENY)
|
if(USE_BUNDLED_TWEENY)
|
||||||
include(Tweeny)
|
include(Tweeny)
|
||||||
endif()
|
endif()
|
||||||
|
|
21
deps/cmake/cmark.cmake
vendored
Normal file
21
deps/cmake/cmark.cmake
vendored
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
set(WINDOWS_FLAGS "")
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(WINDOWS_FLAGS "-DCMAKE_GENERATOR_PLATFORM=x64")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
ExternalProject_Add(
|
||||||
|
cmark
|
||||||
|
|
||||||
|
URL ${CMARK_URL}
|
||||||
|
URL_HASH SHA256=${CMARK_HASH}
|
||||||
|
|
||||||
|
BUILD_IN_SOURCE 0
|
||||||
|
SOURCE_DIR ${DEPS_BUILD_DIR}/cmark
|
||||||
|
CONFIGURE_COMMAND ${CMAKE_COMMAND}
|
||||||
|
-DCMAKE_INSTALL_PREFIX=${DEPS_INSTALL_DIR}
|
||||||
|
-DCMARK_TESTS=OFF
|
||||||
|
${DEPS_BUILD_DIR}/cmark
|
||||||
|
${WINDOWS_FLAGS})
|
||||||
|
|
||||||
|
list(APPEND THIRD_PARTY_DEPS cmark)
|
Loading…
Reference in a new issue