Skip to content

change flow to use ci #394

change flow to use ci

change flow to use ci #394

name: CI
on:
push: # Trigger on push
pull_request: # Trigger on pull requests
workflow_dispatch: # Allow manual trigger
jobs:
run_designs:
runs-on: ubuntu-latest
strategy:
matrix:
designs: ["caravel_user_project"]
pdk: ["sky130A", "sky130B"]
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 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: 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: run precheck
run: |
ci precheck run
- name: Create tarball on failure
if: failure()
run: |
tar -cf ${{ env.DESIGN_PATH }}/precheck_failure_logs.tar -C ${{ env.DESIGN_PATH }}/precheck_result logs
- name: upload failure logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: precheck-failure-logs
path: |
${{ env.DESIGN_PATH }}/precheck_failure_logs.tar
- name: run sta
run: |
ci sta run
- name: Create STA tarball on failure
if: failure()
run: |
tar -cf ${{ env.DESIGN_PATH }}/sta_failure_logs.tar -C ${{ env.DESIGN_PATH }}/logs .
- name: upload sta reports
if: failure()
uses: actions/upload-artifact@v3
with:
name: sta-failure-logs
path: |
${{ env.DESIGN_PATH }}/sta_failure_logs.tar