Skip to content

Commit

Permalink
Build doc in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
paugier committed Jan 4, 2024
1 parent 822bd7d commit 1dbb32c
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 16 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ jobs:
pip install pdm nox
- name: Test with nox
run: |
$(hg debuginstall -T '{pythonexe}') -m pip install hg-evolve hg-git --no-cache-dir --user --break-system-packages
cp docker/hgrc $HOME/.hgrc
hg version -v
cp .github/workflows/.fluidfft-site.cfg $HOME
nox -s test_without_fft_and_pythran
nox -s test_with_fft_and_pythran
Expand Down
31 changes: 31 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ stages:
- lint
- test
- report
- doc

variables:
COVERAGE_DIR: .coverage_$CI_COMMIT_SHA
Expand Down Expand Up @@ -107,3 +108,33 @@ report_coverage:
- pip install coverage
- coverage combine
- coverage report


doc:build:
stage: doc
needs:
- job: "CI image"
optional: true
variables:
FLUIDFFT_TRANSONIC_BACKEND: "python"
script:
- python -m venv .venv
- . .venv/bin/activate
- pip install fluidfft
- pdm install -G doc -G fft -G test --no-self
- pip install . --config-settings=setup-args=-Dtransonic-backend=python
- pdm run xvfb-run --auto-servernum sphinx-build -W -b html -d doc/_build/doctrees doc doc/_build/html
- mkdir -p public/$CI_COMMIT_REF_NAME
- rsync -rvc --delete doc/_build/html/* public/$CI_COMMIT_REF_NAME/
# This directory can become too large leading to error.
# It can be purged with the botton "Clear runner caches"
# in https://foss.heptapod.net/fluiddyn/fluidsim/-/pipelines
- ls public
- echo "CI_COMMIT_REF_NAME="$CI_COMMIT_REF_NAME
- echo See https://fluiddyn.pages.heptapod.net/fluidsim/$CI_COMMIT_REF_NAME
artifacts:
name: "$CI_COMMIT_REF_NAME"
paths:
- public
expire_in: 5 days
when: always
1 change: 0 additions & 1 deletion .readthedocs.req

This file was deleted.

23 changes: 8 additions & 15 deletions .readthedocs.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,17 @@
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"
jobs:
post_create_environment:
- pip install pdm pip -U
post_install:
- pdm use -f $READTHEDOCS_VIRTUALENV_PATH
- FLUIDFFT_TRANSONIC_BACKEND="python" pip install fluidfft
- pdm install -G doc -G fft -G test --no-self
- pip install . --config-settings=setup-args=-Dtransonic-backend=python

# Build documentation in the doc directory with Sphinx
sphinx:
configuration: doc/conf.py

python:
install:
- requirements: .readthedocs.req
- method: pip
path: .
extra_requirements:
- doc
- fft

0 comments on commit 1dbb32c

Please sign in to comment.