-
Notifications
You must be signed in to change notification settings - Fork 89
107 lines (86 loc) · 3.37 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
name: CI
on:
# Runs on Every Push
push:
# Runs on Pull Requests
pull_request:
workflow_dispatch:
jobs:
build-pdk:
runs-on: ubuntu-latest
name: Build and Cache PDK
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 Env Variables
run: |
echo "PDK_ROOT=/home/runner/work/pdk" >> $GITHUB_ENV
- name: Install Dependencies
run: |
sudo mkdir -p ${{ env.PDK_ROOT }}
sudo chown -R $USER:$USER ${{ env.PDK_ROOT }}
make install
make pdk-with-volare
- name: Tarball PDK
run: |
tar -cf /tmp/pdk.tar -C $PDK_ROOT .
- name: Upload PDK Tarball
uses: actions/upload-artifact@v2
with:
name: pdk-tarball
path: /tmp/pdk.tar
user_project_flow:
timeout-minutes: 720
runs-on: ubuntu-latest
strategy:
matrix:
pdk: ["sky130A", "sky130B"]
needs: [build-pdk]
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 Env Variables
run: |
echo "PDK_ROOT=/home/runner/work/pdk" >> $GITHUB_ENV
echo "PDK=${{ matrix.pdk }}" >> $GITHUB_ENV
echo "PDKPATH=/home/runner/work/pdk/${{ matrix.pdk }}" >> $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: Install Dependencies
run: |
make install
make install_mcw
- name: Run Precheck
run: |
export INPUT_DIRECTORY=$(pwd)
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
git clone --depth=1 https://github.com/efabless/mpw_precheck.git
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
- name: Upload Failure Logs
if: failure()
uses: actions/upload-artifact@v2
with:
name: error
path: |
/home/runner/work/caravel_user_project_analog/caravel_user_project_analog/mpw_precheck_result/logs/*