-
Notifications
You must be signed in to change notification settings - Fork 6
65 lines (53 loc) · 1.72 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
linux:
name: 'sphinx v${{matrix.sphinx-version}} py${{matrix.python-version}}'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
sphinx-version: ['3.5', '4.5', '5.0', '5.1', '5.2', '5.3', '6.0', '6.1']
exclude:
# sphinx versions incompatible with python 3.10
- python-version: "3.10"
sphinx-version: "3.5"
- python-version: "3.11"
sphinx-version: "3.5"
steps:
- name: checkout the repository
uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: pip-py${{ matrix.python-version }}
restore-keys: |
pip-py${{ matrix.python-version }}
- name: upgrade pip
run: python -m pip install --upgrade pip
- name: install sphinx
run: |
python -m pip install "sphinx==${{matrix.sphinx-version}}"
if [[ "${{matrix.sphinx-version}}" < "4.0" ]]; then
python -m pip install "jinja2<3.1" "docutils<0.18"
fi
- name: install other dependencies
run: python -m pip install -r ci/requirements.txt
- name: install the extension
run: python -m pip install .
- name: show versions
run: python -m pip list
- name: build the documentation
run: |
cd docs
python -m sphinx -M html -d _build/doctrees -EWT -a . _build/html