-
Notifications
You must be signed in to change notification settings - Fork 2
144 lines (122 loc) · 4.2 KB
/
uvm_ci.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
name: Run UVM all tests
on:
push: # This now triggers on pushes to any branch
pull_request: # This now triggers on pull requests to any branch
jobs:
verify_APB:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: download docker
run: |
docker pull efabless/dv:cocotb
- name: Navigate to verify/uvm-python and run tests
run: |
cd verify/uvm-python
make run_all_tests RUN_MERGE_COVERAGE=false
- name: Check for test results in run
run: |
cd verify/uvm-python
passed_count=$(find sim/default_tag -type f -name 'passed' | wc -l)
failed_count=$(find sim/default_tag -type f -name 'failed' | wc -l)
unknown_count=$(find sim/default_tag -type f -name 'unknown' | wc -l)
echo "Passed: $passed_count"
echo "Failed: $failed_count"
echo "Unknown: $unknown_count"
if [ "$passed_count" -eq 0 ]; then
echo "Error: No passed test results found"
exit 1
elif [ "$failed_count" -ne 0 ] || [ "$unknown_count" -ne 0 ]; then
echo "Error: There are failed or unknown test results"
exit 1
else
echo "All tests passed successfully"
fi
- name: tar failed tests
if: failure()
run: |
cd verify/uvm-python
tar -czf failed_tests.tar.gz sim/default_tag
- name: upload failed tests
if: failure()
uses: actions/upload-artifact@v2
with:
name: failed_tests
path: verify/uvm-python/failed_tests.tar.gz
verify_AHB:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: download docker
run: |
docker pull efabless/dv:cocotb
- name: Navigate to verify/uvm-python and run tests
run: |
cd verify/uvm-python
make run_all_tests RUN_MERGE_COVERAGE=false BUS_TYPE=AHB
- name: Check for test results in run
run: |
cd verify/uvm-python
passed_count=$(find sim/default_tag -type f -name 'passed' | wc -l)
failed_count=$(find sim/default_tag -type f -name 'failed' | wc -l)
unknown_count=$(find sim/default_tag -type f -name 'unknown' | wc -l)
echo "Passed: $passed_count"
echo "Failed: $failed_count"
echo "Unknown: $unknown_count"
if [ "$passed_count" -eq 0 ]; then
echo "Error: No passed test results found"
exit 1
elif [ "$failed_count" -ne 0 ] || [ "$unknown_count" -ne 0 ]; then
echo "Error: There are failed or unknown test results"
exit 1
else
echo "All tests passed successfully"
fi
- name: tar failed tests
if: failure()
run: |
cd verify/uvm-python
tar -czf failed_tests.tar.gz sim/default_tag
- name: upload failed tests
if: failure()
uses: actions/upload-artifact@v2
with:
name: failed_tests
path: verify/uvm-python/failed_tests.tar.gz
lint: # Lint the RTL code
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: download docker
run: |
docker pull efabless/dv:cocotb
- uses: actions/checkout@v2
- name: Lint
run: |
cd verify/uvm-python
make lint BUS_TYPE=APB
cnt=$(grep -c "Error" "sim/linter.log")
if ! [[ $cnt ]]; then cnt=0; fi
if [[ $cnt -eq 1 ]]; then exit 0; fi
exit 2
cnt=$(grep -c "Warning" "sim/linter.log")
if ! [[ $cnt ]]; then cnt=0; fi
if [[ $cnt -eq 1 ]]; then exit 0; fi
exit 2
- name: Upload lint results
if: failure()
uses: actions/upload-artifact@v2
with:
name: lint_results.log
path: verify/uvm-python/sim/linter.log