Skip to content

Instantly share code, notes, and snippets.

@m1entus
Last active December 14, 2021 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save m1entus/dda3186fb4977ba83ebc9897680b72e3 to your computer and use it in GitHub Desktop.
Save m1entus/dda3186fb4977ba83ebc9897680b72e3 to your computer and use it in GitHub Desktop.
save_derived_data:
steps:
# This will create file with current commit SHA from develop branch
# We need to store it to file just to be able to use it as a key inside `save_cache` command.
# Because it is not possible to directly embed it inside {{ }}
- run:
name: Add current develop commit SHA environment variable
command: |
echo $(git show --format="%H" --no-patch) > /tmp/current_dev_commit_sha
# tar up the derived data in the appropriate format that we used for untarring above.
- run:
name: Tar up derived data
command: mkdir -p dd-tar-cache && tar cfPp dd-tar-cache/dd.tar --format posix ~/Library/Developer/Xcode/DerivedData/
- save_cache:
name: "Save cache [Derived Data]"
key: v1-derived-data-cache-{{ checksum "/tmp/current_dev_commit_sha" }}
paths:
- dd-tar-cache
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment