blob: 92e1db8fcfac1e74d75296c001e3625a36cbf8be [file] [log] [blame]
name: user_project_ci
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
env:
PDK_ROOT: '/home/runner/work/pdk'
OPENLANE_ROOT: '/home/runner/work/openlane'
PDK: 'gf180mcuC'
PDK_TECH: 'gf180mcu'
CACHE_KEY: 'gfmpw-0d'
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
jobs:
gds:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: cache setup
id: cache-setup
uses: actions/cache@v3
with:
path: |
${{ env.PDK_ROOT }}
${{ env.OPENLANE_ROOT }}
caravel/
mgmt_core_wrapper/
openlane.tar
key: ${{ runner.os }}-setup-${{ env.CACHE_KEY }}
- if: steps.cache-setup.outputs.cache-hit != 'true'
name: setup
run: |
make setup
docker save efabless/openlane > openlane.tar
- if: steps.cache-setup.outputs.cache-hit == 'true'
name: restore setup
run: |
docker load < openlane.tar
- name: debug
run: |
find $OPENLANE_ROOT/
find $PDK_ROOT/
- name: setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: fetch verilog and build config
run: |
python -m pip install requests PyYAML Jinja2
python configure.py --create-user-config
- name: harden tiny_user_project
run: |
make tiny_user_project
find openlane/tiny_user_project/runs/tiny_user_project/
- name: show tiny_user_project metrics
run: |
python << EOF >> $GITHUB_STEP_SUMMARY
import csv
import pathlib
print('# tiny_user_project')
print('## metrics')
metrics = pathlib.Path('openlane/tiny_user_project/runs/tiny_user_project/reports/metrics.csv')
with metrics.open() as f:
d = list(csv.DictReader(f))[0]
print('key|value')
print('---|-----')
for k,v in d.items():
print(f'{k}|{v}')
EOF
- name: show tiny_user_project reports
run: |
cat << EOF >> $GITHUB_STEP_SUMMARY
## manufacturability
\`\`\`
`cat openlane/tiny_user_project/runs/tiny_user_project/reports/manufacturability.rpt`
\`\`\`
EOF
- name: harden user_project_wrapper
run: |
make user_project_wrapper
find openlane/user_project_wrapper/runs/user_project_wrapper/
- name: show user_project_wrapper metrics
run: |
python << EOF >> $GITHUB_STEP_SUMMARY
import csv
import pathlib
print('# user_project_wrapper')
print('## metrics')
metrics = pathlib.Path('openlane/user_project_wrapper/runs/user_project_wrapper/reports/metrics.csv')
with metrics.open() as f:
d = list(csv.DictReader(f))[0]
print('key|value')
print('---|-----')
for k,v in d.items():
print(f'{k}|{v}')
EOF
- name: show user_project_wrapper reports
run: |
cat << EOF >> $GITHUB_STEP_SUMMARY
## manufacturability
\`\`\`
`cat openlane/user_project_wrapper/runs/user_project_wrapper/reports/manufacturability.rpt`
\`\`\`
EOF
- name: cache gds
uses: actions/cache@v3
with:
path: |
def/
gds/
lef/
mag/
maglef/
sdc/
sdf/
signoff/
spef/
spi/
verilog/
openlane/tiny_user_project/runs/tiny_user_project/tmp/synthesis/post_techmap.dot
key: ${{ runner.os }}-gds-${{ github.run_id }}
commit:
if: github.ref_name == 'main'
needs:
- gds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: restore gds cache
uses: actions/cache@v3
with:
path: |
def/
gds/
lef/
mag/
maglef/
sdc/
sdf/
signoff/
spef/
spi/
verilog/
openlane/tiny_user_project/runs/tiny_user_project/tmp/synthesis/post_techmap.dot
key: ${{ runner.os }}-gds-${{ github.run_id }}
- name: commit
run: |
git status
git config --local user.name "tinybot"
git config --local user.email "bot@tinytapeout.com"
git add .
git commit -m "harden project [skip ci]"
git push origin main