fix syntax #376
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |