include nano_pow_server as a submodule and build into ci framework for tagged releases (#2333)

* add nano-pow-server submodule
add NANO_POW_SERVER defaulting to off that when enabled will build the nano-pow-server and include them with the artifact release bundle
Update build artifacts
use known paths to distribute module targets to work around limitations on cmake prior to 3.13
3.9.5 is included with build, this provides compatibility

rehome nano-pow-server module in the root project source updating install targets appropriately
on appveyor tag as NOT_ARTIFACT when building

* check for definition of APPVEYOR_REPO_TAG_NAME

* cleanup cmake file

* casing matters with targets :)

* whitespace
This commit is contained in:
Russel Waters 2019-10-24 09:49:21 -04:00 committed by GitHub
commit d32b8ea01c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 27 additions and 4 deletions

3
.gitmodules vendored
View file

@ -18,3 +18,6 @@
[submodule "cpptoml"]
path = cpptoml
url = https://github.com/cryptocode/cpptoml.git
[submodule "nano-pow-server"]
path = nano-pow-server
url = https://github.com/nanocurrency/nano-pow-server.git

View file

@ -30,6 +30,7 @@ set (NANO_GUI OFF CACHE BOOL "")
set (NANO_TEST OFF CACHE BOOL "")
set (NANO_SECURE_RPC OFF CACHE BOOL "")
set (NANO_ROCKSDB OFF CACHE BOOL "")
set (NANO_POW_SERVER OFF CACHE BOOL "")
set (NANO_WARN_TO_ERR OFF CACHE BOOL "")
set (NANO_TIMED_LOCKS 0 CACHE INTEGER "")
@ -338,6 +339,9 @@ add_library (blake2
target_compile_definitions(blake2 PRIVATE -D__SSE2__)
if (NANO_POW_SERVER)
add_subdirectory(nano-pow-server)
endif ()
add_subdirectory(nano/crypto_lib)
add_subdirectory(nano/secure)
add_subdirectory(nano/lib)
@ -372,7 +376,6 @@ if (NANO_TEST OR RAIBLOCKS_TEST)
add_subdirectory(nano/rpc_test)
add_subdirectory(nano/slow_test)
endif ()
if (NANO_GUI OR RAIBLOCKS_GUI)
install (FILES ${PROJECT_BINARY_DIR}/config-node.toml.sample DESTINATION .)
install (FILES ${PROJECT_BINARY_DIR}/config-rpc.toml.sample DESTINATION .)
@ -473,6 +476,10 @@ if (NANO_GUI OR RAIBLOCKS_GUI)
install (DIRECTORY ${Qt5_DIR}/../../QtTest.framework DESTINATION Nano.app/Contents/Frameworks)
install (DIRECTORY ${Qt5_DIR}/../../QtWidgets.framework DESTINATION Nano.app/Contents/Frameworks)
install (FILES "${Qt5_DIR}/../../../plugins/platforms/libqcocoa.dylib" DESTINATION Nano.app/Contents/PlugIns/platforms)
if (NANO_POW_SERVER)
install (TARGETS nano_pow_server DESTINATION Nano.app/Contents/MacOS)
install (DIRECTORY ${PROJECT_SOURCE_DIR}/nano-pow-server/public DESTINATION Nano.app/Contents/MacOS)
endif()
install (FILES Nano.icns DESTINATION Nano.app/Contents/Resources)
elseif (WIN32)
if ("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
@ -497,6 +504,10 @@ if (NANO_GUI OR RAIBLOCKS_GUI)
get_filename_component (Qt5_bin_DIR ${Qt5_DIR}/../../../bin ABSOLUTE)
install (TARGETS nano_wallet DESTINATION .)
install (TARGETS nano_wallet_com DESTINATION .)
if (NANO_POW_SERVER)
install (TARGETS nano_pow_server DESTINATION .)
install (DIRECTORY ${PROJECT_SOURCE_DIR}/nano-pow-server/public DESTINATION .)
endif ()
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/${WIN_REDIST} DESTINATION .)
install (FILES ${Qt5_bin_DIR}/libGLESv2.dll DESTINATION .)
install (FILES ${Qt5_bin_DIR}/Qt5Core.dll DESTINATION .)
@ -509,9 +520,12 @@ if (NANO_GUI OR RAIBLOCKS_GUI)
install(TARGETS nano_wallet
RUNTIME DESTINATION .
)
if (NANO_POW_SERVER)
install (TARGETS nano_pow_server DESTINATION .)
install (DIRECTORY ${PROJECT_SOURCE_DIR}/nano-pow-server/public DESTINATION .)
endif ()
endif ()
endif ()
set (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/LICENSE)
include (CPack)

View file

@ -23,7 +23,9 @@ install:
- del temp.txt
- echo set(VCPKG_BUILD_TYPE release) >> C:\Tools\vcpkg\triplets\x64-windows.cmake
- vcpkg install rocksdb:%PLATFORM%-windows
- cmake -DNANO_GUI=ON -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DACTIVE_NETWORK=%NETWORK% -DQt5_DIR="C:\Qt\5.9\msvc2017_64\lib\cmake\Qt5" -DNANO_SIMD_OPTIMIZATIONS=TRUE -DBoost_COMPILER="-vc141" -DBOOST_ROOT="C:/Libraries/boost_1_67_0" -DBOOST_LIBRARYDIR="C:/Libraries/boost_1_67_0/lib64-msvc-14.1" -G "Visual Studio 15 2017 Win64" -DNANO_ROCKSDB=ON -DROCKSDB_LIBRARIES="%VCPKG_DIR%\installed\x64-windows\lib\rocksdb.lib" -DROCKSDB_INCLUDE_DIRS="%VCPKG_DIR%\installed\x64_windows\include" -DZLIB_LIBRARY=%VCPKG_DIR%\installed\x64-windows\lib\zlib.lib -DZLIB_INCLUDE_DIR=%VCPKG_DIR%\installed\x64-windows\include -DIPHLPAPI_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/iphlpapi.lib" -DWINSOCK2_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/WS2_32.lib" .
- IF NOT DEFINED APPVEYOR_REPO_TAG_NAME (set APPVEYOR_REPO_TAG_NAME=NOT_ARTIFACT)
- set TRAVIS_TAG=%APPVEYOR_REPO_TAG_NAME%
- cmake -DNANO_GUI=ON -DNANO_POW_SERVER=ON -DCI_BUILD=ON -DCMAKE_BUILD_TYPE=%CONFIGURATION% -DACTIVE_NETWORK=%NETWORK% -DQt5_DIR="C:\Qt\5.9\msvc2017_64\lib\cmake\Qt5" -DNANO_SIMD_OPTIMIZATIONS=TRUE -DBoost_COMPILER="-vc141" -DBOOST_ROOT="C:/Libraries/boost_1_67_0" -DBOOST_LIBRARYDIR="C:/Libraries/boost_1_67_0/lib64-msvc-14.1" -G "Visual Studio 15 2017 Win64" -DNANO_ROCKSDB=ON -DROCKSDB_LIBRARIES="%VCPKG_DIR%\installed\x64-windows\lib\rocksdb.lib" -DROCKSDB_INCLUDE_DIRS="%VCPKG_DIR%\installed\x64_windows\include" -DZLIB_LIBRARY=%VCPKG_DIR%\installed\x64-windows\lib\zlib.lib -DZLIB_INCLUDE_DIR=%VCPKG_DIR%\installed\x64-windows\include -DIPHLPAPI_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/iphlpapi.lib" -DWINSOCK2_LIBRARY="C:/Program Files (x86)/Windows Kits/10/Lib/10.0.14393.0/um/x64/WS2_32.lib" .
- ps: Invoke-WebRequest -Uri https://aka.ms/vs/15/release/vc_redist.x64.exe -OutFile .\vc_redist.x64.exe
build:

View file

@ -22,6 +22,7 @@ fi
cmake \
-G'Unix Makefiles' \
-DACTIVE_NETWORK=nano_${NETWORK_CFG}_network \
-DNANO_POW_SERVER=ON \
-DNANO_GUI=ON \
-DNANO_ROCKSDB=ON \
-DCMAKE_BUILD_TYPE=${CONFIGURATION} \

View file

@ -7,15 +7,17 @@ ADD ./ /tmp/src
RUN mkdir /tmp/build && \
cd /tmp/build && \
cmake /tmp/src -DCI_BUILD=${CI_BUILD} -DBOOST_ROOT=${BOOST_ROOT} -DACTIVE_NETWORK=nano_${NETWORK}_network -DNANO_ROCKSDB=ON && \
cmake /tmp/src -DCI_BUILD=${CI_BUILD} -DBOOST_ROOT=${BOOST_ROOT} -DACTIVE_NETWORK=nano_${NETWORK}_network -DNANO_ROCKSDB=ON -DNANO_POW_SERVER=ON && \
make nano_node -j $(nproc) && \
make nano_rpc -j $(nproc) && \
make nano_pow_server -j $(nproc) && \
cd .. && \
echo ${NETWORK} > /etc/nano-network
FROM ubuntu:16.04
COPY --from=0 /tmp/build/nano_node /usr/bin
COPY --from=0 /tmp/build/nano_rpc /usr/bin
COPY --from=0 /tmp/build/nano_pow_server /usr/bin
COPY --from=0 /etc/nano-network /etc
COPY docker/node/entry.sh /entry.sh
COPY docker/node/config /usr/share/nano/config

1
nano-pow-server Submodule

@ -0,0 +1 @@
Subproject commit 32e7826865ce4af069f79eceeefe2a1092e28b53