Last active
December 14, 2021 13:36
-
-
Save m1entus/dda3186fb4977ba83ebc9897680b72e3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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