Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci] Always save cache, even on failure #306

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions .github/workflows/bazelized_drake_ros.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ jobs:
# Caching.
# See comments in drake-blender for more details:
# https://github.com/RobotLocomotion/drake-blender/blob/c4a33f80/.github/workflows/main.yml
- uses: actions/cache@v3
- uses: actions/cache/restore@v3
with:
path: "/home/runner/.cache/bazel_ci"
path: "~/.cache/bazel_ci"
# We want this key to change to ensure we store the updated cache.
key: bazel_ci-${{ github.ref }}-${{ github.run_number }}-${{ github.run_attempt }}
restore-keys: |
bazel_ci-${{ github.ref }}-
bazel_ci-refs/heads/main-
- name: Check cache
run: du -hs $(readlink -f /home/runner/.cache/bazel_ci) || true
run: du -hs $(readlink -f ~/.cache/bazel_ci) || true

# Setup.
- name: Simplify apt upgrades
Expand Down Expand Up @@ -81,3 +81,12 @@ jobs:
- name: Clean up drake_ros_examples
run: bazel clean
working-directory: drake_ros_examples
# Save the updated cache snapshots, so we never do the same work twice.
# By default, actions/cache only saves after a successful workflow, but
# our caches are bags of files where we only ever add new files (not change
# an existing files), so it's always safe to snapshot.
- uses: actions/cache/save@v3
if: always()
with:
path: "~/.cache/bazel_ci"
key: bazel_ci-${{ github.ref }}-${{ github.run_number }}-${{ github.run_attempt }}
Loading