diff --git a/.github/actions/verify-setup/action.yml b/.github/actions/verify-setup/action.yml index 1a9d2901..9ef8c9c6 100644 --- a/.github/actions/verify-setup/action.yml +++ b/.github/actions/verify-setup/action.yml @@ -11,19 +11,55 @@ inputs: verilator: description: Install Verilator from apt; ubuntu-24.04 ships 5.020 default: 'false' + bender-version: + description: Bender release to install + default: '0.32.1' runs: using: composite steps: - uses: ./.github/actions/bender-db-cache + - uses: astral-sh/setup-uv@v7 with: enable-cache: true + + - uses: actions/cache@v4 + with: + path: ~/.cache/bender-bin + key: bender-${{ inputs.bender-version }}-${{ runner.os }} + - shell: bash + run: | + if [ -x "$HOME/.cache/bender-bin/bender" ]; then + echo "$HOME/.cache/bender-bin" >> "$GITHUB_PATH" + fi - uses: pulp-platform/pulp-actions/bender-install@v2.5.0 with: - version: 0.32.0 + version: ${{ inputs.bender-version }} + - shell: bash + run: | + mkdir -p "$HOME/.cache/bender-bin" + if [ ! -x "$HOME/.cache/bender-bin/bender" ]; then + cp "$(command -v bender)" "$HOME/.cache/bender-bin/bender" + fi + bender --version + + # ccache: verilator picks it up as OBJCACHE, so the model rebuilds hit it - if: inputs.verilator == 'true' shell: bash - run: sudo apt-get update && sudo apt-get install -y verilator + run: | + sudo apt-get update + sudo apt-get install -y verilator ccache + echo "CCACHE_DIR=$HOME/.cache/ccache" >> "$GITHUB_ENV" + echo "CCACHE_MAXSIZE=2G" >> "$GITHUB_ENV" + - if: inputs.verilator == 'true' + uses: actions/cache@v4 + with: + path: ~/.cache/ccache + key: ccache-${{ github.job }}-${{ github.sha }} + restore-keys: | + ccache-${{ github.job }}- + ccache- + - if: inputs.verilator == 'true' shell: bash run: | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fdfe968c..8e14b2e1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: name: Install Bender uses: pulp-platform/pulp-actions/bender-install@v2.5.0 with: - version: 0.32.0 + version: 0.32.1 - name: Check clean run: uv run --locked make idma_clean_all diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 83629639..08082cef 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -67,7 +67,7 @@ jobs: name: Install Bender uses: pulp-platform/pulp-actions/bender-install@v2.5.0 with: - version: 0.32.0 + version: 0.32.1 - name: Build hardware run: | diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 0e5ead2b..4ae192f4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -52,7 +52,7 @@ jobs: name: Install Bender uses: pulp-platform/pulp-actions/bender-install@v2.5.0 with: - version: 0.32.0 + version: 0.32.1 - name: Build Doc run: uv run --locked make idma_doc_all diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index 72e3fb7d..01e9db00 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -155,3 +155,7 @@ jobs: - name: Simulate ${{ matrix.suite }} run: uv run --locked make idma_verify_sim_${{ matrix.suite }} IDMA_VLT_MAKEFLAGS=-j4 + - + name: ccache statistics + if: always() + run: ccache --show-stats