Comments (2)
Here's what Travis does:
When you have multiple jobs in a build matrix, some characteristics of each job are used to identify the cache each of the jobs should use.
These factors are:
- OS name (currently,
linux
,osx
, orwindows
)- OS distribution (for Linux,
xenial
,trusty
, orprecise
)- macOS image name (e.g.,
xcode7.2
)- Names and values of visible environment variables set in
.travis.yml
or Settings panel- Language runtime version (for the language specified in the
language
key) if applicable- For Bundler-aware jobs, the name of the
Gemfile
usedIf these characteristics are shared by more than one job in a build matrix, they will share the same URL on the network. This could corrupt the cache, or the cache may contain files that are not usable in all jobs using it. In this case, we advise you to add a public environment variable name to each job to create a unique cache entry:
CACHE_NAME=JOB1
https://docs.travis-ci.com/user/caching/#caches-and-build-matrices
So only in very rare situations would you need to define a custom key/name for the cache, and I've never needed to do so.
An example cache zip file from a build is master/cache-linux-xenial-e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855--python-3.7.tgz
.
Thanks! (And thanks for adding caching, it's already speeding up builds considerably! For example, one 98s step -> 27s including cache steps.)
from cache.
Thank you for the feedback,
GitHub Actions and Travis CI have pretty fundamentally different models. Travis is based around a relatively fixed model of languages and shell scripts and actions is much more generic and open.
Take matrix for example. In GitHub Actions we have no idea what those matrix keys are going to be as that is completely up to the user and the individual action can't use information from any context other than what is supplied by the user.
from cache.
Related Issues (20)
- Catmygod
- use variables for setting path: key when using actions/cache ?
- cache/restore fails to hit if same paths given in different order
- Digital Banking & Trust
- actions/cache/restore@v3 is trying to use node 20 instead of 16 HOT 1
- Cannot mknod: Operation not permitted
- ## List and delete cache APIs are now available for managing your Actions Cache
- Cache does not restore due to an SSL problem
- Wrong Cache restore operation HOT 3
- Dereference symlinks when creating tar balls
- steps:%0A%20%20-%20uses%3A%20actions/checkout@v3%0A%0A%20%20-%20uses:%20actions/cache/restore@v3%0A%20%20%20%20id:%20cache%0A%20%20%20%20with:%0A%20%20%20%20%20%20path:%20path/to/dependencies%0A%20%20%20%20%20%20key:%20$%7B%7B%20runner.os%20%7D%7D-$%7B%7B%20hashFiles('**/lockfiles')%20%7D%7D%0A%20%20%20%20%20%20fail-on-cache-miss:%20true%0A%0A%20%20-%20name:%20Build%0A%20%20%20%20run:%20/build.sh
- Cache Incompatibility Between ARC and Non-ARC Runners in GitHub Actions
- cache restore timeouts - only on windows, only with larger (non-default) runner HOT 1
- Extremely slow Post Setup steps for actions/cache@v3 HOT 2
- `enableCrossOsArchive` appears to be broken-- unless I'm misunderstanding something HOT 1
- If the target path doesn't match the source path, restore reports "Cache not found for input keys"
- restore-keys not being tried when another other exact key has different scope
- Thank you lord 🙏 💓
- Cache-Hit output is null HOT 1
- Unexpected errors without any logs
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cache.