Skip to content
Permalink
Browse files

run Doxygen and doc coverage test on static Travis config

  • Loading branch information
3nids committed Jun 5, 2017
1 parent 05d9f92 commit 281daee0ba2a2f0e97c13aebca292d9250bab42c
@@ -4,6 +4,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.6)

SET(CMAKE_CXX_STANDARD 11)

SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../../../cmake ${CMAKE_MODULE_PATH})

ADD_SUBDIRECTORY(../../../src/astyle qgisstyle)

ENABLE_TESTING()
@@ -12,3 +14,15 @@ ADD_TEST(qgis_indentation ${CMAKE_SOURCE_DIR}/../../../scripts/verify-indentatio
ADD_TEST(qgis_spelling ${CMAKE_SOURCE_DIR}/../../../scripts/spell_check/spell_test.sh)
ADD_TEST(qgis_sipify ${CMAKE_SOURCE_DIR}/../../../tests/scripts/test_sipify.sh)
ADD_TEST(qgis_sip_uptodate ${CMAKE_SOURCE_DIR}/../../../tests/scripts/test_sipfiles_uptodate.sh)

IF (WITH_APIDOC)
ADD_SUBDIRECTORY(../../../doc doc)

INCLUDE(CreateQgsVersion)
CREATE_QGSVERSION()

set(QGIS_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/doc")

INCLUDE(UsePythonTest)
ADD_PYTHON_TEST(PyQgsDocCoverage ${CMAKE_SOURCE_DIR}/../../../tests/src/python/test_qgsdoccoverage.py)
ENDIF (WITH_APIDOC)
@@ -13,4 +13,4 @@
# #
###########################################################################

pip install autopep8
pip install autopep8 nose2 mock termcolor
@@ -18,5 +18,5 @@ export CORES=2
mkdir build
cd build

cmake ../.ci/travis/code_layout
cmake -DWITH_APIDOC=ON ../.ci/travis/code_layout
make -j${CORES}
@@ -21,6 +21,7 @@
.pydevproject
/CMakeLists.txt.user
/CMakeLists.txt.user.*
.ci/travis/code_layout/scripts/qgisstyle*
api_doc
build*
debian/*.debhelper
@@ -22,26 +22,27 @@ matrix:
apt:
sources:
- llvm-toolchain-precise-3.8
- george-edison55-precise-backports # doxygen 1.8.3
- george-edison55-precise-backports # doxygen 1.8.3 # TODO: remove
- ubuntu-toolchain-r-test
packages:
- doxygen
- doxygen # TODO: remove
- bison
- flex
- graphviz
- graphviz # TODO: remove
- libpq-dev
- libfcgi-dev
- libfftw3-3
- libgsl0-dev
- pkg-config
- poppler-utils
- txt2tags
- txt2tags # TODO: remove
- xvfb
- clang-3.8


- os: linux
language: python
python: "3.5"
env:
- TRAVIS_CONFIG=code_layout
dist: trusty
@@ -51,8 +52,12 @@ matrix:
addons:
apt:
sources:
- george-edison55-precise-backports # doxygen 1.8.3
- sourceline: 'ppa:jonathonf/backports' # silversearcher-ag backport
packages:
- doxygen
- graphviz
- txt2tags
- pkg-config
- xvfb
- flip
@@ -691,51 +691,8 @@ ENDIF(NOT CLANG_TIDY_EXE)

#############################################################
# create qgsversion.h
IF (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
FIND_PROGRAM(GITCOMMAND git PATHS c:/cygwin/bin)
IF(GITCOMMAND)
IF(WIN32)
IF(USING_NINJA)
SET(ARG %a)
ELSE(USING_NINJA)
SET(ARG %%a)
ENDIF(USING_NINJA)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND for /f \"usebackq tokens=1\" ${ARG} in "(`\"${GITCOMMAND}\" log -n1 --oneline`)" do echo \#define QGSVERSION \"${ARG}\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp
COMMAND for /f \"usebackq tokens=1\" ${ARG} in "(`\"${GITCOMMAND}\" log -n1 --oneline`)" do echo PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} \(${ARG}\)\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp -DDST=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/.git/index
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ELSE(WIN32)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND ${GITCOMMAND} log -n1 --pretty=\#define\\ QGSVERSION\\ \\"%h\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp
COMMAND ${GITCOMMAND} log -n1 --pretty='PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} \(%h\)\"' >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND ${GITCOMMAND} config remote.$$\(${GITCOMMAND} config branch.$$\(${GITCOMMAND} name-rev --name-only HEAD\).remote\).url | sed -e 's/^/\#define QGS_GIT_REMOTE_URL \"/' -e 's/$$/\"/' >>${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp -DDST=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/.git/index
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ENDIF(WIN32)
ELSE(GITCOMMAND)
MESSAGE(STATUS "git marker, but no git found - version will be unknown")
IF(NOT SHA)
SET(SHA "unknown")
ENDIF(NOT SHA)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"${SHA}\"\n")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc "PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} (${SHA})\"\n")
ENDIF(GITCOMMAND)
ELSE (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
IF(NOT SHA)
SET(SHA "exported")
ENDIF(NOT SHA)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"${SHA}\"\n")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc "PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} (${SHA})\"\n")
ENDIF (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)

ADD_CUSTOM_TARGET(version ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h)
INCLUDE(CreateQgsVersion)
CREATE_QGSVERSION()

#############################################################
# process subdirs
@@ -0,0 +1,47 @@
MACRO(CREATE_QGSVERSION)
IF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git/index)
FIND_PROGRAM(GITCOMMAND git PATHS c:/cygwin/bin)
IF(GITCOMMAND)
IF(WIN32)
IF(USING_NINJA)
SET(ARG %a)
ELSE(USING_NINJA)
SET(ARG %%a)
ENDIF(USING_NINJA)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND for /f \"usebackq tokens=1\" ${ARG} in "(`\"${GITCOMMAND}\" log -n1 --oneline`)" do echo \#define QGSVERSION \"${ARG}\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp
COMMAND for /f \"usebackq tokens=1\" ${ARG} in "(`\"${GITCOMMAND}\" log -n1 --oneline`)" do echo PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} \(${ARG}\)\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp -DDST=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/.git/index
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ELSE(WIN32)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND ${GITCOMMAND} log -n1 --pretty=\#define\\ QGSVERSION\\ \\"%h\\" >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp
COMMAND ${GITCOMMAND} log -n1 --pretty='PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} \(%h\)\"' >${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc
COMMAND ${GITCOMMAND} config remote.$$\(${GITCOMMAND} config branch.$$\(${GITCOMMAND} name-rev --name-only HEAD\).remote\).url | sed -e 's/^/\#define QGS_GIT_REMOTE_URL \"/' -e 's/$$/\"/' >>${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp
COMMAND ${CMAKE_COMMAND} -DSRC=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h.temp -DDST=${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h -P ${CMAKE_SOURCE_DIR}/cmake/CopyIfChanged.cmake
MAIN_DEPENDENCY ${CMAKE_SOURCE_DIR}/.git/index
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
)
ENDIF(WIN32)
ELSE(GITCOMMAND)
MESSAGE(STATUS "git marker, but no git found - version will be unknown")
IF(NOT SHA)
SET(SHA "unknown")
ENDIF(NOT SHA)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"${SHA}\"\n")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc "PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} (${SHA})\"\n")
ENDIF(GITCOMMAND)
ELSE (EXISTS ${CMAKE_SOURCE_DIR}/.git/index)
IF(NOT SHA)
SET(SHA "exported")
ENDIF(NOT SHA)
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h "#define QGSVERSION \"${SHA}\"\n")
FILE(WRITE ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.inc "PROJECT_NUMBER = \"${COMPLETE_VERSION}-${RELEASE_NAME} (${SHA})\"\n")
ENDIF (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../.git/index)

ADD_CUSTOM_TARGET(version ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qgsversion.h)
ENDMACRO(CREATE_QGSVERSION)
@@ -1133,7 +1133,7 @@ HTML_STYLESHEET =
# list). For an example see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.

HTML_EXTRA_STYLESHEET = @CMAKE_SOURCE_DIR@/doc/api_custom.css
HTML_EXTRA_STYLESHEET = @CMAKE_CURRENT_SOURCE_DIR@/api_custom.css

# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
# other source files which should be copied to the HTML output directory. Note
@@ -18,7 +18,7 @@ IF(TXT2TAGS_EXECUTABLE)
ADD_CUSTOM_TARGET (t2tdoc ALL DEPENDS ${QGIS_DOC_FILES})
ELSE(TXT2TAGS_EXECUTABLE)
SET(QGIS_DOC_FILES
${CMAKE_SOURCE_DIR}/INSTALL
${CMAKE_CURRENT_SOURCE_DIR}/../INSTALL
)
ENDIF(TXT2TAGS_EXECUTABLE)

@@ -46,65 +46,65 @@ IF(WITH_APIDOC)
ENDIF(GENERATE_QHP)

SET(DOXYGEN_INCLUDE_PATH
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_CURRENT_SOURCE_DIR}/../src/core
)
STRING(REPLACE ";" " " DOXYGEN_INCLUDE_PATH "${DOXYGEN_INCLUDE_PATH}")

SET(DOXYGEN_INPUT
${CMAKE_SOURCE_DIR}/doc
${CMAKE_SOURCE_DIR}/src/core
${CMAKE_SOURCE_DIR}/src/core/annotations
${CMAKE_SOURCE_DIR}/src/core/auth
${CMAKE_SOURCE_DIR}/src/core/composer
${CMAKE_SOURCE_DIR}/src/core/diagram
${CMAKE_SOURCE_DIR}/src/core/dxf
${CMAKE_SOURCE_DIR}/src/core/effects
${CMAKE_SOURCE_DIR}/src/core/fieldformatter
${CMAKE_SOURCE_DIR}/src/core/geometry
${CMAKE_SOURCE_DIR}/src/core/gps
${CMAKE_SOURCE_DIR}/src/core/layertree
${CMAKE_SOURCE_DIR}/src/core/metadata
${CMAKE_SOURCE_DIR}/src/core/pal
${CMAKE_SOURCE_DIR}/src/core/processing
${CMAKE_SOURCE_DIR}/src/core/providers
${CMAKE_SOURCE_DIR}/src/core/providers/memory
${CMAKE_SOURCE_DIR}/src/core/raster
${CMAKE_SOURCE_DIR}/src/core/scalebar
${CMAKE_SOURCE_DIR}/src/core/symbology-ng
${CMAKE_SOURCE_DIR}/src/gui
${CMAKE_SOURCE_DIR}/src/gui/auth
${CMAKE_SOURCE_DIR}/src/gui/attributetable
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets
${CMAKE_SOURCE_DIR}/src/gui/editorwidgets/core
${CMAKE_SOURCE_DIR}/src/gui/effects
${CMAKE_SOURCE_DIR}/src/gui/layertree
${CMAKE_SOURCE_DIR}/src/gui/locator
${CMAKE_SOURCE_DIR}/src/gui/raster
${CMAKE_SOURCE_DIR}/src/gui/symbology-ng
${CMAKE_SOURCE_DIR}/src/analysis
${CMAKE_SOURCE_DIR}/src/analysis/interpolation
${CMAKE_SOURCE_DIR}/src/analysis/network
${CMAKE_SOURCE_DIR}/src/analysis/openstreetmap
${CMAKE_SOURCE_DIR}/src/analysis/raster
${CMAKE_SOURCE_DIR}/src/analysis/vector
${CMAKE_SOURCE_DIR}/src/plugins
${CMAKE_CURRENT_SOURCE_DIR}/../doc
${CMAKE_CURRENT_SOURCE_DIR}/../src/core
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/annotations
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/auth
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/composer
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/diagram
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/dxf
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/effects
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/fieldformatter
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/geometry
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/gps
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/layertree
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/metadata
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/pal
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/processing
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/providers
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/providers/memory
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/raster
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/scalebar
${CMAKE_CURRENT_SOURCE_DIR}/../src/core/symbology-ng
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/auth
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/attributetable
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/editorwidgets
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/editorwidgets/core
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/effects
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/layertree
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/locator
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/raster
${CMAKE_CURRENT_SOURCE_DIR}/../src/gui/symbology-ng
${CMAKE_CURRENT_SOURCE_DIR}/../src/analysis
${CMAKE_CURRENT_SOURCE_DIR}/../src/analysis/interpolation
${CMAKE_CURRENT_SOURCE_DIR}/../src/analysis/network
${CMAKE_CURRENT_SOURCE_DIR}/../src/analysis/openstreetmap
${CMAKE_CURRENT_SOURCE_DIR}/../src/analysis/raster
${CMAKE_CURRENT_SOURCE_DIR}/../src/analysis/vector
${CMAKE_CURRENT_SOURCE_DIR}/../src/plugins
)

IF(WITH_SERVER_PLUGINS)
SET(DOXYGEN_INPUT
${DOXYGEN_INPUT}
${CMAKE_SOURCE_DIR}/src/server/qgsserver.h
${CMAKE_SOURCE_DIR}/src/server/qgscapabilitiescache.h
${CMAKE_SOURCE_DIR}/src/server/qgsserverexception.h
${CMAKE_SOURCE_DIR}/src/server/qgsrequesthandler.h
${CMAKE_SOURCE_DIR}/src/server/qgsserverfilter.h
${CMAKE_SOURCE_DIR}/src/server/qgsaccesscontrolfilter.h
${CMAKE_SOURCE_DIR}/src/server/qgsserverinterface.h
${CMAKE_SOURCE_DIR}/src/server/qgsserverrequest.h
${CMAKE_SOURCE_DIR}/src/server/qgsserverresponse.h
${CMAKE_SOURCE_DIR}/src/server/qgsserverrequest.h
${CMAKE_SOURCE_DIR}/src/server/qgsservice.h
${CMAKE_SOURCE_DIR}/src/server/qgsserviceregistry.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserver.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgscapabilitiescache.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserverexception.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsrequesthandler.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserverfilter.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsaccesscontrolfilter.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserverinterface.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserverrequest.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserverresponse.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserverrequest.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsservice.h
${CMAKE_CURRENT_SOURCE_DIR}/../src/server/qgsserviceregistry.h
)
ENDIF(WITH_SERVER_PLUGINS)

@@ -120,7 +120,7 @@ IF(WITH_APIDOC)

STRING(REPLACE ";" " " DOXYGEN_INPUT "${DOXYGEN_INPUT}")

CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake_templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../cmake_templates/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)

SET (DOXYGEN_ON_DEMAND FALSE CACHE BOOL "Determines whether the QGIS API doxygen documentation should be build on demand only")

0 comments on commit 281daee

Please sign in to comment.
You can’t perform that action at this time.