Merge branch 'master' of github.com:phanrahan/magma into coreir-optional #3562
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Linux Test | |
on: | |
push: | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.8', '3.10'] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt install -y verilator libgmp-dev libmpfr-dev libmpc-dev | |
python -m pip install --upgrade pip | |
# BEGIN: Temp fix, see | |
# https://github.com/henry0312/pytest-pycodestyle/issues/97 | |
pip install py | |
# END: Temp fix | |
pip install . | |
pip install flake8 pytest pytest-cov pytest-pycodestyle fault>=3.1.1 | |
- name: Test with pytest | |
run: | | |
py.test --cov magma -v --cov-report term-missing tests | |
pycodestyle magma/ | |
- name: Test optional dependencies | |
run: | | |
# TODO(leonardt): Ideally we only run specific tests | |
pip install kratos # test optional dependency | |
pip install coreir # test optional dependency | |
py.test tests | |
- name: Smoke test package | |
run: | | |
pushd /tmp | |
python -c "import magma" | |
popd | |
- name: Test riscv_mini | |
run: | | |
cd examples/riscv_mini | |
# TODO(leonardt): Merge with top-level coverage | |
pytest --pycodestyle tests/ riscv_mini/ | |
cd - | |
- name: Upload coverage | |
run: | | |
bash <(curl -s https://codecov.io/bash) |