From 94a01584db5ca9aa596295d975e1ae43cb1121d1 Mon Sep 17 00:00:00 2001 From: David Bernard Date: Thu, 29 Apr 2021 19:58:13 +0200 Subject: [PATCH] Add example for Bazel --- examples.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/examples.md b/examples.md index f3d6788..1a11d6e 100644 --- a/examples.md +++ b/examples.md @@ -32,6 +32,7 @@ - [Swift, Objective-C - Carthage](#swift-objective-c---carthage) - [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods) - [Swift - Swift Package Manager](#swift---swift-package-manager) + - [* - Bazel](#---bazel) ## C# - NuGet Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies): @@ -524,3 +525,17 @@ whenever possible: restore-keys: | ${{ runner.os }}-spm- ``` + +## * - Bazel + +Bazel cache has a good handle to check if cached content should be rebuild or not based on its inputs like a hash(command + files). So using the latest cache of the branch is enough, no need to suffix with `hashFiles('**/...')`. + +```yaml +- name: Cache Bazel + uses: actions/cache@v2 + with: + path: | + ~/.cache/bazelisk + ~/.cache/bazel + key: ${{ runner.os }}-bazel +```