mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Improve the Doxygen Workflow
* Use official build environment Docker image * Update documentation and Doxygen website URLs
This commit is contained in:
committed by
Nik Bougalis
parent
6477bdf3e8
commit
858e93c7f8
14
.github/workflows/doxygen.yml
vendored
14
.github/workflows/doxygen.yml
vendored
@@ -7,17 +7,19 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
job:
|
job:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
|
container:
|
||||||
|
image: docker://rippleci/rippled-ci-builder:2944b78d22db
|
||||||
steps:
|
steps:
|
||||||
- name: checkout
|
- name: checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: set OUTPUT_DIRECTORY
|
|
||||||
run: echo 'OUTPUT_DIRECTORY = html' >> docs/Doxyfile
|
|
||||||
- name: build
|
- name: build
|
||||||
uses: mattnotmitt/doxygen-action@v1
|
run: |
|
||||||
with:
|
mkdir build
|
||||||
doxyfile-path: 'docs/Doxyfile'
|
cd build
|
||||||
|
cmake -DBoost_NO_BOOST_CMAKE=ON ..
|
||||||
|
cmake --build . --target docs --parallel $(nproc)
|
||||||
- name: publish
|
- name: publish
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./html
|
publish_dir: build/docs/html
|
||||||
|
|||||||
@@ -76,9 +76,3 @@ add_custom_command (
|
|||||||
add_custom_target (docs
|
add_custom_target (docs
|
||||||
DEPENDS "${doxygen_index_file}"
|
DEPENDS "${doxygen_index_file}"
|
||||||
SOURCES "${dependencies}")
|
SOURCES "${dependencies}")
|
||||||
if (is_multiconfig)
|
|
||||||
set_property (
|
|
||||||
SOURCE ${dependencies}
|
|
||||||
APPEND PROPERTY
|
|
||||||
HEADER_FILE_ONLY true)
|
|
||||||
endif ()
|
|
||||||
|
|||||||
@@ -56,6 +56,7 @@ git-subtree. See those directories' README files for more details.
|
|||||||
* [XRP Ledger Dev Portal](https://developers.ripple.com/)
|
* [XRP Ledger Dev Portal](https://developers.ripple.com/)
|
||||||
* [XRP News](https://ripple.com/category/xrp/)
|
* [XRP News](https://ripple.com/category/xrp/)
|
||||||
* [Setup and Installation](https://developers.ripple.com/install-rippled.html)
|
* [Setup and Installation](https://developers.ripple.com/install-rippled.html)
|
||||||
|
* [Doxygen](https://ripple.github.io/rippled)
|
||||||
|
|
||||||
To learn about how Ripple is transforming global payments, visit
|
To learn about how Ripple is transforming global payments, visit
|
||||||
<https://ripple.com/contact/>.
|
<https://ripple.com/contact/>.
|
||||||
|
|||||||
@@ -1,75 +1,63 @@
|
|||||||
# Building documentation
|
# Building documentation
|
||||||
|
|
||||||
## Install Dependencies
|
## Dependencies
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
Install these dependencies:
|
Install these dependencies:
|
||||||
|
|
||||||
1. Install [Doxygen](http://www.stack.nl/~dimitri/doxygen/download.html)
|
- [Doxygen](http://www.doxygen.nl): All major platforms have [official binary
|
||||||
|
distributions](http://www.doxygen.nl/download.html#srcbin), or you can
|
||||||
|
build from [source](http://www.doxygen.nl/download.html#srcbin).
|
||||||
|
|
||||||
### MacOS
|
- MacOS: We recommend installing via Homebrew: `brew install doxygen`.
|
||||||
|
The executable will be installed in `/usr/local/bin` which is already
|
||||||
|
in the default `PATH`.
|
||||||
|
|
||||||
1. Install doxygen:
|
If you use the official binary distribution, then you'll need to make
|
||||||
* Use homebrew to install: `brew install doxygen`. The executable will be
|
Doxygen available to your command line. You can do this by adding
|
||||||
installed in `/usr/local/bin` which is already in your path.
|
a symbolic link from `/usr/local/bin` to the `doxygen` executable. For
|
||||||
* Alternatively, install from here: [doxygen](http://www.stack.nl/~dimitri/doxygen/download.html).
|
example,
|
||||||
You'll then need to make doxygen available to your command line. You can
|
|
||||||
do this by adding a symbolic link from `/usr/local/bin` to the doxygen
|
|
||||||
executable. For example, `$ ln -s /Applications/Doxygen.app/Contents/Resources/doxygen /usr/local/bin/doxygen`
|
|
||||||
|
|
||||||
### Linux
|
```
|
||||||
|
$ ln -s /Applications/Doxygen.app/Contents/Resources/doxygen /usr/local/bin/doxygen
|
||||||
|
```
|
||||||
|
|
||||||
1. Install doxygen using your package manager OR from source using the links above.
|
- [PlantUML](http://plantuml.com):
|
||||||
|
|
||||||
### [Optional] Install Plantuml (all platforms)
|
1. Install a functioning Java runtime, if you don't already have one.
|
||||||
|
2. Download [`plantuml.jar`](http://sourceforge.net/projects/plantuml/files/plantuml.jar/download).
|
||||||
|
|
||||||
Doxygen supports the optional use of [plantuml](http://plantuml.com) to
|
- [Graphviz](https://www.graphviz.org):
|
||||||
generate diagrams from `@startuml` sections. We don't currently rely on this
|
|
||||||
functionality for docs, so it's largely optional. Requirements:
|
|
||||||
|
|
||||||
1. Download/install a functioning java runtime, if you don't already have one.
|
- Linux: Install from your package manager.
|
||||||
2. Download [plantuml](http://plantuml.com) from
|
- Windows: Use an [official installer](https://graphviz.gitlab.io/_pages/Download/Download_windows.html).
|
||||||
[here](http://sourceforge.net/projects/plantuml/files/plantuml.jar/download).
|
- MacOS: Install via Homebrew: `brew install graphviz`.
|
||||||
Set a system environment variable named `DOXYGEN_PLANTUML_JAR_PATH` to
|
|
||||||
the absolute path of the `plantuml.jar` file you downloaded.
|
|
||||||
|
|
||||||
|
|
||||||
## Configure
|
|
||||||
|
|
||||||
You should set these environment variables:
|
|
||||||
|
|
||||||
- `DOXYGEN_OUTPUT_DIRECTORY`
|
|
||||||
- `DOXYGEN_PLANTUML_JAR_PATH`
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
From the rippled root folder:
|
|
||||||
|
|
||||||
```
|
|
||||||
doxygen docs/Doxyfile
|
|
||||||
```
|
|
||||||
|
|
||||||
The output will be wherever you chose for `DOXYGEN_OUTPUT_DIRECTORY`.
|
|
||||||
|
|
||||||
## Docker
|
## Docker
|
||||||
|
|
||||||
(applicable to all platforms)
|
Instead of installing the above dependencies locally, you can use the official
|
||||||
|
build environment Docker image, which has all of them installed already.
|
||||||
Instead of installing the doxygen tools locally, you can use the provided `Dockerfile` to create
|
|
||||||
an ubuntu based image for running the tools:
|
|
||||||
|
|
||||||
1. Install [Docker](https://docs.docker.com/engine/installation/)
|
1. Install [Docker](https://docs.docker.com/engine/installation/)
|
||||||
2. Build Docker image. From the rippled root folder:
|
2. Pull the image:
|
||||||
|
```
|
||||||
|
sudo docker pull rippleci/rippled-ci-builder:2944b78d22db
|
||||||
|
```
|
||||||
|
3. Run the image from the project folder:
|
||||||
|
```
|
||||||
|
sudo docker run -v $PWD:/opt/rippled --rm rippleci/rippled-ci-builder:2944b78d22db
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
There is a `docs` target in the CMake configuration.
|
||||||
|
|
||||||
```
|
```
|
||||||
sudo docker build -t rippled-docs docs/
|
mkdir build
|
||||||
|
cd build
|
||||||
|
cmake ..
|
||||||
|
cmake --build . --target docs
|
||||||
```
|
```
|
||||||
|
|
||||||
Then to run the image, from the rippled root folder:
|
The output will be in `build/docs/html`.
|
||||||
|
|
||||||
```
|
|
||||||
sudo docker run -v $PWD:/opt/rippled --rm rippled-docs
|
|
||||||
```
|
|
||||||
|
|
||||||
The output will be in `html`.
|
|
||||||
|
|||||||
Reference in New Issue
Block a user