Merge branch 'main' of https://github.com/ucb-bar/radiance #73
This file contains hidden or 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: | |
| push: | |
| pull_request: | |
| defaults: | |
| run: | |
| # for conda | |
| shell: bash -leo pipefail {0} | |
| env: | |
| CHIPYARD_RELPATH: chipyard-work | |
| CHIPYARD_DIR: ${{ github.workspace }}/chipyard-work | |
| # flip to force-reset cache | |
| CACHE_NUMBER: 0 | |
| jobs: | |
| everything: | |
| runs-on: as4 | |
| steps: | |
| - name: Setup system | |
| run: | | |
| set -x | |
| cat /proc/cpuinfo | tail -n20 | |
| vmstat -SM | |
| df -h | |
| [ -d "${{ github.workspace }}" ] && rm -rf "${{ github.workspace }}/*" | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Checkout Chipyard | |
| run: | | |
| [ -d "${CHIPYARD_DIR}" ] && echo "${CHIPYARD_DIR} already exists, aborting" && exit 1 | |
| git clone --depth 1 --branch graphics "https://github.com/ucb-bar/chipyard.git" "${CHIPYARD_DIR}" | |
| cd "${CHIPYARD_DIR}" | |
| echo "CHIPYARD_HASH=$(git rev-parse HEAD)" >> "${GITHUB_ENV}" | |
| - name: Install conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| auto-activate-base: true | |
| activate-environment: "" | |
| - name: Install cargo | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Scala deps | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.ivy2/cache | |
| ~/.sbt | |
| ${{ env.CHIPYARD_RELPATH }}/.ivy2/cache | |
| ${{ env.CHIPYARD_RELPATH }}/.sbt | |
| ~/.cache/coursier | |
| key: scala-${{ hashFiles('**/*.sbt', '**/project/**') }}-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NUMBER }} | |
| - name: Cache conda-env | |
| id: cache-conda-env | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ env.CHIPYARD_RELPATH }}/.conda-env | |
| ${{ env.CHIPYARD_RELPATH }}/env.sh | |
| key: chipyard-${{ env.CHIPYARD_HASH }}-${{ runner.os }}-${{ runner.arch }}-${{ env.CACHE_NUMBER }} | |
| - name: Setup Chipyard | |
| run: | | |
| .github/scripts/setup-chipyard.sh "${{ steps.cache-conda-env.outputs.cache-hit }}" | |
| - name: Setup Radiance | |
| # move radiance to under chipyard/generators | |
| run: | | |
| set -eux | |
| rm -rf "${CHIPYARD_DIR}/generators/radiance" | |
| rsync -a --exclude "/${CHIPYARD_RELPATH}/" \ | |
| "${GITHUB_WORKSPACE}/" "${CHIPYARD_DIR}/generators/radiance/" | |
| ls -al "${CHIPYARD_DIR}/generators/radiance" | |
| - name: Build Radiance sim binary | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd sims/vcs | |
| make debug SUB_PROJECT=muon CONFIG=MuonBackendTestConfig | |
| make debug CONFIG=RadianceTapeoutSimConfig | |
| - name: Run Muon ISA tests | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd generators/radiance | |
| python3 test/run_isa_tests.py -j "$(nproc)" | |
| - name: Cleanup workspace | |
| if: always() | |
| run: | | |
| [ -d "${{ github.workspace }}" ] && rm -rf "${{ github.workspace }}/*" |