From 5467f970113750d898af395e6ff2afd07623677c Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 21 May 2026 16:14:14 -0700 Subject: [PATCH 1/2] ci: key Rust cache on resolved Python version The Swatinem/rust-cache key didn't include Python's patch version, so when the runner image bumped Python (e.g. 3.14.4 -> 3.14.5) the restored build artifacts kept absolute LIBPATH entries pointing at the prior install dir and the link step failed with LNK1181 looking for python3.lib in the old 3.14.4 path. Reorder setup-python before rust-cache so its output is available, and append the full python-version to the cache key. --- .github/workflows/build-binaries.yml | 2 ++ .github/workflows/ci.yml | 32 +++++++++++++++++----------- .github/workflows/run-bench.yml | 8 ++++--- 3 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index fb565aaf1..fa73b1071 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -34,6 +34,7 @@ jobs: with: submodules: recursive - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + id: setup-python with: python-version: "3.14" @@ -47,6 +48,7 @@ jobs: with: cache-bin: false workspaces: temporalio/bridge -> target + key: py-${{ steps.setup-python.outputs.python-version }} - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 - run: uv sync --all-extras diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8721ad806..c3474665d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,12 +42,14 @@ jobs: - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: components: "clippy" - - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 - with: - workspaces: temporalio/bridge -> target - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + id: setup-python with: python-version: ${{ matrix.pythonOverride || matrix.python }} + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: py-${{ steps.setup-python.outputs.python-version }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed @@ -107,12 +109,14 @@ jobs: with: submodules: recursive - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable - - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 - with: - workspaces: temporalio/bridge -> target - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + id: setup-python with: python-version: "3.10" + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: py-${{ steps.setup-python.outputs.python-version }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed @@ -143,12 +147,14 @@ jobs: - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: components: "clippy" - - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 - with: - workspaces: temporalio/bridge -> target - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + id: setup-python with: python-version: "3.13" + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: py-${{ steps.setup-python.outputs.python-version }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed @@ -181,12 +187,14 @@ jobs: with: submodules: recursive - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable - - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 - with: - workspaces: temporalio/bridge -> target - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + id: setup-python with: python-version: "3.14" + - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 + with: + workspaces: temporalio/bridge -> target + key: py-${{ steps.setup-python.outputs.python-version }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed diff --git a/.github/workflows/run-bench.yml b/.github/workflows/run-bench.yml index eb2868bb2..8d5e4fec8 100644 --- a/.github/workflows/run-bench.yml +++ b/.github/workflows/run-bench.yml @@ -35,13 +35,15 @@ jobs: - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable with: toolchain: stable + - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 + id: setup-python + with: + python-version: "3.13" - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: cache-bin: false workspaces: temporalio/bridge -> target - - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - with: - python-version: "3.13" + key: py-${{ steps.setup-python.outputs.python-version }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed From 8fa758125872d0cb6428b0680b4ee952d47c8320 Mon Sep 17 00:00:00 2001 From: Brian Strauch Date: Thu, 21 May 2026 16:24:45 -0700 Subject: [PATCH 2/2] ci: use env.pythonLocation as Rust cache key Replace the steps-output approach with the env var setup-python sets automatically, removing the need to assign each step an id. --- .github/workflows/build-binaries.yml | 3 +-- .github/workflows/ci.yml | 12 ++++-------- .github/workflows/run-bench.yml | 3 +-- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-binaries.yml b/.github/workflows/build-binaries.yml index fa73b1071..eb95216d0 100644 --- a/.github/workflows/build-binaries.yml +++ b/.github/workflows/build-binaries.yml @@ -34,7 +34,6 @@ jobs: with: submodules: recursive - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - id: setup-python with: python-version: "3.14" @@ -48,7 +47,7 @@ jobs: with: cache-bin: false workspaces: temporalio/bridge -> target - key: py-${{ steps.setup-python.outputs.python-version }} + key: ${{ env.pythonLocation }} - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8 - run: uv sync --all-extras diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c3474665d..2bdc06191 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,13 +43,12 @@ jobs: with: components: "clippy" - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - id: setup-python with: python-version: ${{ matrix.pythonOverride || matrix.python }} - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: workspaces: temporalio/bridge -> target - key: py-${{ steps.setup-python.outputs.python-version }} + key: ${{ env.pythonLocation }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed @@ -110,13 +109,12 @@ jobs: submodules: recursive - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - id: setup-python with: python-version: "3.10" - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: workspaces: temporalio/bridge -> target - key: py-${{ steps.setup-python.outputs.python-version }} + key: ${{ env.pythonLocation }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed @@ -148,13 +146,12 @@ jobs: with: components: "clippy" - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - id: setup-python with: python-version: "3.13" - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: workspaces: temporalio/bridge -> target - key: py-${{ steps.setup-python.outputs.python-version }} + key: ${{ env.pythonLocation }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed @@ -188,13 +185,12 @@ jobs: submodules: recursive - uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - id: setup-python with: python-version: "3.14" - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: workspaces: temporalio/bridge -> target - key: py-${{ steps.setup-python.outputs.python-version }} + key: ${{ env.pythonLocation }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed diff --git a/.github/workflows/run-bench.yml b/.github/workflows/run-bench.yml index 8d5e4fec8..6b9a17da8 100644 --- a/.github/workflows/run-bench.yml +++ b/.github/workflows/run-bench.yml @@ -36,14 +36,13 @@ jobs: with: toolchain: stable - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5 - id: setup-python with: python-version: "3.13" - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: cache-bin: false workspaces: temporalio/bridge -> target - key: py-${{ steps.setup-python.outputs.python-version }} + key: ${{ env.pythonLocation }} - uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: # TODO(cretz): Can upgrade proto when https://github.com/arduino/setup-protoc/issues/99 fixed