Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dev docs generation to Jenkins: #2343

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ validators.txt

# Doxygen generated documentation output
HtmlDocumentation
docs/html_doc

# Xcode user-specific project settings
# Xcode
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "docs/docca"]
path = docs/docca
url = https://github.com/vinniefalco/docca.git
[submodule "src/nudb/extras/beast"]
path = src/nudb/extras/beast
url = https://github.com/vinniefalco/Beast.git
Expand Down
2 changes: 1 addition & 1 deletion Builds/ArchLinux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ package() {
cd "$srcdir/$pkgname"
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -D build/rippled "$pkgdir/usr/bin/rippled"
install -D -m644 doc/rippled-example.cfg "$pkgdir/etc/$pkgname/rippled.cfg"
install -D -m644 cfg/rippled-example.cfg "$pkgdir/etc/$pkgname/rippled.cfg"
mkdir -p "$pkgdir/var/lib/$pkgname/db"
mkdir -p "$pkgdir/var/log/$pkgname"
}
2 changes: 1 addition & 1 deletion Builds/Docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ RUN cd src/; scons build/rippled
RUN cp src/build/rippled rippled; strip rippled

# copy default config
RUN cp src/doc/rippled-example.cfg rippled.cfg
RUN cp src/cfg/rippled-example.cfg rippled.cfg

# clean source
RUN rm -r src
Expand Down
2 changes: 1 addition & 1 deletion Builds/Docker/build-ci.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
set -e

mkdir -p build/docker/
cp doc/rippled-example.cfg build/clang.debug/rippled build/docker/
cp cfg/rippled-example.cfg build/clang.debug/rippled build/docker/
cp Builds/Docker/Dockerfile-testnet build/docker/Dockerfile
mv build/docker/rippled-example.cfg build/docker/rippled.cfg
strip build/docker/rippled
Expand Down
2 changes: 1 addition & 1 deletion Builds/VisualStudio2015/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ the rippled server where that file is.

1. Create a directory to hold the configuration file. In this example, the
ripple config directory was created in `C:\Users\joe\ripple\config`.
2. Copy the example config file located in `doc\rippled-example.cfg` to the
2. Copy the example config file located in `cfg\rippled-example.cfg` to the
new directory and rename it "rippled.cfg".
3. Read the rippled.cfg file and edit as appropriate.

Expand Down
70 changes: 21 additions & 49 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,10 @@ if (WIN32 OR is_xcode)
# Documentation sources. Only needed for IDEs.
prepend(doc_srcs
docs/
Jamfile.v2
boostbook.dtd
consensus.qbk
index.xml
main.qbk
quickref.xml
reference.xsl
source.dox)

