Carthage: Specify cache directory option

Created on 9 May 2017  路  5Comments  路  Source: Carthage/Carthage

Especially for use with CI, having a central location for cached frameworks (ideally with some sort of expiry) would be amazing.

  • carthage version:
  • xcodebuild -version:
  • Are you using --no-build?
  • Are you using --no-use-binaries?
  • Are you using --use-submodules?
  • Are you using --cache-builds?

Cartfile

<YOUR CARTFILE>

Carthage Output

<OUTPUT>
stale

Most helpful comment

  • Cache just what you need

    • Per dependency cache keys derived from Cartfile.resolved instead of caching the entire build folder

    • Changing one library won't invalidate your cache

  • Cache redundancy

    • local folder

    • Amazon S3

  • Probe cache for presence of single key
  • Blacklist some keys
  • Selective Download/Upload

    • 1,2,3... all frameworks

  • Per platform cache

    • iOS, tvOS, MacOS, watchOS

Cached artifacts

  • Frameworks
  • dSYMs
  • Carthage .version files

and many more features being developed among which

  • Current framework upload
  • Auto generation of Romefile
  • Google Cloud Storage, Azure Storage support

All 5 comments

@ekimia I made https://github.com/blender/Rome that probably meets your needs.

@blender very cool, what are the main perks of using this vs carthage_cache?

  • Cache just what you need

    • Per dependency cache keys derived from Cartfile.resolved instead of caching the entire build folder

    • Changing one library won't invalidate your cache

  • Cache redundancy

    • local folder

    • Amazon S3

  • Probe cache for presence of single key
  • Blacklist some keys
  • Selective Download/Upload

    • 1,2,3... all frameworks

  • Per platform cache

    • iOS, tvOS, MacOS, watchOS

Cached artifacts

  • Frameworks
  • dSYMs
  • Carthage .version files

and many more features being developed among which

  • Current framework upload
  • Auto generation of Romefile
  • Google Cloud Storage, Azure Storage support

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

I have in one CI job multiple carthage steps. I would love to be able to do something like:

- export DERIVED_FILE_DIR=$(mktemp -d)
- export CARTHAGE_DERIVED_FILE_DIR=$(mktemp -d)
- export CARTHAGE_CACHE=$(tempdir -d)
- carthage bootstrap --derived-data $CARTHAGE_DERIVED_FILE_DIR --no-use-binaries --platform iOS --cache-builds
- carthage bootstrap --derived-data $CARTHAGE_DERIVED_FILE_DIR --no-use-binaries --platform iOS --cache-builds --project-directory AnotherOne
- carthage bootstrap --derived-data $CARTHAGE_DERIVED_FILE_DIR --no-use-binaries --platform iOS --cache-builds --project-directory ...

I had issues when same job was running in parallel for different branches so i added tempdir for derived data

Was this page helpful?
0 / 5 - 0 ratings

Related issues

justinmakaila picture justinmakaila  路  4Comments

willhains picture willhains  路  3Comments

CAPIStkidd picture CAPIStkidd  路  3Comments

akaffenberger picture akaffenberger  路  3Comments

faustperic picture faustperic  路  3Comments