mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-26 04:58:49 +03:00
Port CI to hunter
This commit is contained in:
parent
d8263265e6
commit
8a21c5942b
4 changed files with 26 additions and 73 deletions
|
@ -3,9 +3,6 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
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
|
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
|
||||||
sudo python 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
|
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
|
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
|
fi
|
||||||
|
|
|
@ -19,19 +19,29 @@ if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
|
export CMAKE_PREFIX_PATH=/usr/local/opt/qt5
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Build & install dependencies
|
mkdir -p .deps/usr .hunter
|
||||||
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
|
|
||||||
|
|
||||||
# Build nheko
|
# Build nheko
|
||||||
|
|
||||||
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
cmake -GNinja -H. -Bbuild \
|
cmake -GNinja -H. -Bbuild \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DCMAKE_INSTALL_PREFIX=.deps/usr \
|
-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 \
|
||||||
|
-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 \
|
||||||
|
-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
|
cmake --build build
|
||||||
|
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
|
|
20
.travis.yml
20
.travis.yml
|
@ -13,7 +13,7 @@ notifications:
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
directories:
|
directories:
|
||||||
- .deps
|
- .hunter
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -23,21 +23,12 @@ matrix:
|
||||||
osx_image: xcode10.2
|
osx_image: xcode10.2
|
||||||
env:
|
env:
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
- USE_BUNDLED_BOOST=0
|
|
||||||
- USE_BUNDLED_CMARK=0
|
|
||||||
- USE_BUNDLED_JSON=0
|
|
||||||
- MTX_STATIC=1
|
|
||||||
addons:
|
addons:
|
||||||
homebrew:
|
homebrew:
|
||||||
taps: nlohmann/json
|
taps: nlohmann/json
|
||||||
packages:
|
packages:
|
||||||
- boost
|
|
||||||
- clang-format
|
- clang-format
|
||||||
- cmake
|
- cmake
|
||||||
- cmark
|
|
||||||
- icu4c
|
|
||||||
- libsodium
|
|
||||||
- lmdb
|
|
||||||
- ninja
|
- ninja
|
||||||
- openssl
|
- openssl
|
||||||
- qt5
|
- qt5
|
||||||
|
@ -48,9 +39,6 @@ matrix:
|
||||||
- CC=gcc-7
|
- CC=gcc-7
|
||||||
- QT_PKG=512
|
- QT_PKG=512
|
||||||
- DEPLOYMENT=1
|
- DEPLOYMENT=1
|
||||||
- USE_BUNDLED_BOOST=1
|
|
||||||
- USE_BUNDLED_CMARK=1
|
|
||||||
- USE_BUNDLED_JSON=1
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -73,9 +61,6 @@ matrix:
|
||||||
- CXX=g++-8
|
- CXX=g++-8
|
||||||
- CC=gcc-8
|
- CC=gcc-8
|
||||||
- QT_PKG=59
|
- QT_PKG=59
|
||||||
- USE_BUNDLED_BOOST=1
|
|
||||||
- USE_BUNDLED_CMARK=1
|
|
||||||
- USE_BUNDLED_JSON=1
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
@ -98,9 +83,6 @@ matrix:
|
||||||
- CXX=clang++-6.0
|
- CXX=clang++-6.0
|
||||||
- CC=clang-6.0
|
- CC=clang-6.0
|
||||||
- QT_PKG=59
|
- QT_PKG=59
|
||||||
- USE_BUNDLED_BOOST=1
|
|
||||||
- USE_BUNDLED_CMARK=1
|
|
||||||
- USE_BUNDLED_JSON=1
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
sources:
|
sources:
|
||||||
|
|
43
appveyor.yml
43
appveyor.yml
|
@ -1,6 +1,6 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
version: 0.6.4-{build}
|
version: 0.7.0-{build}
|
||||||
|
|
||||||
configuration: Release
|
configuration: Release
|
||||||
image: Visual Studio 2019
|
image: Visual Studio 2019
|
||||||
|
@ -11,8 +11,8 @@ environment:
|
||||||
secure: "iGl5mzE9/ta9kFELUxDw9XtlYMSCMai9xowXIkYzU8WKHz7NfW0mLwMJZvblZFXJ"
|
secure: "iGl5mzE9/ta9kFELUxDw9XtlYMSCMai9xowXIkYzU8WKHz7NfW0mLwMJZvblZFXJ"
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- c:\tools\vcpkg\installed\ -> appveyor.yml
|
- c:\hunter\ -> appveyor.yml
|
||||||
# - .deps -> appveyor.yml,deps\CMakeLists.txt <- disabled because it randomly seems to break everytime
|
- build\_deps -> appveyor.yml,deps\CMakeLists.txt
|
||||||
|
|
||||||
build:
|
build:
|
||||||
verbosity: minimal
|
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
|
- 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"
|
- 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%
|
- 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:
|
build_script:
|
||||||
# VERSION format: branch-master/branch-1.2
|
# VERSION format: branch-master/branch-1.2
|
||||||
|
@ -57,23 +43,12 @@ build_script:
|
||||||
- echo %INSTVERSION%
|
- echo %INSTVERSION%
|
||||||
- echo %DATE%
|
- 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
|
# Build nheko
|
||||||
- rm -f cmake/FindOlm.cmake
|
|
||||||
- cmake -G "Visual Studio 16 2019" -A x64 -H. -Bbuild
|
- cmake -G "Visual Studio 16 2019" -A x64 -H. -Bbuild
|
||||||
-DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake
|
-DHUNTER_ROOT="C:\hunter"
|
||||||
-DLMDBXX_INCLUDE_DIR=.deps/usr/include
|
-DHUNTER_ENABLED=ON -DBUILD_SHARED_LIBS=OFF
|
||||||
-DTWEENY_INCLUDE_DIR=.deps/usr/include
|
-DCMAKE_BUILD_TYPE=Release -DHUNTER_CONFIGURATION_TYPES=Release
|
||||||
-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
|
|
||||||
- cmake --build build --config Release
|
- cmake --build build --config Release
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
|
@ -84,10 +59,6 @@ after_build:
|
||||||
- copy build\Release\nheko.exe NhekoRelease\nheko.exe
|
- copy build\Release\nheko.exe NhekoRelease\nheko.exe
|
||||||
- windeployqt --qmldir %QT_DIR%\qml\ --release 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\*
|
- 7z a nheko_win_64.zip .\NhekoRelease\*
|
||||||
- ls -lh build\Release\
|
- ls -lh build\Release\
|
||||||
- ls -lh NhekoRelease\
|
- ls -lh NhekoRelease\
|
||||||
|
|
Loading…
Reference in a new issue