forked from optuna/optuna
-
Notifications
You must be signed in to change notification settings - Fork 0
107 lines (85 loc) · 2.38 KB
/
sphinx-build.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: Sphinx
on:
push:
branches:
- master
pull_request: {}
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }}
cancel-in-progress: true
jobs:
documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
# note (crcrpar): We've not updated tutorial frequently enough so far thus
# it'd be okay to discard cache by any small changes including typo fix under tutorial directory.
- name: Sphinx Gallery Cache
uses: actions/cache@v3
env:
cache-name: sphx-glry-documentation
with:
path: |
tutorial/MNIST
docs/source/tutorial
key: py3.8-${{ env.cache-name }}-${{ hashFiles('tutorial/**/*') }}
- name: Install Dependencies
run: |
python -m pip install -U pip
pip install --progress-bar off -U .[document] --extra-index-url https://download.pytorch.org/whl/cpu
- name: Output installed packages
run: |
pip freeze --all
- name: Output dependency tree
run: |
pip install pipdeptree
pipdeptree
- name: Build Document
run: |
cd docs
make html
cd ../
- uses: actions/upload-artifact@v3
with:
name: built-html
path: |
docs/build/html
- uses: actions/upload-artifact@v3
with:
name: tutorial
path: |
docs/source/tutorial
doctest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Sphinx Gallery Cache
uses: actions/cache@v3
env:
cache-name: sphx-glry-doctest
with:
path: |
tutorial/MNIST
docs/source/tutorial
key: py3.8-${{ env.cache-name }}-${{ hashFiles('tutorial/**/*') }}
- name: Install Dependencies
run: |
python -m pip install -U pip
pip install --progress-bar off -U .[document] --extra-index-url https://download.pytorch.org/whl/cpu
- name: Output installed packages
run: |
pip freeze --all
- name: Output dependency tree
run: |
pip install pipdeptree
pipdeptree
- name: Run Doctest
run: |
cd docs
make doctest