Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docs build to use tox, as described #803

Merged
merged 1 commit into from
Feb 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/docs-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: docs-build

on:
pull_request:
branches: [main]
branches: [ main ]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -24,11 +24,14 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools==59.4.0 wheel
python -m pip install -r docs/requirements-doc.txt
python -m pip install --upgrade pip tox
- name: Building docs
run: |
make -C docs html
tox -e docs
- name: Delete unnecessary files
run: |
find docs/build -name .doctrees -prune -exec rm -rf {} \;
find docs/build -name .buildinfo -exec rm -rf {} \;
- name: Upload HTML
uses: actions/upload-artifact@v3
with:
Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/docs-sched-rebuild.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: docs-sched-rebuild

on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 1 * * *"
push:
branches: [ main ]
tags:
- v*
workflow_dispatch:

jobs:
Expand All @@ -20,14 +21,10 @@ jobs:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip setuptools==59.4.0 wheel
python -m pip install -r docs/requirements-doc.txt
- name: Report the versions to build
run: |
sphinx-multiversion --dump-metadata docs/source docs/build/html | jq "keys"
python -m pip install --upgrade pip tox
- name: Building docs (multiversion)
run: |
sphinx-multiversion docs/source docs/build/html
tox -e docs-multi
- name: Delete unnecessary files
run: |
find docs/build -name .doctrees -prune -exec rm -rf {} \;
Expand Down
1 change: 0 additions & 1 deletion docs/requirements-doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ Markdown==3.3.7

# smx
mergedeep<1.4
docker<5.1
PyGithub<1.56
semver>=2,<3
pytest<7.3
Expand Down
7 changes: 3 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ commands =
[testenv:test-gpu]
passenv =
OPAL_PREFIX
setenv =
setenv =
TF_GPU_ALLOCATOR=cuda_malloc_async
sitepackages=true
; Runs in: Internal Jenkins
Expand All @@ -39,15 +39,14 @@ commands =
; Generates documentation with sphinx. There are other steps in the Github Actions workflow
; to publish the documentation on release.
changedir = {toxinidir}
deps = -rrequirements/docs.txt
deps = -rdocs/requirements-doc.txt
commands =
python -m sphinx.cmd.build -E -P -b html docs/source docs/build/html

[testenv:docs-multi]
; Run the multi-version build that is shown on GitHub Pages.
changedir = {toxinidir}
deps = -rrequirements/docs.txt
deps = -rdocs/requirements-doc.txt
commands =
sphinx-multiversion --dump-metadata docs/source docs/build/html | jq "keys"
sphinx-multiversion docs/source docs/build/html