tools: make sphinx-build warnings errors

- add -W and --keep-going for SPHINXOPTS
- use $(MAKE) for make invocations
- build the docs in the conformance phase as the sphinx build has checks
This commit is contained in:
Arthur Meyre
2021-08-31 16:00:52 +02:00
parent 2badcecd0d
commit 3b339b1e88
2 changed files with 15 additions and 15 deletions

View File

@@ -49,12 +49,23 @@ jobs:
python -m pip install --upgrade pip
python -m pip install poetry
make setup_env
- name: Conformance
- name: Conformance and Docs build
id: conformance
if: ${{ success() && !cancelled() }}
env:
# TODO: remove this when JIT doesn't need this
# Required to be sure that docs reads all files with MLIR imports properly
LD_PRELOAD: /compiler/build/lib/Runtime/libZamalangRuntime.so
# pcc launches an internal target with proper flags
# docs is run here too as it can fail and we catch errors during the build
run: |
make pcc
./script/make_utils/serialize_targets.sh make pcc docs
- name: Archive docs artifacts
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}
uses: actions/upload-artifact@v2
with:
name: html-docs
path: docs/_build/html
- name: PyTest
id: pytest
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}
@@ -89,17 +100,6 @@ jobs:
with:
path: diff-coverage.txt
recreate: true
- name: Build docs
id: docs
if: ${{ steps.conformance.outcome == 'success' && !cancelled() }}
run: |
make docs
- name: Archive docs artifacts
if: ${{ steps.docs.outcome == 'success' && !cancelled() }}
uses: actions/upload-artifact@v2
with:
name: html-docs
path: docs/_build/html
- name: Slack Notification
if: ${{ always() }}
uses: rtCamp/action-slack-notify@v2

View File

@@ -12,7 +12,7 @@ setup_env:
sync_env:
poetry install --remove-untracked
make setup_env
$(MAKE) setup_env
.PHONY: sync_env
python_format:
@@ -135,7 +135,7 @@ docs: clean_docs
poetry run sphinx-apidoc -o docs/_apidoc hdk
@# Docs
cd docs && poetry run make html
cd docs && poetry run $(MAKE) html SPHINXOPTS='-W --keep-going'
.PHONY: docs
clean_docs: