Skip to content

PyMTL 4.0 release staging #93

PyMTL 4.0 release staging

PyMTL 4.0 release staging #93

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python package
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
# The latest ubuntu release may exclude Python versions that have reached
# the end of life. An example of this is the upgrade from ubuntu-20.04 to
# ubuntu-22.04: support for Python 3.6.* and 3.7.* has been dropped and
# this broke our Github actions. We should periodically revisit this to
# make sure PyMTL works on the latest ubuntu LTS release. As of now I'm
# targeting ubuntu-20.04 because lots of PyMTL users still work with
# Python 3.6 and 3.7.
# runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [ 3.6, 3.7, 3.8, 3.9 ] # FIXME github recognizes 3.10 as 3.1 lol
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 Verilator
run: |
wget https://github.com/cornell-brg/verilator-travisci-cache/raw/master/verilator-github-actions-5.016.tar.gz
tar -C ${HOME} -xzf verilator-github-actions-5.016.tar.gz
echo "PYMTL_VERILATOR_INCLUDE_DIR=${HOME}/verilator/share/verilator/include" >> $GITHUB_ENV
echo "${HOME}/verilator/bin" >> $GITHUB_PATH
- name: Check Verilator
run: |
echo ${PYMTL_VERILATOR_INCLUDE_DIR}
verilator --version
- name: Install dependencies
run: |
sudo apt-get install -y graphviz
pip install --upgrade pip
pip install --requirement requirements/CI.txt
pip install .
- name: Test with pytest
run: |
mkdir build && cd build
pytest --cov-report xml --cov=pymtl3 .. --tb=short --hypothesis-profile CI
- name: Upload code coverage report
run: |
codecov