[CI] Handle building examples with sphinx-gallery

This commit is contained in:
Ray Speth 2023-09-23 00:03:30 -04:00 committed by Ray Speth
parent d959103237
commit 4de36cb629

View File

@ -317,16 +317,22 @@ jobs:
- name: Install Apt dependencies - name: Install Apt dependencies
run: | run: |
sudo apt update sudo apt update
sudo apt install libboost-dev doxygen graphviz texlive-bibtex-extra sudo apt install libboost-dev doxygen graphviz texlive-bibtex-extra \
libblas-dev liblapack-dev libhdf5-dev libfmt-dev libsundials-dev
- name: Upgrade pip - name: Upgrade pip
run: python3 -m pip install -U pip setuptools wheel run: python3 -m pip install -U pip setuptools wheel
- name: Install Python dependencies - name: Install Python dependencies
run: | run: |
python3 -m pip install ruamel.yaml scons numpy cython sphinx==5.1.1 \ python3 -m pip install ruamel.yaml scons numpy cython sphinx==6.2.1 \
sphinxcontrib-matlabdomain sphinxcontrib-doxylink pint \ sphinxcontrib-matlabdomain sphinxcontrib-doxylink pint \
pydata-sphinx-theme==0.13.3 sphinx-argparse pydata-sphinx-theme==0.13.3 sphinx-argparse sphinx_design matplotlib \
- name: Build Cantera with documentation pandas scipy
run: python3 `which scons` build -j2 doxygen_docs=y sphinx_docs=y debug=n optimize=n use_pch=n python3 -m pip install "git+https://github.com/sphinx-gallery/sphinx-gallery.git@master"
python3 -m pip install "git+https://github.com/Cantera/sphinx-tags.git@main"
- name: Build Cantera
run: python3 `which scons` build -j2 debug=n optimize=y use_pch=n
- name: Build documentation
run: python3 `which scons` sphinx doxygen
- name: Ensure 'scons help' options work - name: Ensure 'scons help' options work
run: | run: |
python3 `which scons` help --options python3 `which scons` help --options
@ -335,12 +341,12 @@ jobs:
- name: Parse configuration options from SConstruct as reST - name: Parse configuration options from SConstruct as reST
run: | run: |
python3 `which scons` help --restructured-text --dev --output=config-options-dev.rst python3 `which scons` help --restructured-text --dev --output=config-options-dev.rst
mkdir build/docs/scons mkdir build/doc/scons
mv config-options-dev.rst build/docs/scons/ mv config-options-dev.rst build/doc/scons/
- name: Create archive for docs output - name: Create archive for docs output
run: | run: |
cd build cd build
tar -czf docs.tar.gz docs tar -czf docs.tar.gz doc
- name: Store archive of docs output - name: Store archive of docs output
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
@ -362,7 +368,7 @@ jobs:
RSYNC_USER: "ctdeploy" RSYNC_USER: "ctdeploy"
RSYNC_SERVER: "cantera.org" RSYNC_SERVER: "cantera.org"
RSYNC_DEST: "cantera/documentation/dev" RSYNC_DEST: "cantera/documentation/dev"
DOCS_OUTPUT_DIR: "./build/docs/" DOCS_OUTPUT_DIR: "./build/doc/"
run: | run: |
rsync -avzP --checksum --exclude='*.map' --exclude='*.md5' \ rsync -avzP --checksum --exclude='*.map' --exclude='*.md5' \
--exclude='/doxygen/xml' --delete --delete-excluded \ --exclude='/doxygen/xml' --delete --delete-excluded \