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

[CircleCI] Add doxygen doc generation step #4011

Merged
merged 2 commits into from Aug 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion .circleci/config.yml
Expand Up @@ -15,7 +15,7 @@ experimental:
templates:
job_template: &job_template
docker:
- image: datadog/datadog-agent-runner-circle:go1129
- image: datadog/datadog-agent-runner-circle:go1129-doxygen
environment:
USE_SYSTEM_LIBS: "1"
working_directory: /go/src/github.com/DataDog/datadog-agent
Expand Down Expand Up @@ -191,6 +191,15 @@ jobs:
name: test puppy
command: ./bin/agent/agent -c ./bin/agent/dist check cpu

documentation_generation:
<<: *job_template
steps:
- restore_cache: *restore_source
- restore_cache: *restore_deps
- run:
name: generate doxygen documentation
command: inv -e rtloader.generate-doc

workflows:
version: 2
test_and_build:
Expand Down Expand Up @@ -220,6 +229,9 @@ workflows:
- docker_tests:
requires:
- dependencies
- documentation_generation:
requires:
- dependencies
- build_binaries:
requires:
- unit_tests
Expand Down
3 changes: 2 additions & 1 deletion .circleci/images/runner/Dockerfile
Expand Up @@ -7,7 +7,8 @@ RUN set -ex \
gcc g++ make git ssh curl pkg-config file \
python-dev python-setuptools python-pip \
python3.7-dev python3-distutils python3-pip python3-yaml \
libssl-dev libsnmp-base libsnmp-dev libpq-dev snmp-mibs-downloader libsystemd-dev
libssl-dev libsnmp-base libsnmp-dev libpq-dev snmp-mibs-downloader libsystemd-dev \
doxygen graphviz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is graphviz also needed?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dot (included in the graphviz package) is needed to draw the class & dependency graphs on each page of the documentation. It's not strictly required (the doxygen command will still complete), but not adding it will make doxygen output a bunch of error / warning messages because of dot not being available.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


# Golang
ENV GIMME_GO_VERSION 1.12.9
Expand Down
6 changes: 6 additions & 0 deletions tasks/rtloader.py
Expand Up @@ -93,6 +93,12 @@ def generate_doc(ctx):
"""
rtloader_path = get_rtloader_path()

# Clean up Doxyfile options that are not supported on the version of Doxygen used
result = ctx.run("doxygen -u '{}/doxygen/Doxyfile'".format(rtloader_path), warn=True)
if result.exited != 0:
print("Fatal error encountered while trying to clean up the Doxyfile.")
raise Exit(code=result.exited)

# doxygen puts both errors and warnings in stderr
result = ctx.run("doxygen '{0}/doxygen/Doxyfile' 2>'{0}/doxygen/errors.log'".format(rtloader_path), warn=True)

Expand Down