[ci] Reduce cache size #13
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: | |
| branches: [ ci ] | |
| pull_request: | |
| jobs: | |
| chipyard-setup: | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| # for conda activation | |
| shell: bash -el {0} | |
| env: | |
| CHIPYARD_DIR: ${{ github.workspace }}/chipyard | |
| # github runner knocks out with -jN>=4 | |
| MAKEFLAGS: "-j3" | |
| steps: | |
| - name: System info | |
| run: | | |
| cat /proc/cpuinfo | |
| vmstat -SM | |
| df -h | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Checkout Chipyard | |
| run: | | |
| rm -rf "${CHIPYARD_DIR}" | |
| git clone "https://github.com/ucb-bar/chipyard.git" "${CHIPYARD_DIR}" | |
| cd "${CHIPYARD_DIR}" | |
| git checkout main | |
| 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: Cache Scala deps | |
| # uses: actions/cache@v5 | |
| # with: | |
| # path: | | |
| # ~/.ivy2/cache | |
| # ~/.sbt | |
| # ~/.cache/coursier | |
| # key: ${{ runner.os }}-scala-${{ hashFiles('**/*.sbt', '**/project/**') }} | |
| # restore-keys: | | |
| # ${{ runner.os }}-scala- | |
| - name: Cache conda-env | |
| id: cache-conda-env | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ${{ env.CHIPYARD_DIR }}/.conda-env/riscv-tools | |
| key: conda-${{ runner.os }}-${{ env.CHIPYARD_HASH }} | |
| - name: Setup Chipyard | |
| run: | | |
| .github/scripts/setup-chipyard.sh "${{ steps.cache-conda-env.outputs.cache-hit }}" | |
| - name: Print conda envs | |
| run: | | |
| conda env list | |
| df -h | |
| du -sh "${{ env.CHIPYARD_DIR }}/.conda-env" | |
| du -sh "${{ env.CHIPYARD_DIR }}/.conda-env/riscv-tools" | |
| # - name: radiance | |
| # run: | | |
| # source "$CHIPYARD_DIR/env.sh" | |
| # ... |