mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 07:38:37 +08:00 
			
		
		
		
	examples: Only cache non-redundant cargo state
As the packed crate sources are stored under ~/.cargo/registry/cache, it's redundant to archive the unpacked sources. The sufficient local state of the git dependencies is in ~/.cargo/git/db. Cargo automatically checks out the source trees if missing.
This commit is contained in:
		
							parent
							
								
									5e5fbe724b
								
							
						
					
					
						commit
						f478dc2492
					
				| 
						 | 
				
			
			@ -432,8 +432,9 @@ When dependencies are installed later in the workflow, we must specify the same
 | 
			
		|||
  uses: actions/cache@v2
 | 
			
		||||
  with:
 | 
			
		||||
    path: |
 | 
			
		||||
      ~/.cargo/registry
 | 
			
		||||
      ~/.cargo/git
 | 
			
		||||
      ~/.cargo/registry/index
 | 
			
		||||
      ~/.cargo/registry/cache
 | 
			
		||||
      ~/.cargo/git/db
 | 
			
		||||
    key: cargo-deps-${{ hashFiles('**/Cargo.lock') }}
 | 
			
		||||
- name: Cache cargo build
 | 
			
		||||
  uses: actions/cache@v2
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user