-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (72 loc) · 1.89 KB
/
makefile.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Builds and test
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: ubuntu-latest
name: Builds VPI library
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: sudo apt-get update;sudo apt install iverilog make libcunit1 libcunit1-dev valgrind lcov xsltproc
- name: configure
run: ./configure
- name: Build library
run: make
- name: Build and run cunit test
run: cd test;make;cd ..
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: libvpi
path: build/verisocks.vpi
- name: Archive cunit test artifacts
uses: actions/upload-artifact@v4
with:
name: cunit-test-results
path: |
test/build/CUnitAutomated-Results.xml
test/build/cunit_test_results.html
test/build/cunit_test_valgrind.rpt
pytest:
needs: build
runs-on: ubuntu-latest
name: Run pytest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3"
- name: Install dependencies
run: |
sudo apt install iverilog
python -m pip install --upgrade pip
pip install -e ./python
pip install pytest pytest-cov
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: libvpi
- name: Check verisocks.vpi
run: |
ls -l verisocks.vpi
mkdir -p build
mv verisocks.vpi build/.
- name: Run pytest
run: pytest -x --log-cli-level=INFO --cov=verisocks
- name: Archive test logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test-logs
path: |
pytest.log
vvp.log