From 64e4ee00784cfb3a499212cee89223224b2c27ed Mon Sep 17 00:00:00 2001 From: Jamie Strandboge Date: Wed, 11 Jun 2025 11:50:34 -0500 Subject: [PATCH] chore: cache python-build-standalone in CircleCI Closes #26013 --- .circleci/config.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4430cc0ecf..79d67cfd16 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -287,19 +287,35 @@ jobs: steps: - checkout - run: - name: pull Python Build Standalone + name: Record Python Build Standalone version for caching command: | - echo "PBS_DATE=$PBS_DATE" - .circleci/scripts/fetch-python-standalone.bash \ - "python-artifacts" \ - "$PBS_DATE" \ - "$PBS_VERSION" + echo "$PBS_VERSION-$PBS_DATE" | tee /tmp/pbs_version + - restore_cache: + name: Restore Python Build Standalone from cache + key: python-artifacts-{{ checksum "/tmp/pbs_version" }} + - run: + name: Pull Python Build Standalone + command: | + if [ -d "python-artifacts" ]; then + echo "Using cached python-artifacts for $(cat /tmp/pbs_version)" + else + echo "PBS_DATE=$PBS_DATE" + .circleci/scripts/fetch-python-standalone.bash \ + "python-artifacts" \ + "$PBS_DATE" \ + "$PBS_VERSION" + fi - store_artifacts: path: python-artifacts - persist_to_workspace: root: . paths: - python-artifacts + - save_cache: + name: Save python-build-standalone to cache + key: python-artifacts-{{ checksum "/tmp/pbs_version" }} + paths: + - python-artifacts # Build a dev binary with the default cargo profile build-dev: