mirror of
				https://github.com/actions/cache.git
				synced 2025-11-04 13:29:10 +08:00 
			
		
		
		
	Merge pull request #1132 from vorburger/bazel-example
Bazel example (Take #2️⃣)
			
			
This commit is contained in:
		
							
								
								
									
										33
									
								
								examples.md
									
									
									
									
									
								
							
							
						
						
									
										33
									
								
								examples.md
									
									
									
									
									
								
							@@ -39,6 +39,7 @@
 | 
				
			|||||||
- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
 | 
					- [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
 | 
				
			||||||
- [Swift - Swift Package Manager](#swift---swift-package-manager)
 | 
					- [Swift - Swift Package Manager](#swift---swift-package-manager)
 | 
				
			||||||
- [Swift - Mint](#swift---mint)
 | 
					- [Swift - Mint](#swift---mint)
 | 
				
			||||||
 | 
					- [* - Bazel](#---bazel)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## C# - NuGet
 | 
					## C# - NuGet
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -657,3 +658,35 @@ steps:
 | 
				
			|||||||
      restore-keys: |
 | 
					      restore-keys: |
 | 
				
			||||||
        ${{ runner.os }}-mint-
 | 
					        ${{ runner.os }}-mint-
 | 
				
			||||||
```
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## * - Bazel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[`bazelisk`](https://github.com/bazelbuild/bazelisk) does not have be to separately downloaded and installed because it's already included in GitHub's `ubuntu-latest` and `macos-latest` base images.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Linux
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					- name: Cache Bazel
 | 
				
			||||||
 | 
					  uses: actions/cache@v3
 | 
				
			||||||
 | 
					  with:
 | 
				
			||||||
 | 
					    path: |
 | 
				
			||||||
 | 
					      ~/.cache/bazel
 | 
				
			||||||
 | 
					    key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }}
 | 
				
			||||||
 | 
					    restore-keys: |
 | 
				
			||||||
 | 
					      ${{ runner.os }}-bazel-
 | 
				
			||||||
 | 
					- run: bazelisk test //...
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### macOS
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```yaml
 | 
				
			||||||
 | 
					- name: Cache Bazel
 | 
				
			||||||
 | 
					  uses: actions/cache@v3
 | 
				
			||||||
 | 
					  with:
 | 
				
			||||||
 | 
					    path: |
 | 
				
			||||||
 | 
					      /private/var/tmp/_bazel_runner/
 | 
				
			||||||
 | 
					    key: ${{ runner.os }}-bazel-${{ hashFiles('.bazelversion', '.bazelrc', 'WORKSPACE', 'WORKSPACE.bazel', 'MODULE.bazel') }}
 | 
				
			||||||
 | 
					    restore-keys: |
 | 
				
			||||||
 | 
					      ${{ runner.os }}-bazel-
 | 
				
			||||||
 | 
					- run: bazelisk test //...
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user