Skip to content

Commit

Permalink
Revive Doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
oschuett committed Sep 3, 2020
1 parent b6d7176 commit d70bb55
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 1,813 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/lib/
/obj/
/bin/
/doxygen/
/regtesting/
/install/

Expand Down
27 changes: 7 additions & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ export VERSION=sopt

MAKEFILE := $(CP2KHOME)/Makefile
ARCHDIR := $(CP2KHOME)/arch
DOXYGENDIR := $(CP2KHOME)/doc/doxygen
DATA_DIR := $(CP2KHOME)/data
MAINEXEDIR := $(CP2KHOME)/exe
MAINLIBDIR := $(CP2KHOME)/lib
Expand Down Expand Up @@ -78,7 +77,7 @@ endif
dirs makedep default_target all \
toolversions extversions extclean libcp2k cp2k_shell exts python-bindings \
pre-commit pre-commit-clean \
pretty precommit precommitclean doxygen/clean doxygen \
pretty precommit precommitclean doxygenclean doxygen \
fpretty fprettyclean \
doxify doxifyclean \
install clean realclean distclean mrproper help \
Expand Down Expand Up @@ -395,24 +394,12 @@ $(DOXIFYOBJDIR)/%.doxified: %.cpp
@touch $@

# doxygen stuff =============================================================
doxygen/clean:
-rm -rf $(DOXYGENDIR)
TOOL_HELP += "doxygen/clean : Remove the generated doxygen documentation"

# Automatic source code documentation using Doxygen
# Prerequisites:
# - stable doxygen release 1.5.4 (Oct. 27, 2007)
# - graphviz (2.16.1)
# - webdot (2.16)
#
doxygen: doxygen/clean
@mkdir -p $(DOXYGENDIR)
@mkdir -p $(DOXYGENDIR)/html
@echo "<html><body>Sorry, the Doxygen documentation is currently being updated. Please try again in a few minutes.</body></html>" > $(DOXYGENDIR)/html/index.html
cp $(ALL_SRC_FILES) $(DOXYGENDIR)
@for i in $(DOXYGENDIR)/*.F ; do mv $${i} $${i%%.*}.f90; done ;
@sed -e "s/#revision#/$(REVISION)/" $(TOOLSRC)/doxify/Doxyfile.template >$(DOXYGENDIR)/Doxyfile
cd $(DOXYGENDIR); doxygen ./Doxyfile 2>&1 | tee ./html/doxygen.out
doxygenclean:
-rm -rf $(CP2KHOME)/doxygen
TOOL_HELP += "doxygenclean : Remove the generated doxygen documentation"

doxygen: doxygenclean
$(TOOLSRC)/doxify/generate_doxygen.sh
TOOL_HELP += "doxygen : Generate the doxygen documentation"

# Precommit stuff ===========================================================
Expand Down
9 changes: 8 additions & 1 deletion tools/dashboard/dashboard.conf
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,18 @@ report_url: http://www.cp2k.org/static/regtest/trunk/cscs-daint-xc50_mc_perf/CR

[manual]
sortkey: 601
name: Input Manual
name: Manual generation
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_manual_report.txt
info_url: https://manual.cp2k.org

[doxygen]
sortkey: 605
name: Doxygen generation
host: GCP
report_url: https://storage.googleapis.com/cp2k-ci/dashboard_doxygen_report.txt
info_url: https://doxygen.cp2k.org

[ase]
sortkey: 610
name: ASE Calculator
Expand Down
16 changes: 16 additions & 0 deletions tools/docker/Dockerfile.test_doxygen
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM ubuntu:20.04

# author: Ole Schuett

WORKDIR /workspace

COPY ./scripts/install_basics.sh .
RUN ./install_basics.sh

COPY ./scripts/install_doxygen.sh .
RUN ./install_doxygen.sh

COPY ./scripts/ci_entrypoint.sh ./scripts/test_doxygen.sh ./
CMD ["./ci_entrypoint.sh", "./test_doxygen.sh"]

#EOF
10 changes: 10 additions & 0 deletions tools/docker/scripts/install_doxygen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash -e

# author: Ole Schuett

# install Ubuntu packages
apt-get update -qq
apt-get install -qq --no-install-recommends doxygen graphviz make
rm -rf /var/lib/apt/lists/*

#EOF
21 changes: 21 additions & 0 deletions tools/docker/scripts/test_doxygen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -e

# author: Ole Schuett

echo -e "\n========== Generating Doxygen =========="
cd /workspace/cp2k
if ! make doxygen &> make.out ; then
echo -e "failed.\n\n"
tail -n 100 make.out
echo -e "\nSummary: Doxygen generation failed."
echo -e "Status: FAILED\n"
exit 0
fi

mkdir -p /workspace/artifacts
mv ./doxygen/html /workspace/artifacts/doxygen

echo "Summary: Doxygen generation works fine."
echo "Status: OK"

#EOF

0 comments on commit d70bb55

Please sign in to comment.