Parameterize bypass; rename to noILP #137
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 | |
| # need to be persistent cross-action | |
| CHIPYARD_DIR: "/scratch/buildbot/radiance-ci-shared/chipyard" | |
| # flip to force-reset cache | |
| CACHE_NUMBER: 0 | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: as4 | |
| env: | |
| # fix broken IPv6 | |
| RUSTUP_USE_CURL: "1" | |
| CURL_IPRESOLVE: "4" | |
| CARGO_REGISTRIES_CRATES_IO_PROTOCOL: "sparse" | |
| CARGO_NET_RETRY: "10" | |
| CARGO_HTTP_TIMEOUT: "60" | |
| 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 | |
| mkdir -p "${CHIPYARD_DIR}" | |
| 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}" | |
| # for caching | |
| ln -sf "${CHIPYARD_DIR}" "${GITHUB_WORKSPACE}/${CHIPYARD_RELPATH}" | |
| - name: Install conda | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| auto-update-conda: true | |
| auto-activate-base: true | |
| activate-environment: "" | |
| - name: Setup rust | |
| run: | | |
| echo "CARGO_HOME=$HOME/.cargo" >> "$GITHUB_ENV" | |
| echo "RUSTUP_HOME=$HOME/.rustup" >> "$GITHUB_ENV" | |
| echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" | |
| - name: Check rust | |
| run: | | |
| command -v rustc | |
| command -v cargo | |
| rustup --version | |
| rustc --version | |
| cargo --version | |
| - name: Cache conda-env | |
| id: cache-conda-env | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ env.CHIPYARD_DIR }}/.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" | |
| # warm up cargo as fetching index.crates.io likes to fail intermittently | |
| - name: Cargo fetch | |
| run: | | |
| cd "${CHIPYARD_DIR}/generators/radiance/cyclotron" | |
| cargo fetch | |
| - name: Cache Scala build files | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ env.CHIPYARD_DIR }}/generators/**/target/** | |
| ${{ env.CHIPYARD_RELPATH }}/.ivy2/cache | |
| ${{ env.CHIPYARD_RELPATH }}/.sbt | |
| ~/.cache/coursier | |
| key: scala-${{ runner.os }}-${{ runner.arch }}-${{ github.sha }}-${{ env.CACHE_NUMBER }} | |
| restore-keys: | | |
| scala-${{ runner.os }}-${{ runner.arch }}- | |
| - 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 SUB_PROJECT=muon CONFIG=MuonCoreTestConfig | |
| make debug CONFIG=RadianceTapeoutSimConfig | |
| run-unit-tests: | |
| name: Run Unit-tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run ChiselTest unit-tests | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| sbt "project radiance; \ | |
| testOnly radiance.muon.ALUPipeTest; \ | |
| testOnly radiance.muon.FPPipeTest; \ | |
| testOnly radiance.muon.MulDivPipeTest; \ | |
| testOnly radiance.muon.SequencerTest; \ | |
| testOnly radiance.muon.ScoreboardTest" | |
| run-soc-isa-tests: | |
| name: Run SoC ISA tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run ISA tests on SoC config | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd generators/radiance | |
| python3 test/run_isa_tests.py -j "$(nproc)" | |
| run-core-isa-tests: | |
| name: Run Core-standalone ISA tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run ISA tests on core-as-top config | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd generators/radiance | |
| python3 test/run_isa_tests.py -j "$(nproc)" -c core | |
| run-cosim-isa-tests: | |
| name: Run Co-sim ISA tests | |
| runs-on: as4 | |
| needs: build | |
| steps: | |
| - name: Run ISA tests on backend co-sim config | |
| run: | | |
| cd "${CHIPYARD_DIR}" | |
| source env.sh | |
| source /ecad/tools/vlsi.bashrc | |
| cd generators/radiance | |
| python3 test/run_isa_tests.py -j "$(nproc)" -c backend | |
| clean: | |
| name: Clean | |
| runs-on: as4 | |
| needs: [build, run-unit-tests, run-soc-isa-tests, run-core-isa-tests, run-cosim-isa-tests] | |
| if: always() | |
| steps: | |
| - name: Cleanup workspace, chipyard and conda | |
| run: | | |
| [ -d "${{ github.workspace }}" ] && rm -rf "${{ github.workspace }}" | |
| [ -d "${CHIPYARD_DIR}" ] && rm -rf "${CHIPYARD_DIR}" |