-
Notifications
You must be signed in to change notification settings - Fork 139
72 lines (68 loc) · 2.08 KB
/
Copy pathversion-matrix.yml
File metadata and controls
72 lines (68 loc) · 2.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Check different Sphinx and Python versions
on: [push, pull_request]
env:
APT_INSTALL: sudo apt-get install -y --no-install-recommends
PIP: python -m pip
SPHINX: python -m sphinx -W --keep-going --color
SPHINX_PACKAGE: "sphinx"
PYTHON_VERSION: "3"
jobs:
version-matrix:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
# default Python, latest Sphinx
- env: {}
# a few older Sphinx releases using default Python version
# sphinx 5.0 and 5.3 requires the imghdr module removed
# in python 3.13 so test with 3.12
- env:
SPHINX_PACKAGE: "sphinx==5.0.0 sphinxcontrib-bibtex==2.5.0"
PYTHON_VERSION: "3.12"
- env:
SPHINX_PACKAGE: "sphinx==5.3.0 sphinxcontrib-bibtex==2.5.0"
PYTHON_VERSION: "3.12"
- env:
SPHINX_PACKAGE: "sphinx==6.2.1 sphinxcontrib-bibtex==2.5.0"
- env:
SPHINX_PACKAGE: "sphinx==7.4.7"
# a few Python versions using latest Sphinx release
- env:
PYTHON_VERSION: "3.10"
- env:
PYTHON_VERSION: "3.11"
- env:
PYTHON_VERSION: "3.13"
env: ${{ matrix.env || fromJSON('{}') }}
steps:
- name: Clone repo
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Install apt packages
run: |
$APT_INSTALL pandoc librsvg2-bin
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Show Python version
run: |
python --version
- name: Install Sphinx
run: |
$PIP install $SPHINX_PACKAGE
- name: Install nbsphinx
run: |
$PIP install --group doc .
- name: Run Sphinx (HTML)
run: |
$SPHINX doc _build -b html
- name: Run Sphinx (LaTeX, but without running LaTeX)
run: |
$SPHINX doc _build -b latex
- name: Run Sphinx (epub)
run: |
$SPHINX doc _build -b epub