From 0eeeb97965c01670f9989ab54a040cabd49c0c18 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 7 Jun 2026 04:31:16 +0000 Subject: [PATCH 1/2] Cache the bindgen-cli binary in CI cargo install bindgen-cli ran before the rust-cache action. rust-cache prunes binaries that already exist in ~/.cargo/bin before its main step runs (it assumes they are pre-installed tooling), so bindgen was deleted from every cache save and recompiled from scratch (~55s) on every BoringSSL and AWS-LC job. Moving the install after the cache restore lets rust-cache keep the binary (cache-bin defaults to true), and on warm caches cargo install sees the binary is already installed and skips the build. The cache key is bumped so the improvement takes effect immediately rather than waiting for the next Cargo.lock rotation (rust-cache does not re-save on a primary key hit). https://claude.ai/code/session_014StKTjk7GBcVdiWKimEsQb --- .github/actions/cache/action.yml | 2 +- .github/workflows/ci.yml | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/actions/cache/action.yml b/.github/actions/cache/action.yml index 1c74aaedadb3..8e729e66e4a9 100644 --- a/.github/actions/cache/action.yml +++ b/.github/actions/cache/action.yml @@ -19,4 +19,4 @@ runs: KEY: "${{ inputs.key }}" - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1 with: - key: ${{ steps.normalized-key.outputs.key }}-4 + key: ${{ steps.normalized-key.outputs.key }}-5 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c6132cdb039..a377ca8605dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -120,8 +120,6 @@ jobs: echo "CFLAGS=${CFLAGS} -Werror=implicit-function-declaration" >> $GITHUB_ENV echo "RUSTFLAGS=-Clink-arg=-Wl,-rpath=${OSSL_PATH}/lib -Clink-arg=-Wl,-rpath=${OSSL_PATH}/lib64" >> $GITHUB_ENV if: matrix.PYTHON.OPENSSL - - run: rustup run stable cargo install bindgen-cli - if: matrix.PYTHON.OPENSSL.TYPE == 'boringssl' || matrix.PYTHON.OPENSSL.TYPE == 'aws-lc' - name: Cache rust and pip uses: ./.github/actions/cache timeout-minutes: 2 @@ -131,6 +129,12 @@ jobs: # different Python versions of PyPy that share the same PyPy # version number. key: "${{ matrix.PYTHON.VERSION }}-${{ steps.setup-python.outputs.python-version }}-${{ matrix.PYTHON.NOXSESSION }}-${{ env.OPENSSL_HASH }}-0" + # This must run after the cache action: rust-cache prunes binaries + # that already existed in ~/.cargo/bin before it ran, so installing + # bindgen first means it never gets cached. When the cache is warm, + # cargo sees the binary is already installed and skips the build. + - run: rustup run stable cargo install bindgen-cli + if: matrix.PYTHON.OPENSSL.TYPE == 'boringssl' || matrix.PYTHON.OPENSSL.TYPE == 'aws-lc' - run: python -m pip install -c ci-constraints-requirements.txt 'nox[uv]' 'tomli; python_version < "3.11"' - name: Create nox environment From e2539d50e146d1a7471c0e7fbc8312df22cad886 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 7 Jun 2026 04:42:11 +0000 Subject: [PATCH 2/2] Empty commit to trigger a warm-cache CI run https://claude.ai/code/session_014StKTjk7GBcVdiWKimEsQb