Formalize test and documentation workflows using PDM.
This commit is contained in:
parent
d491288e32
commit
1826fa83bd
3 changed files with 53 additions and 29 deletions
47
.github/workflows/main.yaml
vendored
47
.github/workflows/main.yaml
vendored
|
|
@ -25,12 +25,19 @@ jobs:
|
|||
continue-on-error: '${{ matrix.allow-failure }}'
|
||||
name: 'test (${{ matrix.python-version }})'
|
||||
steps:
|
||||
- name: Preserve Wasm cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/wasmtime
|
||||
~/.cache/YoWASP
|
||||
key: ${{ runner.os }}-wasm
|
||||
- name: Check out source code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
- name: Set up PDM
|
||||
uses: pdm-project/setup-pdm@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
|
|
@ -39,24 +46,19 @@ 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 coverage codecov
|
||||
pip install yowasp-yosys
|
||||
pip install -e .[builtin-yosys]
|
||||
pip install -r docs/requirements.txt
|
||||
- name: Preserve Wasm cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/wasmtime
|
||||
~/.cache/YoWASP
|
||||
key: ${{ runner.os }}-wasm
|
||||
pip install codecov yowasp-yosys
|
||||
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: |
|
||||
export AMARANTH_USE_YOSYS=builtin YOSYS=yowasp-yosys SBY=yowasp-sby SMTBMC=yowasp-yosys-smtbmc
|
||||
export PYTHONWARNINGS=error
|
||||
python -m coverage run -m unittest discover -t . -s tests
|
||||
unset PYTHONWARNINGS
|
||||
sphinx-build -b doctest docs/ docs/_build
|
||||
pdm run test
|
||||
- name: Submit code coverage
|
||||
run:
|
||||
codecov
|
||||
|
||||
document:
|
||||
|
|
@ -69,17 +71,16 @@ jobs:
|
|||
- name: Fetch tags from upstream repository
|
||||
run: |
|
||||
git fetch --tags https://github.com/amaranth-lang/amaranth.git
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
- name: Set up PDM
|
||||
uses: pdm-project/setup-pdm@v3
|
||||
with:
|
||||
python-version: '3.11'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
pip install -r docs/requirements.txt
|
||||
pip install .
|
||||
pdm install --dev
|
||||
- name: Build documentation
|
||||
run: |
|
||||
sphinx-build docs docs/_build
|
||||
pdm run document
|
||||
- name: Upload documentation archive
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue