-
Notifications
You must be signed in to change notification settings - Fork 0
124 lines (104 loc) · 3.66 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
name: CI
on:
# Runs on Every Push
push:
# Runs on Pull Requests
pull_request:
workflow_dispatch:
download_designs:
runs-on: ubuntu-latest
strategy:
matrix:
designs: ["caravel_user_project", "openframe_timer_example"]
steps:
- uses: actions/checkout@v3
- name: Export DESIGN PATH
run: echo "DESIGN_PATH=/home/runner/work/designs" >> $GITHUB_ENV
- name: Download Designs
run: |
mkdir -p ${{ env.DESIGN_PATH }}
python3 -m pip install --upgrade --no-cache-dir volare
python3 $GITHUB_WORKSPACE/.github/scripts/install_dep.py --json $GITHUB_WORKSPACE/.github/scripts/designs.json --output ${{ env.DESIGN_PATH }} --dependency ${{ matrix.designs }}
- name: Tarball Designs
run: |
tar -cf /tmp/${{ matrix.designs }}.tar -C $DESIGN_PATH/${{ matrix.designs }} .
- name: Upload ${{ matrix.designs }} Tarball
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.designs }}-tarball
path: /tmp/${{ matrix.designs }}.tar
run_designs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
pdk: ["sky130A", "sky130B"]
designs: ["caravel_user_project", "openframe_timer_example"]
needs: [download_designs]
steps:
- uses: actions/checkout@v3
- 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 "DESIGN_PATH=/home/runner/work/designs/${{ matrix.designs }}" >> $GITHUB_ENV
- name: Install chipIgnite tool
run: |
git clone https://x-access-token:${{ secrets.MY_TOKEN }}@github.com/efabless/chipignite.git
cd chipignite
pip install .
cd ..
- name: setup environment
run: |
cd ${{ env.DESIGN_PATH }}
ci setup
- name: harden
run: |
cd ${{ env.DESIGN_PATH }}
python3 $GITHUB_WORKSPACE/.github/scripts/get_designs.py --design ${{ env.DESIGN_PATH }}
for word in $(cat harden_sequence.txt); do
echo "CURRENT_DESIGN=${word}" >> $GITHUB_ENV
ci openlane run $word
done
- name: Create reproducible
if: failure()
run: tar -cf ${{ env.DESIGN_PATH }}/issue_reproducible.tar -C ${{ env.DESIGN_PATH }}/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: |
${{ env.DESIGN_PATH }}/issue_reproducible.tar
- name: cleanup
run: |
cd ${{ env.DESIGN_PATH }}
rm -rf openlane/*/runs
- name: run precheck
run: |
export OUTPUT_DIRECTORY=${{ env.DESIGN_PATH }}/mpw_precheck_result
export OUTPUT=$OUTPUT_DIRECTORY/logs/precheck.log
ci precheck run
cnt=$(grep -c "All Checks Passed" "$OUTPUT")
if ! [[ $cnt ]]; then cnt=0; fi
if [[ $cnt -eq 1 ]]; then exit 0; fi
exit 2
- name: upload failure logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: error
path: |
/home/runner/work/${{ env.DESIGN_PATH }}/mpw_precheck_result/logs/*
- name: run sta
run: |
ci sta run
- name: upload sta reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: sta-reports
path: |
/tmp/timing.tar