##============================================================================
##  The contents of this file are covered by the Viskores license. See
##  LICENSE.txt for details.
##
##  By contributing to this file, all contributors agree to the Developer
##  Certificate of Origin Version 1.1 (DCO 1.1) as stated in DCO.txt.
##============================================================================

##=============================================================================
##
##  Copyright (c) Kitware, Inc.
##  All rights reserved.
##  See LICENSE.txt for details.
##
##  This software is distributed WITHOUT ANY WARRANTY; without even
##  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
##  PURPOSE.  See the above copyright notice for more information.
##
##=============================================================================

.build_doxygen_script: &build_doxygen_script
  - cmake --build "${CI_PROJECT_DIR}/build" --target docs/doxygen
  - cmake --build "${CI_PROJECT_DIR}/build" --target ViskoresUsersGuideHTML
  - cmake --build "${CI_PROJECT_DIR}/build" --target ViskoresUsersGuideLaTeX

.build_docs: &build_docs
  stage: build
  before_script:
    - cmake -V -P .gitlab/ci/config/gitlab_ci_setup.cmake
    - ctest -VV -S .gitlab/ci/ctest_configure.cmake
  timeout:  30 minutes
  interruptible: true
  extends:
    - .uo_cpu_tags
  variables:
    CMAKE_BUILD_TYPE: Release
    VISKORES_SETTINGS: "tbb+openmp+mpi+shared+docs"

docs-continuous:
  script:
    - *build_doxygen_script
  extends:
    - .build_docs
    - .cmake_build_artifacts
    - .run_automatically
    - .ubuntu2004_doxygen
