mirror of
				https://code.forgejo.org/actions/cache.git
				synced 2025-11-04 06:19:11 +00:00 
			
		
		
		
	Merge 8645982dff into 640a1c2554
				
					
				
			This commit is contained in:
		
						commit
						0e3d6106a0
					
				
					 1 changed files with 20 additions and 1 deletions
				
			
		
							
								
								
									
										21
									
								
								examples.md
									
										
									
									
									
								
							
							
						
						
									
										21
									
								
								examples.md
									
										
									
									
									
								
							| 
						 | 
					@ -618,7 +618,26 @@ whenever possible:
 | 
				
			||||||
      ~/.cargo/registry/cache/
 | 
					      ~/.cargo/registry/cache/
 | 
				
			||||||
      ~/.cargo/git/db/
 | 
					      ~/.cargo/git/db/
 | 
				
			||||||
      target/
 | 
					      target/
 | 
				
			||||||
    key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
 | 
					    key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Since Rust compile times are so long, you might want to take advantage of incremental builds. To do this, use the configuration below.
 | 
				
			||||||
 | 
					- Include the `run_id` in the key to force `actions/cache` to upload a new snapshot after every build.
 | 
				
			||||||
 | 
					- Use `restore-keys:` to load the previous build (when there are multiple partial matches, it selects the most recent).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					- uses: actions/cache@v3
 | 
				
			||||||
 | 
					  with:
 | 
				
			||||||
 | 
					    path: |
 | 
				
			||||||
 | 
					      ~/.cargo/bin/
 | 
				
			||||||
 | 
					      ~/.cargo/registry/index/
 | 
				
			||||||
 | 
					      ~/.cargo/registry/cache/
 | 
				
			||||||
 | 
					      ~/.cargo/git/db/
 | 
				
			||||||
 | 
					      ~/.rustup/
 | 
				
			||||||
 | 
					      target/
 | 
				
			||||||
 | 
					    key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'rust-toolchain.toml') }}-${{ github.run_id }}
 | 
				
			||||||
 | 
					    restore-keys: |
 | 
				
			||||||
 | 
					      ${{ runner.os }}-cargo-${{ hashFiles(**/'Cargo.lock', 'rust-toolchain.toml') }}
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Scala - SBT
 | 
					## Scala - SBT
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue