@@ -25,12 +25,19 @@ jobs:
2525 continue-on-error : ' ${{ matrix.allow-failure }}'
2626 name : ' test (${{ matrix.python-version }})'
2727 steps :
28+ - name : Preserve Wasm cache
29+ uses : actions/cache@v3
30+ with :
31+ path : |
32+ ~/.cache/wasmtime
33+ ~/.cache/YoWASP
34+ key : ${{ runner.os }}-wasm
2835 - name : Check out source code
2936 uses : actions/checkout@v3
3037 with :
3138 fetch-depth : 0
32- - name : Set up Python
33- uses : actions /setup-python@v4
39+ - name : Set up PDM
40+ uses : pdm-project /setup-pdm@v3
3441 with :
3542 python-version : ${{ matrix.python-version }}
3643 - name : Install dependencies
@@ -39,24 +46,19 @@ jobs:
3946 sudo add-apt-repository 'deb http://ppa.launchpad.net/sri-csl/formal-methods/ubuntu bionic main'
4047 sudo apt-get update
4148 sudo apt-get install yices2
42- pip install coverage codecov
43- pip install yowasp-yosys
44- pip install -e .[builtin-yosys]
45- pip install -r docs/requirements.txt
46- - name : Preserve Wasm cache
47- uses : actions/cache@v3
48- with :
49- path : |
50- ~/.cache/wasmtime
51- ~/.cache/YoWASP
52- key : ${{ runner.os }}-wasm
49+ pip install codecov yowasp-yosys
50+ pdm install --dev
5351 - name : Run tests
52+ env :
53+ YOSYS : yowasp-yosys
54+ NEXTPNR_ICE40 : yowasp-nextpnr-ice40
55+ ICEPACK : yowasp-icepack
56+ SBY : yowasp-sby
57+ SMTBMC : yowasp-yosys-smtbmc
5458 run : |
55- export AMARANTH_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc
56- export PYTHONWARNINGS=error
57- python -m coverage run -m unittest discover -t . -s tests
58- unset PYTHONWARNINGS
59- sphinx-build -b doctest docs/ docs/_build
59+ pdm run test
60+ - name : Submit code coverage
61+ run :
6062 codecov
6163
6264 document :
@@ -69,17 +71,16 @@ jobs:
6971 - name : Fetch tags from upstream repository
7072 run : |
7173 git fetch --tags https://github.com/amaranth-lang/amaranth.git
72- - name : Set up Python
73- uses : actions /setup-python@v4
74+ - name : Set up PDM
75+ uses : pdm-project /setup-pdm@v3
7476 with :
7577 python-version : ' 3.11'
7678 - name : Install dependencies
7779 run : |
78- pip install -r docs/requirements.txt
79- pip install .
80+ pdm install --dev
8081 - name : Build documentation
8182 run : |
82- sphinx-build docs docs/_build
83+ pdm run document
8384 - name : Upload documentation archive
8485 uses : actions/upload-artifact@v3
8586 with :
0 commit comments