file(GLOB_RECURSE other_docs doc/*.md)
list(APPEND doc_srcs "${other_docs}")
set_property(
SOURCE ${doc_srcs}
APPEND
Expand Down Expand Up @@ -481,53 +476,30 @@ list(APPEND targets ${other_target})
# other_target when the user builds the solution (default when pressing <F7>)
set_property(TARGET ${other_target} PROPERTY EXCLUDE_FROM_DEFAULT_BUILD true)

find_program(
B2_EXE
NAMES b2
HINTS ${BOOST_ROOT}
PATHS ${BOOST_ROOT}
DOC "Location of the b2 build executable from Boost")
if(${B2_EXE} STREQUAL "B2_EXE-NOTFOUND")
message(WARNING
"Boost b2 executable not found. docs target will not be buildable")
elseif(NOT BOOST_ROOT)
if(Boost_INCLUDE_DIRS)
set(BOOST_ROOT ${Boost_INCLUDE_DIRS})
else()
get_filename_component(BOOST_ROOT ${B2_EXE} DIRECTORY)
find_package(Doxygen)
if(TARGET Doxygen::doxygen)
if (NOT DEFINED ENV{PLANTUML_JAR})
message(WARNING
"PLANTUML_JAR not set - @startuml diagrams will not generate")
endif()
endif()
# The value for BOOST_ROOT will be determined based on
# 1) The environment BOOST_ROOT
# 2) The Boost_INCLUDE_DIRS found by `get_boost`
# 3) The folder the `b2` executable is found in.
# If those checks don't yield the correct path, BOOST_ROOT
# can be defined on the cmake command line:
# cmake <path> -DBOOST_ROOT=<boost_path>
if(BOOST_ROOT)
set(B2_PARAMS "-sBOOST_ROOT=${BOOST_ROOT}")
endif()

# Find bash to help Windows avoid file association problems
find_program(
BASH_EXE
NAMES bash sh
DOC "Location of the bash shell executable"
# read the source config and make a modified one
# that points the output files to our build directory
FILE(READ "${CMAKE_SOURCE_DIR}/docs/source.dox" dox_content)
string(REGEX REPLACE "[\t ]*OUTPUT_DIRECTORY[\t ]*=(.*)"
"OUTPUT_DIRECTORY=${CMAKE_BINARY_DIR}\n\\1"
new_config "${dox_content}")
FILE(WRITE "${CMAKE_BINARY_DIR}/source.dox" "${new_config}")
add_custom_target(docs
COMMAND "${DOXYGEN_EXECUTABLE}" "${CMAKE_BINARY_DIR}/source.dox"
BYPRODUCTS "${CMAKE_BINARY_DIR}/html_doc/index.html"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/docs"
SOURCES "${doc_srcs}"
)
if(${BASH_EXE} STREQUAL "BASH_EXE-NOTFOUND")
else()
message(WARNING
"Unable to find bash executable. docs target may not be buildable")
set(BASH_EXE "")
"doxygen executable not found. docs target will not be buildable")
endif()

add_custom_target(docs
COMMAND ${CMAKE_COMMAND} -E env "PATH=$ENV{PATH} " ${BASH_EXE} ./makeqbk.sh
COMMAND ${B2_EXE} ${B2_PARAMS}
BYPRODUCTS "${CMAKE_SOURCE_DIR}/docs/html/index.html"
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/docs"
SOURCES "${doc_srcs}"
)

set_startup_project(rippled)

foreach(target IN LISTS targets)
Expand Down
11 changes: 0 additions & 11 deletions Jamroot

This file was deleted.

84 changes: 58 additions & 26 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,22 +88,33 @@ try {
}

stage ('Parallel Build') {
def variants = [
'coverage',
'clang.debug.unity',
'clang.debug.nounity',
'gcc.debug.unity',
'gcc.debug.nounity',
'clang.release.unity',
'gcc.release.unity'] as String[]
String[][] variants = [
['coverage'],
['docs'],
['clang.debug.unity'],
['clang.debug.nounity'],
['gcc.debug.unity'],
['gcc.debug.nounity'],
['clang.release.unity'],
['gcc.release.unity'],
// add a static build just to make sure it works
['gcc.debug.unity', "-Dstatic=true"],
// TODO - san run currently fails
//['gcc.debug.nounity' , '-Dsan=address'],
]

// create a map of all builds
// that we want to run. The map
// is string keys and node{} object values
def builds = [:]
for (int index = 0; index < variants.size(); index++) {
def bldtype = variants[index]
builds[bldtype] = {
def bldtype = variants[index][0]
def cmake_extra = variants[index].size() > 1 ? variants[index][1] : ''
def bldlabel = bldtype + cmake_extra
bldlabel = bldlabel.replace('-', '_')
bldlabel = bldlabel.replace(' ', '')
bldlabel = bldlabel.replace('=', '_')
builds[bldlabel] = {
node('rippled-dev') {
checkout scm
dir ('build') {
Expand All @@ -113,7 +124,7 @@ try {
echo "BASEDIR: ${cdir}"
def compiler = getCompiler(bldtype)
def target = getTarget(bldtype)
if (compiler == "coverage") {
if (compiler == "coverage" || compiler == "docs") {
compiler = 'gcc'
}
echo "COMPILER: ${compiler}"
Expand All @@ -130,31 +141,46 @@ try {
"TARGET=${target}",
"CC=${compiler}",
'BUILD=cmake',
"CMAKE_EXTRA_ARGS=${cmake_extra}",
'VERBOSE_BUILD=true',
"CLANG_CC=${clang_cc}",
"CLANG_CXX=${clang_cxx}",
"USE_CCACHE=${ucc}"])
{
myStage(bldtype)
myStage(bldlabel)
try {
sh "ccache -s > ${bldtype}.txt"
// the devtoolset from SCL gives us a recent gcc. It's
// not strictly needed when we are building with clang,
// but it doesn't seem to interfere either
sh "source /opt/rh/devtoolset-6/enable && " +
"(/usr/bin/time -p ./bin/ci/ubuntu/build-and-test.sh 2>&1) 2>&1 " +
">> ${bldtype}.txt"
sh "ccache -s >> ${bldtype}.txt"
sh "rm -fv ${bldlabel}.txt"
if (bldtype == "docs") {
sh '''#!/bin/bash
set -ex
log_file=''' + "${bldlabel}.txt" + '''
exec 3>&1 1>>${log_file} 2>&1
cd docs
rm -rf html_doc
/usr/bin/time -p doxygen source.dox
echo "0 tests total, 0 failures"
'''
}
else {
sh "ccache -s > ${bldlabel}.txt"
// the devtoolset from SCL gives us a recent gcc. It's
// not strictly needed when we are building with clang,
// but it doesn't seem to interfere either
sh "source /opt/rh/devtoolset-6/enable && " +
"(/usr/bin/time -p ./bin/ci/ubuntu/build-and-test.sh 2>&1) 2>&1 " +
">> ${bldlabel}.txt"
sh "ccache -s >> ${bldlabel}.txt"
}
}
finally {
def outstr = readFile("${bldtype}.txt")
def outstr = readFile("${bldlabel}.txt")
def st = getResults(outstr)
def time = getTime(outstr)
def fail_count = getFailures(outstr)
outstr = null
def txtcolor =
fail_count == 0 ? "DarkGreen" : "Crimson"
def shortbld = bldtype
def shortbld = bldlabel
shortbld = shortbld.replace('debug', 'dbg')
shortbld = shortbld.replace('release', 'rel')
shortbld = shortbld.replace('unity', 'un')
Expand All @@ -164,10 +190,16 @@ try {
"white",
"0px",
"white")
archive("${bldtype}.txt")
archive("${bldlabel}.txt")
if (bldtype == "docs") {
publishHTML(
reportName: 'Doxygen',
reportDir: 'docs/html_doc',
reportFiles: 'index.html')
}
lock('rippled_dev_status') {
all_status[bldtype] =
[fail_count == 0, bldtype, "${st}, t: ${time}"]
all_status[bldlabel] =
[fail_count == 0, bldtype + " " + cmake_extra, "${st}, t: ${time}"]
}
}
}
Expand Down Expand Up @@ -266,7 +298,7 @@ Build Type | Result | Status
httpMode: mode,
requestBody: body)
}
catch (any) {
catch (e) {
echo "had a problem interacting with github...status is probably not updated"
}
}
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
![Ripple](/images/ripple.png)
# What is Ripple?

**Do you work at a digital asset exchange or wallet provider?**
![Ripple](docs/images/ripple.png)

Please [contact us](mailto:[email protected]). We can help guide your integration.
> **Do you work at a digital asset exchange or wallet provider?**
>
> Please [contact us](mailto:[email protected]). We can help guide your integration.

# What is Ripple?
Ripple is a network of computers which use the [Ripple consensus algorithm](https://www.youtube.com/watch?v=pj1QVb1vlC0) to atomically settle and record
transactions on a secure distributed database, the Ripple Consensus Ledger
(RCL). Because of its distributed nature, the RCL offers transaction immutability
Expand Down Expand Up @@ -36,7 +37,7 @@ multiple trading parties, who each layer costs to the transaction. Thin
liquidity and many intermediary trading parties make competitive pricing
challenging.

![Flow - Direct](images/flow1.png)
![Flow - Direct](docs/images/flow1.png)

### XRP as a Bridge Currency
Ripple can bridge even exotic currency pairs directly through XRP. Similar to
Expand All @@ -47,7 +48,7 @@ counterparty risk, or additional operational costs. By using XRP, liquidity
providers can specialize in certain currency corridors, reduce operational
costs, and ultimately, offer more competitive FX pricing.

![Flow - Bridged over XRP](images/flow2.png)
![Flow - Bridged over XRP](docs/images/flow2.png)

# rippled - Ripple server
`rippled` is the reference server implementation of the Ripple
Expand Down
9 changes: 6 additions & 3 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
# Release Notes

![Ripple](/images/ripple.png)

This document contains the release notes for `rippled`, the reference server implementation of the Ripple protocol. To learn more about how to build and run a `rippled` server, visit https://ripple.com/build/rippled-setup/

**Do you work at a digital asset exchange or wallet provider?**

Please [contact us](mailto:[email protected]). We can help guide your integration.
> **Do you work at a digital asset exchange or wallet provider?**
>
> Please [contact us](mailto:[email protected]). We can help guide your integration.

## Updating `rippled`

If you are using Red Hat Enterprise Linux 7 or CentOS 7, you can [update using `yum`](https://ripple.com/build/rippled-setup/#updating-rippled). For other platforms, please [compile from source](https://wiki.ripple.com/Rippled_build_instructions).

# Releases
Expand Down
3 changes: 2 additions & 1 deletion bin/ci/ubuntu/build-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ JOBS=$((JOBS+1))

if [[ ${BUILD:-scons} == "cmake" ]]; then
echo "cmake building ${APP}"
CMAKE_EXTRA_ARGS=" -DCMAKE_VERBOSE_MAKEFILE=ON"
: ${CMAKE_EXTRA_ARGS:=""}
CMAKE_EXTRA_ARGS+=" -DCMAKE_VERBOSE_MAKEFILE=ON"
CMAKE_TARGET=$CC.$TARGET
BUILDARGS=" -j${JOBS}"
if [[ ${VERBOSE_BUILD:-} == true ]]; then
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
29 changes: 0 additions & 29 deletions doc/CHANGELOG

This file was deleted.

Loading