-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (55 loc) · 1.76 KB
/
tests.yaml
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
name: Tests
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
jobs:
test-verilator:
runs-on: ubuntu-latest
env:
VERILATOR_VERSION: v5.024
VERILATOR_INSTALL: /opt/verilator
steps:
- name: Cache Verilator
id: cache-verilator
uses: actions/cache@v4
with:
path: ${{ env.VERILATOR_INSTALL }}
key: verilator-${{ env.VERILATOR_VERSION }}-${{ runner.os }}
save-always: true
- name: Build Verilator
if: steps.cache-verilator.outputs.cache-hit != 'true'
run: |
# Install dependecies
sudo apt-get update
sudo apt-get install -y git help2man perl python3 make autoconf g++ flex bison ccache libfl2 libfl-dev
# Clone Verilator and checkout version
git clone https://github.com/verilator/verilator.git
cd verilator
git checkout ${{ env.VERILATOR_VERSION }}
# Build Verilator
autoconf
./configure --prefix ${{ env.VERILATOR_INSTALL }}
make -j$(nproc)
sudo make install
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Prepare evinronment
run: |
sudo apt-get install -y g++ flex bison ccache
echo "${{ env.VERILATOR_INSTALL }}/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}/contrib/svunit/bin" >> $GITHUB_PATH
- name: Run tests for package
run: make -C tests test_verilator
- name: Run tests for examples
run: make -C docs/modules/ROOT/examples/selftest test_verilator
- name: Parse test results
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: '**/work_verilator/tests.xml'
require_tests: true