Skip to content

add support for Python 3.12 #198

add support for Python 3.12

add support for Python 3.12 #198

Workflow file for this run

name: Documentation check
on: [pull_request]
jobs:
docs-checks:
name: ${{ matrix.doc-type }}
strategy:
matrix:
doc-type: [html, latex, epub]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Setup Linux Environment
run: |
sudo apt-get install libglu1
- name: Install docs dependencies
run: |
python -m pip install -r docs/requirements.txt
- name: Install package
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -e .
- name: Build ${{ matrix.doc-type }} documentation
run: sphinx-build -Wnb ${{ matrix.doc-type }} docs/source/ docs/build-${{ matrix.doc-type }}/
- name: Prepare documentation artifact
run: |
# Define Path to Upload
if [ "${{ matrix.doc-type }}" = html ]; then echo "art_path=docs/build-html" >> $GITHUB_ENV; fi
if [ "${{ matrix.doc-type }}" = latex ]; then echo "art_path=docs/build-latex/MicroStructPy.pdf" >> $GITHUB_ENV; fi
if [ "${{ matrix.doc-type }}" = epub ]; then echo "art_path=docs/build-epub/MicroStructPy.epub" >> $GITHUB_ENV; fi
- name: Build PDF (latex only)
if: matrix.doc-type == 'latex'
run: |
# Update apt
sudo apt-get update
# Install LaTeX packages
# Recommended by Sphinx on their docs page:
# https://www.sphinx-doc.org/en/master/usage/builders/index.html#sphinx.builders.latex.LaTeXBuilder
sudo apt install texlive-latex-recommended
sudo apt install texlive-fonts-recommended
sudo apt install tex-gyre # (if latex_engine left to default)
sudo apt install texlive-latex-extra
sudo apt install latexmk
# Make
cd docs/build-latex
make
cd -
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: microstructpy_${{ matrix.doc-type }}_documentation
path: ${{ env.art_path }}