forked from olofk/fusesoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
83 lines (75 loc) · 2.95 KB
/
tox.ini
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
[tox]
envlist = py3
[testenv]
# Dependencies prefixed with "ci: " are only installed when running in CI,
# which calls effectively "tox -e py3-ci" (see the gh-actions section below).
deps =
pytest
ci: pytest-github-actions-annotate-failures
# Some tests need an initialized FuseSoC library to be present. To make tests
# reproducible tox doesn't use the library installed into the user's home
# directory, but creates an isolated home directory within the tox working
# directory, and clears it out after each test.
commands =
/bin/rm -rf {toxworkdir}/.tmp/homedir/.cache {toxworkdir}/.tmp/homedir/.local/share {toxworkdir}/.tmp/homedir/.config
mkdir -p {toxworkdir}/.tmp/homedir/.config/fusesoc
fusesoc --verbose library add --global fusesoc_cores https://github.com/fusesoc/fusesoc-cores
fusesoc list-cores
fusesoc library update
pytest {posargs:-vv}
setenv =
MODEL_TECH = dummy_value
XDG_CACHE_HOME = {toxworkdir}/.tmp/homedir/.cache
XDG_DATA_HOME= {toxworkdir}/.tmp/homedir/.local/share
XDG_CONFIG_HOME = {toxworkdir}/.tmp/homedir/.config
passenv =
GITHUB_ACTIONS
whitelist_externals =
/bin/rm
/usr/bin/mkdir
[testenv:doc]
# Note: this target is *not* used by ReadTheDocs, which runs sphinx-build
# directly. Hence, all special build steps here are only relevant for
# local builds, not for RTD builds. Add all build steps which should be executed
# in RTD builds as Python code into the conf.py file.
description = Build the HTML documentation with Sphinx
deps = -rdoc/requirements.txt
commands =
sphinx-build \
--color \
-bhtml \
-d "{toxworkdir}/docs_doctree" \
doc/source \
"{toxworkdir}/docs_out" \
{posargs}
python -c 'import pathlib; print("The HTML documentation is available at file://\{0\}".format(pathlib.Path(r"{toxworkdir}") / "docs_out" / "index.html"))'
[testenv:doc-autobuild]
description = Automatically (re-)build the HTML documentation with Sphinx
deps =
-rdoc/requirements.txt
sphinx-autobuild
commands =
# capi2.rst is generated during the documentation build and would
# immediately re-trigger a build. We ignore the generated file, and instead
# watch the primary source of information for the generated file. Since
# capi2.rst is also produced from some other files this check isn't fully
# exhaustive, but covers most use cases.
sphinx-autobuild \
--open-browser \
-d "{toxworkdir}/docs_doctree" \
--ignore "*/doc/source/ref/capi2.rst" \
--watch "fusesoc/capi2" \
doc/source \
"{toxworkdir}/docs_out" \
{posargs}
# XXX: This setting is currently overwritten on the command line for CI builds
# (see the pipeline configuration) due to
# https://github.com/ymyzk/tox-gh-actions/issues/44.
#[gh-actions]
# Mapping between the Python version used in GitHub Actions matrix builds, and
# the used Tox environment.
#python =
# 3.6: py3-ci
# 3.7: py3-ci
# 3.8: py3-ci
# 3.9: py3-ci