-
Notifications
You must be signed in to change notification settings - Fork 10
48 lines (43 loc) · 1.52 KB
/
python-package-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# 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:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '3.7', '3.8', '3.9', '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 Verilator
run: |
wget https://github.com/cornell-brg/verilator-travisci-cache/raw/master/verilator-travis-4.036.tar.gz
tar -C ${HOME} -xzf verilator-travis-4.036.tar.gz
echo "VERILATOR_ROOT=${HOME}/verilator" >> $GITHUB_ENV
echo "PYMTL_VERILATOR_INCLUDE_DIR=${HOME}/verilator/share/verilator/include" >> $GITHUB_ENV
echo "${HOME}/verilator/bin" >> $GITHUB_PATH
- name: Check Verilator
run: |
echo ${VERILATOR_ROOT}
echo ${PYMTL_VERILATOR_INCLUDE_DIR}
verilator --version
- name: Install dependencies
run: |
sudo apt-get install -y graphviz
pip install --upgrade pip
pip install pymtl3
pip install .
- name: Test with pytest
run: |
mkdir -p build && cd build
pytest .. -v --tb=short --hypothesis-profile CI