Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Pilot Lvl 1
Message 11 of 31

Re: Caching files between GitHub Action executions

Is the artifact unique per branch and PR, as it is with Travis caches?

https://docs.travis-ci.com/user/caching/ says:

 

  • Travis CI fetches the cache for every build, including branches and pull requests.
  • If a branch does not have its own cache, Travis CI fetches the cache of the repository’s default branch.
  • There is one cache per branch and language version/ compiler version/ JDK version/ Gemfile location/ etc.
  • Only modifications made to the cached directories from normal pushes are stored.
Copilot Lvl 3
Message 12 of 31

Re: Caching files between GitHub Action executions

Based on the terse conversation at https://github.com/actions/download-artifact/issues/3, it looks like download-artifact is not a solution to caching across invocations of workflows.

 

My use case is a project using Go, where I would like to preserve GOCACHE from one Workflow invocation to another. This particular project is taking about 11 minutes to run `go test -race ./...`. If it could use the build cache from a previous run, I would expect it to take less than a minute, as many of the test results would be cached and most of the compilation results would be cached too.

 

Not being able to transfer GOCACHE between runs is a significant hindrance to adopting GitHub Actions.

Solution
GitHub Staff
Message 13 of 31

Re: Caching files between GitHub Action executions

We appreciate the feedback, it's clear to us that this is necessary.  We're working on caching packages and artifacts between workflow executions, we'll have it by mid-November.

Copilot Lvl 3
Message 14 of 31

Re: Caching files between GitHub Action executions

That's great to hear! We weren't comfortable moving over from Circle without this.

 

Looking forward to it.

Ground Controller Lvl 1
Message 15 of 31

Re: Caching files between GitHub Action executions

Awesome! Thanks :)

Highlighted
Ground Controller Lvl 1
Message 16 of 31

Re: Caching files between GitHub Action executions

We are also waiting this to move completely. <3

Copilot Lvl 2
Message 17 of 31

Re: Caching files between GitHub Action executions

Glad you guys are working on this as well, I use GitHub Actions to build some intermediary packages and caching is the only way to do it since artifacts won't really cut it for large objects. It'd take too long to upload.

Copilot Lvl 2
Message 18 of 31

Re: Caching files between GitHub Action executions

Looking forward to it! My use case:

On a macOS instance, cache some Node global dependencies `expo-cli`, `react-native`, and ` @sentry/cli`. Possibly also some CocoaPods.

Copilot Lvl 2
Message 19 of 31

Re: Caching files between GitHub Action executions

That's cool man, just got accepted in the beta and really loving it!

When this is live I might get rid of CircleCI all together 😄!

Copilot Lvl 3
Message 20 of 31

Re: Caching files between GitHub Action executions

For those who can't wait the official cache solution, implementing one is not that hard.

You need an external storage. I used an S3 bucket for that.

Do a `aws s3 sync <remote> <local>` before the build, then a `aws s3 sync <local> <remote>` after the build.

Build must be smart enough to use the files you download from remote location.

It's working well for me.