pyproject: use yowasp-yosys for tests.

This change means that tests will succeed even if the system Yosys binary is broken.
yices2 must still be present on the system.
This commit is contained in:
Catherine 2023-09-27 10:57:02 +00:00
parent fcafad1f70
commit b871f2ad79
3 changed files with 11 additions and 7 deletions

7
.env.toolchain Normal file
View file

@ -0,0 +1,7 @@
AMARANTH_USE_YOSYS=system
YOSYS=yowasp-yosys
SBY=yowasp-sby
SMTBMC=yowasp-yosys-smtbmc
# examples
NEXTPNR_ICE40=yowasp-nextpnr-ice40
ICEPACK=yowasp-icepack

View file

@ -46,15 +46,9 @@ jobs:
sudo add-apt-repository 'deb http://ppa.launchpad.net/sri-csl/formal-methods/ubuntu bionic main'
sudo apt-get update
sudo apt-get install yices2
pip install codecov yowasp-yosys
pip install codecov
pdm install --dev
- name: Run tests
env:
YOSYS: yowasp-yosys
NEXTPNR_ICE40: yowasp-nextpnr-ice40
ICEPACK: yowasp-icepack
SBY: yowasp-sby
SMTBMC: yowasp-yosys-smtbmc
run: |
pdm run test
- name: Submit code coverage

View file

@ -49,6 +49,7 @@ includes = ["amaranth/"]
[tool.pdm.dev-dependencies]
test = [
"yowasp-yosys",
"coverage",
]
docs = [
@ -62,6 +63,8 @@ examples = [
]
[tool.pdm.scripts]
_.env_file = ".env.toolchain"
test.composite = ["test-code", "test-docs"]
test-code.env = {PYTHONWARNINGS = "error"}
test-code.cmd = "python -m coverage run -m unittest discover -t . -s tests -v"