@@ -14,20 +14,15 @@ jobs:
1414 matrix :
1515 include :
1616 - name : simple
17- test-suite : tests/simple_tests
1817 - name : sv2v
19- test-suite : third_party/sv2v/test
2018 - name : yosys
21- test-suite : third_party/yosys/tests
2219 fail-fast : false
2320 name : ${{ matrix.name }}
2421 env :
2522 GIT_HTTP_LOW_SPEED_LIMIT : 1
2623 GIT_HTTP_LOW_SPEED_TIME : 600
2724 DEBIAN_FRONTEND : noninteractive
2825 GHA_MACHINE_TYPE : " n2-highmem-8"
29- PARSER : yosys-plugin
30- TEST_SUITE_DIR : ${{ matrix.test-suite }}
3126 TEST_SUITE_NAME : ${{ matrix.name }}
3227
3328 steps :
@@ -42,35 +37,12 @@ jobs:
4237
4338 - name : Install dependencies
4439 run : |
45- apt-get update -q
46- apt-get install -y \
47- ant \
48- build-essential \
49- cmake \
50- default-jre \
51- flex \
52- git \
53- google-perftools \
54- jq \
55- libfl-dev \
56- libgoogle-perftools-dev \
57- python3 \
58- python3-dev \
59- python3-click \
60- swig \
61- tcl-dev \
62- tclsh \
63- time \
64- uuid \
65- uuid-dev \
66- ;
40+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME install_dependencies
41+
6742
6843 - name : Checkout submodules
6944 run : |
70- git submodule sync
71- git submodule update --depth 1 --init --recursive --checkout \
72- third_party/{yosys,sv2v,eqy,sby} \
73- ;
45+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME load_submodules
7446
7547 - name : Download binaries
7648 uses : actions/download-artifact@v2
@@ -89,21 +61,14 @@ jobs:
8961
9062 - name : Build eqy and sby
9163 run : |
92- make build_eqy build_sby -j$(nproc)
64+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME build_dependencies
9365
9466 - name : Test
9567 run : |
9668 chmod +x out/current/bin/sv2v
9769 source .github/scripts/common.sh
98- export PATH="$PWD/out/current/bin:$PATH"
99- ./run_fv_tests.mk -j$(nproc) \
100- TEST_SUITE_DIR:="$(realpath ${TEST_SUITE_DIR})" \
101- TEST_SUITE_NAME:="${TEST_SUITE_NAME}" \
102- test
70+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME run
10371
104- - name : Generate list of performed tests
105- run : |
106- ./tests/formal/gather_fv_results.sh $NAME
10772
10873 - name : Pack formal verification logs
10974 run : |
@@ -117,12 +82,6 @@ jobs:
11782 path : |
11883 build/*.tar
11984
120- - name : Upload list of performed tests
121- uses : actions/upload-artifact@v2
122- with :
123- name : formal-verification-tests-list
124- path : build/*.performed_tests_list.txt
125-
12685 - name : Upload load graphs
12786 uses : actions/upload-artifact@v2
12887 with :
@@ -134,34 +93,5 @@ jobs:
13493 - name : Check results and print a summary
13594 run : |
13695 set -o pipefail
137- python3 ./tests/formal/results.py "build/tests/${TEST_SUITE_NAME}" | tee $GITHUB_STEP_SUMMARY
138-
139- passlist-check :
140- name : Passlist Check
141- needs : tests-formal-verification
142- if : ${{ !cancelled() }}
143- runs-on : [self-hosted, Linux, X64, gcp-custom-runners]
144- container : ubuntu:jammy-20221130
145-
146- steps :
147- - uses : actions/checkout@v3
148- with :
149- fetch-depth : 1
96+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME gather_results | tee $GITHUB_STEP_SUMMARY
15097
151- - name : Download lists of performed tests
152- uses : actions/download-artifact@v2
153- with :
154- name : formal-verification-tests-list
155-
156- - name : Compare lists
157- run : |
158- sort *.performed_tests_list.txt > performed_tests_list.txt
159- grep -o '^[^ #]\+' tests/formal/passlist.txt | sort > sorted_passlist.txt
160- readarray not_performed_tests < <(comm -13 performed_tests_list.txt sorted_passlist.txt)
161- if (( ${#not_performed_tests[@]} > 0 )); then
162- printf '\x1b[1mTests from passlist.txt that were not performed:\x1b[0m\n'
163- printf '\x1b[91m%s\x1b[0m\n' "${not_performed_tests[@]}"
164- exit 1
165- else
166- exit 0
167- fi
0 commit comments