Skip to content

Commit

Permalink
Fix/doc build ci (#109)
Browse files Browse the repository at this point in the history
* Fix documentation tools to generate the installers in the CI
* Including readthedocs YAML file
  • Loading branch information
Oscar Torreno authored May 23, 2019
1 parent 2746252 commit 94da252
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .CI/travis/install_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ sudo apt-get update -y
sudo apt-get install -y lcov python3 python3-pip rpm

# Installing conan
sudo pip3 install conan==1.6.1
sudo pip3 install conan==1.5.2

if ! [[ -z "${TRAVIS_TAG}" ]]; then
sudo apt-get install -y doxygen graphviz
sudo pip3 install sphinx==1.8.3 breathe sphinx_rtd_theme
sudo pip3 install sphinx==1.7.5 breathe==4.9.1 sphinx_rtd_theme==0.4.0
fi

# Installing library dependencies with conan
Expand Down
4 changes: 2 additions & 2 deletions .CI/travis/install_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ brew install --force freeimage fontconfig glfw glbinding

# Installing conan
pip${PYTHON_VERSION} install --upgrade pip
pip${PYTHON_VERSION} install conan
pip${PYTHON_VERSION} install conan==1.5.2

if ! [[ -z "${TRAVIS_TAG}" ]]; then
brew install doxygen graphviz
pip${PYTHON_VERSION} install sphinx==1.8.3 breathe sphinx_rtd_theme
pip${PYTHON_VERSION} install sphinx==1.7.5 breathe==4.9.1 sphinx_rtd_theme==0.4.0
fi

# Installing library dependencies with conan
Expand Down
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ before_build:
Start-Process "choco" "install doxygen.install" -NoNewWindow -Wait
Start-Process "choco" "install graphviz" -NoNewWindow -Wait
python -m pip install --upgrade pip
pip3 install sphinx breathe sphinx_rtd_theme
pip3 install sphinx==1.7.5 breathe==4.9.1 sphinx_rtd_theme==0.4.0
}
build_script:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,4 @@ test/versionTest.cpp
.idea/
*.gcov
*.info
.vscode/ipch
23 changes: 23 additions & 0 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: doc/sphinx/source/conf.py

# Build documentation with MkDocs
#mkdocs:
# configuration: mkdocs.yml

# Optionally build your docs in additional formats such as PDF and ePub
formats: all

# Optionally set the version of Python and requirements required to build your docs
python:
version: 3.7
install:
- requirements: doc/sphinx/source/requirements.txt
8 changes: 2 additions & 6 deletions doc/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import pip
import subprocess

# import sys
Expand Down Expand Up @@ -43,11 +42,6 @@
release = subprocess.check_output(
["git", "describe"]).strip().decode("utf-8").split('-')[0]

on_rtd = os.environ.get('READTHEDOCS', None) == 'True'

if on_rtd:
subprocess.call("pip install breathe", shell=True)

with open(doxygen_source_dir + "/Doxyfile.in") as f:
newText = f.read().replace('@VERSION_SHORT@', release).replace(
'@DOXYGEN_OUTPUT_DIR@', doxygen_dir)
Expand Down Expand Up @@ -138,6 +132,8 @@
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['css']


def setup(app):
app.add_stylesheet('custom.css')

Expand Down
1 change: 1 addition & 0 deletions doc/sphinx/source/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
breathe==4.9.1

0 comments on commit 94da252

Please sign in to comment.