chore: cache python-build-standalone in CircleCI

Closes #26013
jdstrand/cache-pbs
Jamie Strandboge 2025-06-11 11:50:34 -05:00
parent b404e8475c
commit 64e4ee0078
No known key found for this signature in database
1 changed files with 22 additions and 6 deletions

View File

@ -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: