From 7aa54c8585a8003a65a656f4677233542bd147e9 Mon Sep 17 00:00:00 2001 From: JM Etancelin <jean-matthieu.etancelin@univ-pau.fr> Date: Sat, 26 Oct 2024 15:52:46 +0200 Subject: [PATCH] update --- build_doc.sh | 18 +++++++----------- conf.py.in | 2 +- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/build_doc.sh b/build_doc.sh index a1cd480..7644550 100755 --- a/build_doc.sh +++ b/build_doc.sh @@ -4,6 +4,8 @@ set -eux -o pipefail ROOT_DIR="$(pwd)/hysop" BUILD_DIR="$(pwd)/build" INSTALL_DIR="$(pwd)/install" +CI_DIR="$(pwd)" +mkdir -p ${CI_DIR}/logs # as artifact in gitlab-ci # Get sources for API documentation git clone --depth 1 https://gricad-gitlab.univ-grenoble-alpes.fr/particle_methods/hysop.git @@ -15,18 +17,12 @@ cp -r _static devel examples install_guide getting_started reference users_guide cd hysop FC=mpif90 meson setup ${BUILD_DIR} --python.install-env prefix --prefix=${INSTALL_DIR} -DWITH_DOCUMENTATION=ON meson compile -C ${BUILD_DIR} -# Tweak meson builddir: move the f2hysop*so file into hysop python files. -find ${BUILD_DIR} -name 'f2hysop*so' -exec cp '{}' ${BUILD_DIR}/hysop/. \; -# Tweak python path for nbsphinx -export PYTHONPATH=${BUILD_DIR} -meson compile -C ${BUILD_DIR} docs -HYSOP_VERBOSE=false meson compile -C ${BUILD_DIR} doctest +meson install -C ${BUILD_DIR} # Docs needs to find an proper installed hysop (i.e. finding f2hysop.so) +ln -s ${CI_DIR}/logs ${BUILD_DIR}/docs/logs # trik to keep logs in ci artifacts even in case of failure +meson compile -C ${BUILD_DIR} docs +meson compile -C ${BUILD_DIR} doctest cd - -mv ${BUILD_DIR}/docs/build/html public - -mkdir -p logs -find ${BUILD_DIR} -name doxygen.log -exec mv '{}' logs/. \; -find ${BUILD_DIR} -name sphinx.log -exec mv '{}' logs/. \; +mv ${BUILD_DIR}/docs/build/html ${CI_DIR}/public # as artifact in gitlab-ci rm -rf ${BUILD_DIR} ${ROOT_DIR} ${INSTALL_DIR} exit 0 diff --git a/conf.py.in b/conf.py.in index 764f5cd..ded8041 100644 --- a/conf.py.in +++ b/conf.py.in @@ -43,7 +43,7 @@ extensions = [ 'nbsphinx', 'sphinxcontrib.doxylink'] -sys.path.insert(0, "@HYSOP_BUILD_PYTHONPATH@") +sys.path.insert(0, "@HYSOP_PYTHONPATH@/hysop") numpydoc_class_members_toctree = True numpydoc_show_class_members = False # Napoleon settings -- GitLab