mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Improve CI and packaging:
* add travis build for min cmake supported * add travis build for validator keys (uses xrpl_core) * add travis build for ipv6 (mac only) * add cmake target for validator keys via FetchContent * use validator keys target in package build
This commit is contained in:
committed by
Nik Bougalis
parent
5834fbbc5d
commit
008fc5155a
@@ -11,7 +11,7 @@ RIPPLED_DPKG_VERSION=$(echo "${RIPPLED_VERSION}" | sed 's!-!~!g')
|
||||
# version here (hardcoded to 1). Does it ever need to change?
|
||||
RIPPLED_DPKG_FULL_VERSION="${RIPPLED_DPKG_VERSION}-1"
|
||||
|
||||
cd rippled
|
||||
cd /opt/rippled_bld/pkg/rippled
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
git status
|
||||
error "Unstaged changes in this repo - please commit first"
|
||||
|
||||
@@ -25,20 +25,11 @@ override_dh_auto_configure:
|
||||
|
||||
override_dh_auto_build:
|
||||
cd bld && \
|
||||
cmake --build . --parallel -- -v
|
||||
cmake --build . --target rippled --target validator-keys --parallel -- -v
|
||||
|
||||
override_dh_auto_install:
|
||||
cd bld && DESTDIR=../debian/tmp cmake --build . --target install -- -v
|
||||
rm -rf bld_vl
|
||||
mkdir -p bld_vl
|
||||
cd bld_vl && \
|
||||
cmake ../../validator-keys-tool -G Ninja \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_PREFIX_PATH=${PWD}/debian/tmp/opt/ripple/ \
|
||||
-Dstatic=true \
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON && \
|
||||
cmake --build . --parallel -- -v
|
||||
install -D bld_vl/validator-keys debian/tmp/opt/ripple/bin/validator-keys
|
||||
install -D bld/validator-keys/validator-keys debian/tmp/opt/ripple/bin/validator-keys
|
||||
install -D Builds/containers/shared/update-rippled.sh debian/tmp/opt/ripple/bin/update-rippled.sh
|
||||
install -D Builds/containers/shared/update-rippled-cron debian/tmp/opt/ripple/etc/update-rippled-cron
|
||||
install -D Builds/containers/shared/rippled-logrotate debian/tmp/etc/logrotate.d/rippled
|
||||
|
||||
@@ -25,14 +25,14 @@ if [[ $RPM_PATCH ]]; then
|
||||
export RPM_PATCH
|
||||
fi
|
||||
|
||||
cd rippled
|
||||
cd /opt/rippled_bld/pkg/rippled
|
||||
if [[ -n $(git status --porcelain) ]]; then
|
||||
git status
|
||||
error "Unstaged changes in this repo - please commit first"
|
||||
fi
|
||||
git archive --format tar.gz --prefix rippled/ -o ../rpmbuild/SOURCES/rippled.tar.gz HEAD
|
||||
# TODO include validator-keys sources
|
||||
cd ..
|
||||
tar -zc --exclude-vcs -f ./rpmbuild/SOURCES/validator-keys.tar.gz validator-keys-tool/
|
||||
|
||||
source /opt/rh/devtoolset-8/enable
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ Summary: rippled daemon
|
||||
License: MIT
|
||||
URL: http://ripple.com/
|
||||
Source0: rippled.tar.gz
|
||||
Source1: validator-keys.tar.gz
|
||||
|
||||
BuildRequires: protobuf-static openssl-static cmake zlib-static ninja-build
|
||||
|
||||
@@ -27,26 +26,14 @@ Requires: openssl-static, zlib-static
|
||||
core library for development of standalone applications that sign transactions.
|
||||
|
||||
%prep
|
||||
%setup -c -n rippled -a 1
|
||||
%setup -c -n rippled
|
||||
|
||||
%build
|
||||
cd rippled
|
||||
mkdir -p bld.release
|
||||
cd bld.release
|
||||
cmake .. -G Ninja -DCMAKE_INSTALL_PREFIX=%{_prefix} -DCMAKE_BUILD_TYPE=Release -Dstatic=true -DCMAKE_VERBOSE_MAKEFILE=ON -Dlocal_protobuf=ON
|
||||
# build VK
|
||||
cd ../../validator-keys-tool
|
||||
mkdir -p bld.release
|
||||
cd bld.release
|
||||
# Install a copy of the rippled artifacts into a local VK build dir so that it
|
||||
# can use them to build against (VK needs xrpl_core lib to build). We install
|
||||
# into a local build dir instead of buildroot because we want VK to have
|
||||
# relative paths embedded in debug info, otherwise check-buildroot (rpmbuild)
|
||||
# will complain
|
||||
mkdir xrpl_dir
|
||||
DESTDIR="%{_builddir}/validator-keys-tool/bld.release/xrpl_dir" cmake --build ../../rippled/bld.release --target install -- -v
|
||||
cmake .. -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%{_builddir}/validator-keys-tool/bld.release/xrpl_dir/opt/ripple -Dstatic=true -DCMAKE_VERBOSE_MAKEFILE=ON
|
||||
cmake --build . --parallel -- -v
|
||||
cmake --build . --parallel --target rippled --target validator-keys -- -v
|
||||
|
||||
%pre
|
||||
test -e /etc/pki/tls || { mkdir -p /etc/pki; ln -s /usr/lib/ssl /etc/pki/tls; }
|
||||
@@ -59,7 +46,7 @@ install -d ${RPM_BUILD_ROOT}/usr/local/bin
|
||||
ln -s %{_prefix}/etc/rippled.cfg ${RPM_BUILD_ROOT}/etc/opt/ripple/rippled.cfg
|
||||
ln -s %{_prefix}/etc/validators.txt ${RPM_BUILD_ROOT}/etc/opt/ripple/validators.txt
|
||||
ln -s %{_prefix}/bin/rippled ${RPM_BUILD_ROOT}/usr/local/bin/rippled
|
||||
install -D validator-keys-tool/bld.release/validator-keys ${RPM_BUILD_ROOT}%{_bindir}/validator-keys
|
||||
install -D rippled/bld.release/validator-keys/validator-keys ${RPM_BUILD_ROOT}%{_bindir}/validator-keys
|
||||
install -D ./rippled/Builds/containers/shared/rippled.service ${RPM_BUILD_ROOT}/usr/lib/systemd/system/rippled.service
|
||||
install -D ./rippled/Builds/containers/packaging/rpm/50-rippled.preset ${RPM_BUILD_ROOT}/usr/lib/systemd/system-preset/50-rippled.preset
|
||||
install -D ./rippled/Builds/containers/shared/update-rippled.sh ${RPM_BUILD_ROOT}%{_bindir}/update-rippled.sh
|
||||
@@ -109,6 +96,9 @@ chown -R root:$GROUP_NAME %{_prefix}/etc/update-rippled-cron
|
||||
%{_prefix}/lib/cmake/ripple
|
||||
|
||||
%changelog
|
||||
* Wed Aug 28 2019 Mike Ellery <mellery451@gmail.com>
|
||||
- Switch to subproject build for validator-keys
|
||||
|
||||
* Wed May 15 2019 Mike Ellery <mellery451@gmail.com>
|
||||
- Make validator-keys use local rippled build for core lib
|
||||
|
||||
|
||||
Reference in New Issue
Block a user