-
Notifications
You must be signed in to change notification settings - Fork 329
559 lines (476 loc) · 20.1 KB
/
user_project_ci.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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
name: CI
on:
# Runs on Every Push
push:
# Runs on Pull Requests
pull_request:
workflow_dispatch:
jobs:
download_caravel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Setup Environment Variables
run: |
echo "PDK_ROOT=$GITHUB_WORKSPACE/pdk" >> $GITHUB_ENV
echo "OPENLANE_ROOT=$GITHUB_WORKSPACE/openlane_src" >> $GITHUB_ENV
echo "CARAVEL_ROOT=$GITHUB_WORKSPACE/caravel" >> $GITHUB_ENV
echo "MCW_ROOT=$GITHUB_WORKSPACE/mgmt_core_wrapper" >> $GITHUB_ENV
echo "TIMING_ROOT=$GITHUB_WORKSPACE/timing-scripts" >> $GITHUB_ENV
echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV
echo "MPW_TAG=main" >> $GITHUB_ENV
- name: Install dependencies
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
make install
cd ${{ env.CARAVEL_ROOT }}
rm -rf gds maglef openlane spi LICENSE manifest .git
- name: Tarball Caravel
run: |
tar -cf /tmp/caravel.tar -C $CARAVEL_ROOT .
- name: Upload Caravel Tarball
uses: actions/upload-artifact@v2
with:
name: caravel-tarball
path: /tmp/caravel.tar
download_deps:
runs-on: ubuntu-latest
strategy:
matrix:
targets: ["pdk-with-volare", "install_mcw", "openlane", "setup-timing-scripts", "precheck"]
needs: [download_caravel]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Setup Environment Variables
run: |
echo "PDK_ROOT=$GITHUB_WORKSPACE/pdk" >> $GITHUB_ENV
echo "OPENLANE_ROOT=$GITHUB_WORKSPACE/openlane_src" >> $GITHUB_ENV
echo "CARAVEL_ROOT=$GITHUB_WORKSPACE/caravel" >> $GITHUB_ENV
echo "MCW_ROOT=$GITHUB_WORKSPACE/mgmt_core_wrapper" >> $GITHUB_ENV
echo "TIMING_ROOT=$GITHUB_WORKSPACE/timing-scripts" >> $GITHUB_ENV
echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV
echo "MPW_TAG=main" >> $GITHUB_ENV
- name: Get dependencies name
run: |
if [[ "${{ matrix.targets }}" == "install_mcw" ]]; then
echo "dep_name=mgmt_core_wrapper" >> $GITHUB_ENV
echo "dep_root=${{ env.MCW_ROOT }}" >> $GITHUB_ENV
elif [[ "${{ matrix.targets }}" == "openlane" ]]; then
echo "dep_name=openlane" >> $GITHUB_ENV
echo "dep_root=${{ env.OPENLANE_ROOT }}" >> $GITHUB_ENV
elif [[ "${{ matrix.targets }}" == "pdk-with-volare" ]]; then
echo "dep_name=pdk" >> $GITHUB_ENV
echo "dep_root=${{ env.PDK_ROOT }}" >> $GITHUB_ENV
elif [[ "${{ matrix.targets }}" == "setup-timing-scripts" ]]; then
echo "dep_name=timing-scripts" >> $GITHUB_ENV
echo "dep_root=${{ env.TIMING_ROOT }}" >> $GITHUB_ENV
elif [[ "${{ matrix.targets }}" == "precheck" ]]; then
echo "dep_name=precheck" >> $GITHUB_ENV
echo "dep_root=${{ env.PRECHECK_ROOT }}" >> $GITHUB_ENV
fi
- name: Download caravel Tarball
uses: actions/download-artifact@v2
with:
name: caravel-tarball
path: /tmp
- name: Unpack caravel Tarball
run: |
sudo mkdir -p ${{ env.CARAVEL_ROOT }}
sudo chown -R $USER:$USER ${{ env.CARAVEL_ROOT }}
tar -xf /tmp/caravel.tar -C $CARAVEL_ROOT .
- name: Install dependencies
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
make ${{ matrix.targets }}
if [[ "${{ env.dep_name }}" == "mgmt_core_wrapper" ]]; then
cd ${{ env.dep_root }}
rm -rf gds maglef openlane spi LICENSE manifest docs litex lvs .git
fi
- name: Tarball Dependencies
run: |
tar -cf /tmp/${{ env.dep_name }}.tar -C ${{ env.dep_root }} .
- name: Upload Dependencies Tarball
uses: actions/upload-artifact@v2
with:
name: ${{ env.dep_name }}-tarball
path: /tmp/${{ env.dep_name }}.tar
hardening:
timeout-minutes: 720
runs-on: ubuntu-latest
strategy:
matrix:
pdk: ["sky130A", "sky130B"]
needs: [download_deps]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Export ENVIRONMENT VARIABLES
run: |
echo "PDK=${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDKPATH=$GITHUB_WORKSPACE/pdk/${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDK_ROOT=$GITHUB_WORKSPACE/pdk" >> $GITHUB_ENV
echo "OPENLANE_ROOT=$GITHUB_WORKSPACE/openlane_src" >> $GITHUB_ENV
echo "CARAVEL_ROOT=$GITHUB_WORKSPACE/caravel" >> $GITHUB_ENV
echo "MCW_ROOT=$GITHUB_WORKSPACE/mgmt_core_wrapper" >> $GITHUB_ENV
echo "TIMING_ROOT=$GITHUB_WORKSPACE/timing-scripts" >> $GITHUB_ENV
echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV
echo "MPW_TAG=main" >> $GITHUB_ENV
- name: Download PDK Tarball
uses: actions/download-artifact@v2
with:
name: pdk-tarball
path: /tmp
- name: Unpack PDK Tarball
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
tar -xf /tmp/pdk.tar -C $PDK_ROOT .
- name: Download openlane Tarball
uses: actions/download-artifact@v2
with:
name: openlane-tarball
path: /tmp
- name: Unpack openlane Tarball
run: |
sudo mkdir -p ${{ env.OPENLANE_ROOT }}
sudo chown -R $USER:$USER ${{ env.OPENLANE_ROOT }}
tar -xf /tmp/openlane.tar -C $OPENLANE_ROOT .
- name: Harden using Openlane
run: |
python3 $GITHUB_WORKSPACE/.github/scripts/get_designs.py --design $GITHUB_WORKSPACE
for word in $(cat harden_sequence.txt); do
echo "CURRENT_DESIGN=${word}" >> $GITHUB_ENV
make $word
done
rm -rf openlane/user_proj_example/runs openlane/user_project_wrapper/runs pdk openlane_src caravel mgmt_core_wrapper timing-scripts mpw_precheck
- name: Create reproducible
if: failure()
run: tar -cf $GITHUB_WORKSPACE/issue_reproducible.tar -C $GITHUB_WORKSPACE/openlane/${{ env.CURRENT_DESIGN }}/runs/${{ env.CURRENT_DESIGN }}/issue_reproducible .
- name: upload failure logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: openlane-issue-reproducible
path: |
$GITHUB_WORKSPACE/issue_reproducible.tar
- name: Tarball Design_${{ matrix.pdk }}
run: |
tar -cf /tmp/design_${{ matrix.pdk }}.tar -C $GITHUB_WORKSPACE .
- name: Upload Design_${{ matrix.pdk }} Tarball
uses: actions/upload-artifact@v2
with:
name: design_${{ matrix.pdk }}-tarball
path: /tmp/design_${{ matrix.pdk }}.tar
RTL-verification:
timeout-minutes: 720
runs-on: ubuntu-latest
strategy:
matrix:
pdk: ["sky130A", "sky130B"]
needs: [download_deps]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Export ENVIRONMENT VARIABLES
run: |
echo "PDK=${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDKPATH=$GITHUB_WORKSPACE/pdk/${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDK_ROOT=$GITHUB_WORKSPACE/pdk" >> $GITHUB_ENV
echo "OPENLANE_ROOT=$GITHUB_WORKSPACE/openlane_src" >> $GITHUB_ENV
echo "CARAVEL_ROOT=$GITHUB_WORKSPACE/caravel" >> $GITHUB_ENV
echo "MCW_ROOT=$GITHUB_WORKSPACE/mgmt_core_wrapper" >> $GITHUB_ENV
echo "TIMING_ROOT=$GITHUB_WORKSPACE/timing-scripts" >> $GITHUB_ENV
echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV
echo "MPW_TAG=main" >> $GITHUB_ENV
- name: Download PDK Tarball
uses: actions/download-artifact@v2
with:
name: pdk-tarball
path: /tmp
- name: Unpack PDK Tarball
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
tar -xf /tmp/pdk.tar -C $PDK_ROOT .
- name: Download caravel Tarball
uses: actions/download-artifact@v2
with:
name: caravel-tarball
path: /tmp
- name: Unpack caravel Tarball
run: |
sudo mkdir -p ${{ env.CARAVEL_ROOT }}
sudo chown -R $USER:$USER ${{ env.CARAVEL_ROOT }}
tar -xf /tmp/caravel.tar -C $CARAVEL_ROOT .
- name: Download mgmt_core_wrapper Tarball
uses: actions/download-artifact@v2
with:
name: mgmt_core_wrapper-tarball
path: /tmp
- name: Unpack mgmt_core_wrapper Tarball
run: |
sudo mkdir -p ${{ env.MCW_ROOT }}
sudo chown -R $USER:$USER ${{ env.MCW_ROOT }}
tar -xf /tmp/mgmt_core_wrapper.tar -C $MCW_ROOT .
- name: install cocotb
run: |
make setup-cocotb
- name: run RTL verification
run: |
cd $GITHUB_WORKSPACE/verilog/dv/cocotb && $GITHUB_WORKSPACE/venv-cocotb/bin/caravel_cocotb -tl user_proj_tests/user_proj_tests.yaml -verbosity debug --CI -tag rtl_verification
cnt=$(grep -c "failed" "$GITHUB_WORKSPACE/verilog/dv/cocotb/sim/rtl_verification/runs.log")
if ! [[ $cnt ]]; then cnt=0; fi
if [[ $cnt -eq 1 ]]; then exit 0; fi
exit 2
precheck:
timeout-minutes: 720
runs-on: ubuntu-latest
strategy:
matrix:
pdk: ["sky130A", "sky130B"]
needs: [hardening]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Export ENVIRONMENT VARIABLES
run: |
echo "PDK=${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDKPATH=$GITHUB_WORKSPACE/pdk/${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDK_ROOT=$GITHUB_WORKSPACE/pdk" >> $GITHUB_ENV
echo "OPENLANE_ROOT=$GITHUB_WORKSPACE/openlane_src" >> $GITHUB_ENV
echo "CARAVEL_ROOT=$GITHUB_WORKSPACE/caravel" >> $GITHUB_ENV
echo "MCW_ROOT=$GITHUB_WORKSPACE/mgmt_core_wrapper" >> $GITHUB_ENV
echo "TIMING_ROOT=$GITHUB_WORKSPACE/timing-scripts" >> $GITHUB_ENV
echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV
echo "MPW_TAG=main" >> $GITHUB_ENV
- name: Download PDK Tarball
uses: actions/download-artifact@v2
with:
name: pdk-tarball
path: /tmp
- name: Unpack PDK Tarball
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
tar -xf /tmp/pdk.tar -C $PDK_ROOT .
- name: Download precheck Tarball
uses: actions/download-artifact@v2
with:
name: precheck-tarball
path: /tmp
- name: Unpack precheck Tarball
run: |
sudo mkdir -p ${{ env.PRECHECK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PRECHECK_ROOT }}
tar -xf /tmp/precheck.tar -C $PRECHECK_ROOT .
- name: Download Design_${{ matrix.pdk }} Tarball
uses: actions/download-artifact@v2
with:
name: design_${{ matrix.pdk }}-tarball
path: /tmp
- name: Unpack Design_${{ matrix.pdk }} Tarball
run: |
sudo mkdir -p $GITHUB_WORKSPACE
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
tar -xf /tmp/design_${{ matrix.pdk }}.tar -C $GITHUB_WORKSPACE .
- name: Run Precheck
run: |
export INPUT_DIRECTORY=$GITHUB_WORKSPACE
export PRECHECK_ROOT=$INPUT_DIRECTORY/mpw_precheck
export OUTPUT_DIRECTORY=$INPUT_DIRECTORY/mpw_precheck_result
export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
export PDKPATH=$PDK_ROOT/sky130A
docker run -v "$PRECHECK_ROOT":"$PRECHECK_ROOT" -v "$INPUT_DIRECTORY":"$INPUT_DIRECTORY" -v "${{ env.PDK_ROOT }}":"${{ env.PDK_ROOT }}" -e INPUT_DIRECTORY="$INPUT_DIRECTORY" -e PDK_ROOT="${{ env.PDK_ROOT }}" -e PDKPATH="${{ env.PDKPATH }}" -u $(id -u "$USER"):$(id -g "$USER") efabless/mpw_precheck:latest bash -c "cd $PRECHECK_ROOT; python3 mpw_precheck.py --input_directory $INPUT_DIRECTORY --pdk_path ${{ env.PDKPATH }} --output_directory $OUTPUT_DIRECTORY license makefile consistency xor magic_drc klayout_beol klayout_feol klayout_met_min_ca_density klayout_offgrid klayout_pin_label_purposes_overlapping_drawing klayout_zeroarea lvs"
cnt=$(grep -c "All Checks Passed" "$OUTPUT")
if ! [[ $cnt ]]; then cnt=0; fi
if [[ $cnt -eq 1 ]]; then exit 0; fi
exit 2
STA:
timeout-minutes: 720
runs-on: ubuntu-latest
strategy:
matrix:
pdk: ["sky130A"]
needs: [hardening]
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Export ENVIRONMENT VARIABLES
run: |
echo "PDK=${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDKPATH=$GITHUB_WORKSPACE/pdk/${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDK_ROOT=$GITHUB_WORKSPACE/pdk" >> $GITHUB_ENV
echo "OPENLANE_ROOT=$GITHUB_WORKSPACE/openlane_src" >> $GITHUB_ENV
echo "CARAVEL_ROOT=$GITHUB_WORKSPACE/caravel" >> $GITHUB_ENV
echo "MCW_ROOT=$GITHUB_WORKSPACE/mgmt_core_wrapper" >> $GITHUB_ENV
echo "TIMING_ROOT=$GITHUB_WORKSPACE/timing-scripts" >> $GITHUB_ENV
echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV
echo "MPW_TAG=main" >> $GITHUB_ENV
- name: Download PDK Tarball
uses: actions/download-artifact@v2
with:
name: pdk-tarball
path: /tmp
- name: Unpack PDK Tarball
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
tar -xf /tmp/pdk.tar -C $PDK_ROOT .
- name: Download timing-scripts Tarball
uses: actions/download-artifact@v2
with:
name: timing-scripts-tarball
path: /tmp
- name: Unpack timing-scripts Tarball
run: |
sudo mkdir -p ${{ env.TIMING_ROOT }}
sudo chown -R $USER:$USER ${{ env.TIMING_ROOT }}
tar -xf /tmp/timing-scripts.tar -C $TIMING_ROOT .
- name: Download Design_${{ matrix.pdk }} Tarball
uses: actions/download-artifact@v2
with:
name: design_${{ matrix.pdk }}-tarball
path: /tmp
- name: Unpack Design_${{ matrix.pdk }} Tarball
run: |
sudo mkdir -p $GITHUB_WORKSPACE
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
tar -xf /tmp/design_${{ matrix.pdk }}.tar -C $GITHUB_WORKSPACE .
- name: Download Caravel Tarball
uses: actions/download-artifact@v2
with:
name: caravel-tarball
path: /tmp
- name: Unpack Caravel Tarball
run: |
sudo mkdir -p ${{ env.CARAVEL_ROOT }}
sudo chown -R $USER:$USER ${{ env.CARAVEL_ROOT }}
tar -xf /tmp/caravel.tar -C ${{ env.CARAVEL_ROOT }} .
- name: Download mgmt_core_wrapper Tarball
uses: actions/download-artifact@v2
with:
name: mgmt_core_wrapper-tarball
path: /tmp
- name: Unpack mgmt_core_wrapper Tarball
run: |
sudo mkdir -p ${{ env.MCW_ROOT }}
sudo chown -R $USER:$USER ${{ env.MCW_ROOT }}
tar -xf /tmp/mgmt_core_wrapper.tar -C ${{ env.MCW_ROOT }} .
- name: Run STA
run: |
export CUP_ROOT=$GITHUB_WORKSPACE
export PROJECT_ROOT=$GITHUB_WORKSPACE
cd $CUP_ROOT
make extract-parasitics
make create-spef-mapping
make caravel-sta
tar -cf /tmp/timing.tar $CUP_ROOT/signoff/caravel/openlane-signoff/timing
find $CUP_ROOT/signoff/caravel/openlane-signoff/timing/*/ -name "summary.log" | head -n1 \
| xargs head -n5 | tail -n1 > $CUP_ROOT/signoff/caravel/openlane-signoff/timing/all-summary.rpt
find $CUP_ROOT/signoff/caravel/openlane-signoff/timing/*/ -name "summary.log" \
| xargs -I {} bash -c "head -n7 {} | tail -n1" >> $CUP_ROOT/signoff/caravel/openlane-signoff/timing/all-summary.rpt
vio=$(grep -c "vio(" $CUP_ROOT/signoff/caravel/openlane-signoff/timing/all-summary.rpt || true)
if [[ $vio -gt 0 ]];
then
echo "STA violation count: $vio"
exit 2
else
echo "STA run passed"
exit 0
fi
# GL-verification:
# timeout-minutes: 720
# runs-on: ubuntu-latest
# strategy:
# matrix:
# pdk: ["sky130A", "sky130B"]
# needs: [download_deps]
# steps:
# - uses: actions/checkout@v2
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v1
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Export ENVIRONMENT VARIABLES
# run: |
# echo "PDK=${{ matrix.pdk }}" >> $GITHUB_ENV
# echo "PDKPATH=$GITHUB_WORKSPACE/pdk/${{ matrix.pdk }}" >> $GITHUB_ENV
# echo "PDK_ROOT=$GITHUB_WORKSPACE/pdk" >> $GITHUB_ENV
# echo "OPENLANE_ROOT=$GITHUB_WORKSPACE/openlane_src" >> $GITHUB_ENV
# echo "CARAVEL_ROOT=$GITHUB_WORKSPACE/caravel" >> $GITHUB_ENV
# echo "MCW_ROOT=$GITHUB_WORKSPACE/mgmt_core_wrapper" >> $GITHUB_ENV
# echo "TIMING_ROOT=$GITHUB_WORKSPACE/timing-scripts" >> $GITHUB_ENV
# echo "PRECHECK_ROOT=$GITHUB_WORKSPACE/mpw_precheck" >> $GITHUB_ENV
# echo "MPW_TAG=main" >> $GITHUB_ENV
# - name: Download PDK Tarball
# uses: actions/download-artifact@v2
# with:
# name: pdk-tarball
# path: /tmp
# - name: Unpack PDK Tarball
# run: |
# sudo mkdir -p ${{ env.PDK_ROOT }}
# sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
# tar -xf /tmp/pdk.tar -C $PDK_ROOT .
# - name: Download caravel Tarball
# uses: actions/download-artifact@v2
# with:
# name: caravel-tarball
# path: /tmp
# - name: Unpack caravel Tarball
# run: |
# sudo mkdir -p ${{ env.CARAVEL_ROOT }}
# sudo chown -R $USER:$USER ${{ env.CARAVEL_ROOT }}
# tar -xf /tmp/caravel.tar -C $CARAVEL_ROOT .
# - name: Download mgmt_core_wrapper Tarball
# uses: actions/download-artifact@v2
# with:
# name: mgmt_core_wrapper-tarball
# path: /tmp
# - name: Unpack mgmt_core_wrapper Tarball
# run: |
# sudo mkdir -p ${{ env.MCW_ROOT }}
# sudo chown -R $USER:$USER ${{ env.MCW_ROOT }}
# tar -xf /tmp/mgmt_core_wrapper.tar -C $MCW_ROOT .
# # - name: Download Design Tarball
# # uses: actions/download-artifact@v2
# # with:
# # name: design-tarball
# # path: /tmp
# # - name: Unpack Design Tarball
# # run: |
# # sudo mkdir -p $GITHUB_WORKSPACE
# # sudo chown -R $USER:$USER $GITHUB_WORKSPACE
# # tar -xf /tmp/design.tar -C $GITHUB_WORKSPACE .
# - name: install cocotb
# run: |
# make setup-cocotb
# - name: run RTL verification
# run: |
# cd $GITHUB_WORKSPACE/verilog/dv/cocotb && $GITHUB_WORKSPACE/venv-cocotb/bin/caravel_cocotb -tl user_proj_tests/user_proj_tests_gl.yaml -verbosity debug --CI -tag gl_verification
# cnt=$(grep -c "failed" "$GITHUB_WORKSPACE/verilog/dv/cocotb/sim/gl_verification/runs.log")
# if ! [[ $cnt ]]; then cnt=0; fi
# if [[ $cnt -eq 1 ]]; then exit 0; fi
# exit 2