From c19106635693b2ee3c5899d30ad37a96a1f4802b Mon Sep 17 00:00:00 2001 From: Daniel Keller Date: Mon, 17 Aug 2026 12:51:50 +0200 Subject: [PATCH 1/3] ci: Cache the bender binary and the verilator object builds Two toolchain pieces were fetched or rebuilt per job. bender-install downloads a release tarball in each of the twenty jobs a run spawns, which is how a GitHub blip turned devel red on an elaboration leg that had nothing wrong with it; the binary is cached now and the action skips the download when it finds one on PATH. The simulation legs compile a full verilator model per leg, nine of them in the mxneg job alone, with no object cache, so every rerun pays for every model from cold. ccache is installed and its directory cached; verilator uses it as OBJCACHE on its own once present. The job prints the hit rate so a cache that stops working is visible rather than silent. Verilator itself still comes from apt. It is pinned by the runner image at 5.020, and moving to a newer build changes results: 5.046 fixes mxquant at the wide widths but breaks mxroundtrip at 256, so that swap belongs with #196. --- .github/actions/verify-setup/action.yml | 43 +++++++++++++++++++++++-- .github/workflows/verify.yml | 4 +++ 2 files changed, 45 insertions(+), 2 deletions(-) diff --git a/.github/actions/verify-setup/action.yml b/.github/actions/verify-setup/action.yml index 1a9d2901..4ee9f0b0 100644 --- a/.github/actions/verify-setup/action.yml +++ b/.github/actions/verify-setup/action.yml @@ -11,19 +11,58 @@ 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.0' runs: using: composite steps: - uses: ./.github/actions/bender-db-cache + - uses: astral-sh/setup-uv@v7 with: enable-cache: true + + # bender-install downloads a release tarball per job, so a GitHub blip fails + # a leg; it skips the download when bender is already on PATH + - 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- + + # Pinning is by apt version, so assert it rather than trusting the runner - if: inputs.verilator == 'true' shell: bash run: | 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 From 6e6be8a78962da573083076692617fb365e1b3cc Mon Sep 17 00:00:00 2001 From: Daniel Keller Date: Mon, 17 Aug 2026 12:56:34 +0200 Subject: [PATCH 2/3] ci: Drop the comments that restate the step below them The bender note repeated the commit message and the cache step reads for itself; the verilator one repeated the error string in the assert it sat on. --- .github/actions/verify-setup/action.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/actions/verify-setup/action.yml b/.github/actions/verify-setup/action.yml index 4ee9f0b0..79f11b83 100644 --- a/.github/actions/verify-setup/action.yml +++ b/.github/actions/verify-setup/action.yml @@ -23,8 +23,6 @@ runs: with: enable-cache: true - # bender-install downloads a release tarball per job, so a GitHub blip fails - # a leg; it skips the download when bender is already on PATH - uses: actions/cache@v4 with: path: ~/.cache/bender-bin @@ -62,7 +60,6 @@ runs: ccache-${{ github.job }}- ccache- - # Pinning is by apt version, so assert it rather than trusting the runner - if: inputs.verilator == 'true' shell: bash run: | From bb9025d5351e0492fd9bbb1373584d194bf138fa Mon Sep 17 00:00:00 2001 From: Daniel Keller Date: Mon, 17 Aug 2026 13:02:44 +0200 Subject: [PATCH 3/3] ci: Pin bender 0.32.1 across the workflows 0.32.1 is the current release and carries two script fixes plus a database locking change. Its flist-plus, verilator and vsim output is byte-identical to 0.32.0 on this tree, so the bump is behaviour-neutral here and only matters if a dependency later adds an untyped or .svh-typed source. --- .github/actions/verify-setup/action.yml | 2 +- .github/workflows/build.yml | 2 +- .github/workflows/deploy.yml | 2 +- .github/workflows/docs.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/verify-setup/action.yml b/.github/actions/verify-setup/action.yml index 79f11b83..9ef8c9c6 100644 --- a/.github/actions/verify-setup/action.yml +++ b/.github/actions/verify-setup/action.yml @@ -13,7 +13,7 @@ inputs: default: 'false' bender-version: description: Bender release to install - default: '0.32.0' + default: '0.32.1' runs: using: composite steps: 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