-
Notifications
You must be signed in to change notification settings - Fork 2
175 lines (148 loc) · 5.04 KB
/
unittests.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
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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
name: Bug Fix Unittests
on:
push:
pull_request:
jobs:
test-scala:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Tabby OSS Cad Suite (from YosysHQ)
uses: YosysHQ/setup-oss-cad-suite@v2
with:
version: '2022-06-22'
- name: Install OptiMathSAT
run: |
wget -q https://optimathsat.disi.unitn.it/releases/optimathsat-1.7.3/optimathsat-1.7.3-linux-64-bit.tar.gz
tar -xf optimathsat-1.7.3-linux-64-bit.tar.gz
echo "${PWD}/optimathsat-1.7.3-linux-64-bit/bin" >> $GITHUB_PATH
- name: Install CVC4
run: sudo apt-get install -y cvc4
- name: Print Solver Versions
run: |
z3 -version
optimathsat -version
cvc4 --version
verilator -version
- name: Run Scala Unittests
timeout-minutes: 5
working-directory: synthesizer
run: sbt test
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Tabby OSS Cad Suite (from YosysHQ)
uses: YosysHQ/setup-oss-cad-suite@v2
with:
version: '2022-06-22'
- name: Install OptiMathSAT
run: |
wget -q https://optimathsat.disi.unitn.it/releases/optimathsat-1.7.3/optimathsat-1.7.3-linux-64-bit.tar.gz
tar -xf optimathsat-1.7.3-linux-64-bit.tar.gz
echo "${PWD}/optimathsat-1.7.3-linux-64-bit/bin" >> $GITHUB_PATH
- name: Install CVC4
run: sudo apt-get install -y cvc4
- name: Print Solver Versions
run: |
z3 -version
optimathsat -version
cvc4 --version
verilator -version
- name: Compile Synthesizer to JAR
working-directory: synthesizer
run: sbt assembly
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Create Virtual Environment and Install Requirements
run: |
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Run Python Unittests
timeout-minutes: 10
run: |
source venv/bin/activate
./test.py
test-benchmarks:
name: Common Benchmark Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Icarus Verilog
run: sudo apt-get install -y iverilog
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Create Virtual Environment and Install Requirements
run: |
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Check Benchmark Configuration Data
run: |
source venv/bin/activate
./scripts/load_all_benchmarks.py
test-repair-check:
name: Check Repairs Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Icarus Verilog
run: sudo apt-get install -y iverilog
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install Tabby OSS Cad Suite (from YosysHQ)
uses: YosysHQ/setup-oss-cad-suite@v2
with:
version: '2022-06-22'
- name: Create Virtual Environment and Install Requirements
run: |
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
- name: Check Repairs found by CirFix for the mux_4_1 benchmark
run: |
source venv/bin/activate
./scripts/check_repairs.py --working-dir=tmp --results=results/test-results --sim=iverilog
cat tmp/mux_4_1_wadden_buggy1_oracle-full_repair_2021-07-20-23:50:05.log
test-cirfix:
name: Test CirFix Quick Repairs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Icarus Verilog
run: sudo apt-get install -y iverilog
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Create Virtual Environment and Install Requirements
run: |
cd cirfix
./make_venv.sh
- name: Repair first_counter_overflow_wadden_buggy1
timeout-minutes: 3
run: |
cd cirfix
source venv/bin/activate
cd prototype
python3 repair.py --project=../../benchmarks/cirfix/first_counter_overflow --bug=wadden_buggy1 --log --working-dir=first_counter_overflow_wadden_buggy1 --seed="repair_2020-09-23-11:24:14" --simulator=iverilog
- name: Repair padder_ssscrazy_buggy1
timeout-minutes: 3
run: |
cd cirfix
source venv/bin/activate
cd prototype
python3 repair.py --project=../../benchmarks/cirfix/opencores/sha3/low_throughput_core/padder.toml --bug=ssscrazy_buggy1 --log --working-dir=padder_ssscrazy_buggy1 --seed="repair_2020-09-24-15:16:49" --simulator=iverilog
- name: Repair first_counter_overflow_wadden_buggy1 using the run.py script
timeout-minutes: 3
run: |
cd cirfix
source venv/bin/activate
./run.py --working-dir=counter-wadden1 --experiment=first-counter-wadden-1 --threads=2 --simulator=iverilog