mirror of
https://github.com/XRPLF/clio.git
synced 2025-11-18 10:45:51 +00:00
changes for external build
use XRPLF repos build develop-next branch; self-hosted runner force linux runner
This commit is contained in:
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@@ -1,10 +1,10 @@
|
||||
name: Build Clio
|
||||
on:
|
||||
push:
|
||||
branches: [master, develop]
|
||||
branches: [master, develop, develop-next]
|
||||
pull_request:
|
||||
branches: [master, develop]
|
||||
|
||||
branches: [master, develop, develop-next]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
name: Lint
|
||||
@@ -12,30 +12,36 @@ jobs:
|
||||
steps:
|
||||
- name: Get source
|
||||
uses: actions/checkout@v3
|
||||
|
||||
|
||||
- name: Run clang-format
|
||||
uses: XRPLF/clio-build/lint@main
|
||||
|
||||
build_clio:
|
||||
uses: XRPLF/clio-gha/lint@main
|
||||
|
||||
build_clio:
|
||||
name: Build
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: [self-hosted, Linux]
|
||||
needs: lint
|
||||
steps:
|
||||
- name: Get clio repo
|
||||
- name: Get Clio repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: clio_src
|
||||
|
||||
- name: Get gha repo
|
||||
ref: 'develop-next'
|
||||
|
||||
- name: Get Clio CI repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: XRPLF/clio-build
|
||||
ref: main
|
||||
path: gha # must be the same as defined in XRPLF/clio-build
|
||||
|
||||
path: clio_ci
|
||||
repository: 'XRPLF/clio-ci'
|
||||
|
||||
- name: Get GitHub actions repo
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: XRPLF/clio-gha
|
||||
path: gha # must be the same as defined in XRPLF/clio-gha
|
||||
|
||||
- name: Build
|
||||
uses: XRPLF/clio-build/build@main
|
||||
|
||||
uses: XRPLF/clio-gha/build@main
|
||||
|
||||
# - name: Artifact clio_tests
|
||||
# uses: actions/upload-artifact@v2
|
||||
# with:
|
||||
|
||||
@@ -16,6 +16,7 @@ ExternalProject_Add(postgres
|
||||
${POSTGRES_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pgcommon${CMAKE_STATIC_LIBRARY_SUFFIX}}
|
||||
${POSTGRES_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}pgport${CMAKE_STATIC_LIBRARY_SUFFIX}}
|
||||
)
|
||||
ExternalProject_Get_Property (postgres BINARY_DIR)
|
||||
|
||||
foreach(_lib ${POSTGRES_LIBS})
|
||||
add_library(${_lib} STATIC IMPORTED GLOBAL)
|
||||
@@ -26,5 +27,5 @@ foreach(_lib ${POSTGRES_LIBS})
|
||||
INTERFACE_INCLUDE_DIRECTORIES ${POSTGRES_INSTALL_DIR}/include)
|
||||
target_link_libraries(clio PUBLIC ${POSTGRES_INSTALL_DIR}/lib/${CMAKE_STATIC_LIBRARY_PREFIX}${_lib}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
endforeach()
|
||||
|
||||
add_dependencies(clio postgres)
|
||||
target_include_directories(clio PUBLIC ${POSTGRES_INSTALL_DIR}/include)
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
execute_process(
|
||||
COMMAND ln -s ${CMAKE_INSTALL_PREFIX}/${CLIO_INSTALL_DIR}/bin/clio_server /usr/local/bin/clio_server
|
||||
COMMAND_ECHO STDOUT
|
||||
)
|
||||
16
CMake/install/clio.service.in
Normal file
16
CMake/install/clio.service.in
Normal file
@@ -0,0 +1,16 @@
|
||||
[Unit]
|
||||
Description=Clio XRPL API server
|
||||
Documentation=https://github.com/XRPLF/clio.git
|
||||
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=@CLIO_INSTALL_DIR@/bin/clio_server @CLIO_INSTALL_DIR@/etc/config.json
|
||||
Restart=on-failure
|
||||
User=clio
|
||||
Group=clio
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -1,7 +1,10 @@
|
||||
set(CLIO_INSTALL_DIR /opt/clio)
|
||||
set(CLIO_INSTALL_DIR "/opt/clio")
|
||||
set(CMAKE_INSTALL_PREFIX ${CLIO_INSTALL_DIR})
|
||||
|
||||
install(TARGETS clio_server DESTINATION bin)
|
||||
# install(TARGETS clio_tests DESTINATION bin) # NOTE: Do we want to install the tests?
|
||||
install(FILES example-config.json DESTINATION etc/clio)
|
||||
install(SCRIPT "${CMAKE_SOURCE_DIR}/CMake/install/PostInstall.cmake")
|
||||
install(FILES example-config.json DESTINATION etc RENAME config.json)
|
||||
|
||||
configure_file("${CMAKE_SOURCE_DIR}/CMake/install/clio.service.in" "${CMAKE_BINARY_DIR}/clio.service")
|
||||
|
||||
install(FILES "${CMAKE_BINARY_DIR}/clio.service" DESTINATION /lib/systemd/system)
|
||||
@@ -81,3 +81,6 @@ if(BUILD_TESTS)
|
||||
endif()
|
||||
|
||||
include(CMake/install/install.cmake)
|
||||
if(PACKAGING)
|
||||
include(CMake/packaging.cmake)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user