Update make.yml #98
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
# Copyright (C) 2023, Advanced Micro Devices, Inc. All rights reserved. | |
# | |
# Author: Eddie Hung, AMD | |
# | |
# SPDX-License-Identifier: MIT | |
# | |
name: make | |
on: | |
push: | |
pull_request: | |
jobs: | |
make: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
router: | |
- rwroute | |
- nxroute-poc | |
benchmark: | |
- boom_soc | |
- ispd16_example2 | |
- koios_dla_like_large | |
- rosetta_fd | |
- vtr_mcml | |
exclude: | |
# Insufficient memory on GitHub Actions | |
- router: rwroute | |
benchmark: boom_soc | |
- router: rwroute | |
benchmark: ispd16_example2 | |
- router: rwroute | |
benchmark: koios_dla_like_large | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: 'recursive' | |
- uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
cache: 'gradle' | |
- if: matrix.router == 'nxroute-poc' | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 'pypy3.8' | |
cache: 'pip' | |
- env: | |
CXXFLAGS: "-std=c++14" | |
run: | | |
pip install "pypandoc<1.8" | |
curl https://raw.githubusercontent.com/capnproto/pycapnp/v0.6.4/requirements.txt | sed "s/ //g" | xargs -I {} pip install \"{}\" | |
pip install --no-build-isolation "pycapnp<1" | |
- name: Download xcvu3p.device (nxroute-poc only) | |
if: matrix.router == 'nxroute-poc' | |
run: | |
wget -q https://github.com/Xilinx/fpga24_routing_contest/releases/latest/download/xcvu3p.device | |
- env: | |
REPORT_ROUTE_STATUS_URL: ${{ secrets.REPORT_ROUTE_STATUS_URL }} | |
REPORT_ROUTE_STATUS_AUTH: ${{ secrets.REPORT_ROUTE_STATUS_AUTH }} | |
# With no access to Vivado, assume that CheckPhysNetlist always returns a PASS for all routers except for nxroute-poc | |
CHECK_PHYS_NETLIST_MOCK_PASS: ${{ matrix.router != 'nxroute-poc' && secrets.REPORT_ROUTE_STATUS_URL == '' }} | |
# For certain benchmarks, wirelength_analyzer requires more memory than that available in GitHub Actions | |
WIRELENGTH_ANALYZER_MOCK_RESULT: ${{ matrix.benchmark == 'koios_dla_like_large' }} | |
run: | | |
make ROUTER="${{ matrix.router }}" BENCHMARKS="${{ matrix.benchmark }}" VERBOSE=1 | |
- name: Score summary | |
run: | |
make ROUTER="${{ matrix.router }}" BENCHMARKS="${{ matrix.benchmark }}" VERBOSE=1 | |
- name: Verify pass (non nxroute-poc) | |
if: matrix.router != 'nxroute-poc' | |
run: | | |
grep -H PASS *.check | |
# Allow following grep to fail if no URL | |
grep -H -e "# of nets with routing errors[. :]\+0" *.check.log || ${{ secrets.REPORT_ROUTE_STATUS_URL == '' }} | |
# Check no multiple sources, no stubs | |
! grep "UserWarning: Found [0-9]\+ sources" *.wirelength | |
! grep "UserWarning: Found [0-9]\+ stubs" *.wirelength | |
# Check wirelength was computed | |
grep "^Wirelength: [1-9][0-9]*" *.wirelength | |
- name: Verify fail (nxroute-poc) | |
if: matrix.router == 'nxroute-poc' | |
run: | | |
grep -H FAIL *.check | |
# Allow following grep to fail if no URL | |
grep -H -e "# of nets with routing errors[. :]\+[1-9]" -e "# of unrouted nets[. :]\+[1-9]" *.check.log || ${{ secrets.REPORT_ROUTE_STATUS_URL == '' }} | |
# Check no multiple sources, but expect stubs | |
! grep "UserWarning: Found [0-9]\+ sources" *.wirelength | |
grep "UserWarning: Found [0-9]\+ stubs" *.wirelength || ${{ matrix.benchmark == 'koios_dla_like_large' }} | |
# Allow wirelength computation to fail since nxroute may not have routed anything or wirelength_analyzer was not run | |
grep "^Wirelength: [1-9][0-9]*" *.wirelength || true | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: Logs | |
path: | | |
*.log | |
*.check | |
*.wirelength | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: ${{ matrix.router }}-${{ matrix.benchmark }} | |
path: | | |
*.dcp | |
*.phys | |
${{ matrix.benchmark }}.netlist.edn/* | |
*_load.tcl | |
!*_unrouted.phys |