-
Notifications
You must be signed in to change notification settings - Fork 2
176 lines (153 loc) · 5 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
176
name: Bug Fix Unittests
on:
push:
pull_request:
jobs:
test-rust:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
toolchain:
- stable
steps:
- name: Update Rust to ${{ matrix.toolchain }}
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
- name: Install Tabby OSS Cad Suite (from YosysHQ)
uses: YosysHQ/setup-oss-cad-suite@v2
with:
version: '2022-06-22'
- uses: actions/checkout@v4
with:
submodules: true
- name: Build
working-directory: synth
run: cargo build --verbose
- name: Run tests
working-directory: synth
run: cargo test --verbose
- name: Check Formatting
working-directory: synth
run: cargo fmt --check
test-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install Tabby OSS Cad Suite (from YosysHQ)
uses: YosysHQ/setup-oss-cad-suite@v2
with:
version: '2022-06-22'
- name: Install CVC4
run: sudo apt-get install -y cvc4
- name: Print Solver Versions
run: |
z3 -version
cvc4 --version
verilator -version
- name: Compile Synthesizer
working-directory: synth
run: cargo build --release
- 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: 15
run: |
source venv/bin/activate
# avoid a race condition by ensuring that file exists
mkdir -p working-dir
pytest -n auto 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@v4
with:
submodules: true
- 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 (and also RTL-Repair results)
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
cat tmp/axis-adapter-s3_s3_csv/result.toml
test-cirfix:
name: Test CirFix Quick Repairs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- 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: Repair first_counter_overflow_wadden_buggy1
timeout-minutes: 3
run: |
source venv/bin/activate
cd cirfix
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: |
source venv/bin/activate
cd cirfix
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: |
source venv/bin/activate
cd cirfix
./run.py --working-dir=counter-wadden1 --experiment=first-counter-wadden-1 --threads=2 --simulator=iverilog