From a33965582359a92a45caf35300a4eaef890df2a7 Mon Sep 17 00:00:00 2001
From: Andrew Marshall <planetmarshalluk@gmail.com>
Date: Sun, 14 Nov 2021 08:56:11 +0000
Subject: [PATCH 1/2] [examples] add c++ conan example

---
 README.md   |  1 +
 examples.md | 42 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+)

diff --git a/README.md b/README.md
index 07f12e8..df28464 100644
--- a/README.md
+++ b/README.md
@@ -86,6 +86,7 @@ Every programming language and framework has its own way of caching.
 
 See [Examples](examples.md) for a list of `actions/cache` implementations for use with:
 
+- [C++ - Conan](./examples.md#c---conan)
 - [C# - Nuget](./examples.md#c---nuget)
 - [D - DUB](./examples.md#d---dub)
 - [Elixir - Mix](./examples.md#elixir---mix)
diff --git a/examples.md b/examples.md
index 7db0ff8..da581d8 100644
--- a/examples.md
+++ b/examples.md
@@ -1,5 +1,6 @@
 # Examples
 
+- [C++ - Conan](#c---conan)
 - [C# - NuGet](#c---nuget)
 - [D - DUB](#d---dub)
   - [POSIX](#posix)
@@ -37,6 +38,47 @@
 - [Swift, Objective-C - CocoaPods](#swift-objective-c---cocoapods)
 - [Swift - Swift Package Manager](#swift---swift-package-manager)
 
+## C++ - Conan
+
+Using [Conan Lockfiles](https://docs.conan.io/en/latest/versioning/lockfiles.html):
+
+```.yaml
+- name: create conan cache keys
+  run: |
+    conan lock create conanfile.py --build missing
+- name: get conan cache
+  uses: actions/cache@v2
+  with:
+    path: |
+      ~/.conan/data
+      !~/.conan/data/**/conan_sources.tgz
+    key: conan-${{ hashFiles('conan.lock') }}
+- name: install conan dependencies
+  run: |
+    conan install . --lockfile conan.lock --build missing
+```
+
+Using a custom cache location, and a profile as a partial cache key:
+
+```.yaml
+env: 
+  CONAN_USER_HOME: /tmp/
+  PROFILE: my_profile
+- name: create lockfile
+  run: |
+    conan lock create conanfile.py -pr $PROFILE --build missing
+- name: get conan cache
+  uses: actions/cache@v2
+  with:
+    path: |
+      ${{ env.CONAN_USER_HOME }}/.conan/data
+      !${{ env.CONAN_USER_HOME }}/.conan/data/**/conan_sources.tgz
+    key: conan-${{ env.PROFILE }}-${{ hashFiles('conan.lock') }}
+- name: install conan dependencies
+  run: |
+    conan install . --lockfile conan.lock --build missing
+```
+
 ## C# - NuGet
 
 Using [NuGet lock files](https://docs.microsoft.com/nuget/consume-packages/package-references-in-project-files#locking-dependencies):

From 5d6684a94a69207249646041c79f5d51b37a8cfd Mon Sep 17 00:00:00 2001
From: Andrew Marshall <planetmarshalluk@gmail.com>
Date: Sat, 1 Oct 2022 20:37:15 +0100
Subject: [PATCH 2/2] [examples] update conan example

---
 examples.md | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/examples.md b/examples.md
index e2cf77e..696a453 100644
--- a/examples.md
+++ b/examples.md
@@ -44,41 +44,49 @@
 
 Using [Conan Lockfiles](https://docs.conan.io/en/latest/versioning/lockfiles.html):
 
-```.yaml
+```yaml
 - name: create conan cache keys
   run: |
     conan lock create conanfile.py --build missing
-- name: get conan cache
-  uses: actions/cache@v2
+    
+- uses: actions/cache@v3
   with:
     path: |
       ~/.conan/data
-      !~/.conan/data/**/conan_sources.tgz
     key: conan-${{ hashFiles('conan.lock') }}
-- name: install conan dependencies
+    
   run: |
     conan install . --lockfile conan.lock --build missing
 ```
 
+For Windows, use
+
+```yaml
+- uses: actions/cache@v3
+  if: runner.os == 'Windows'
+  with:
+    path: |
+      ~/.conan/data
+      C:/.conan
+    key: conan-${{ hashFiles('conan.lock') }}
+```
+
 Using a custom cache location, and a profile as a partial cache key:
 
-```.yaml
-env: 
-  CONAN_USER_HOME: /tmp/
-  PROFILE: my_profile
+```yaml
+  env: 
+    CONAN_USER_HOME: /tmp/
+    PROFILE: my_profile
+    
 - name: create lockfile
   run: |
     conan lock create conanfile.py -pr $PROFILE --build missing
-- name: get conan cache
-  uses: actions/cache@v2
+    
+- uses: actions/cache@v3
   with:
     path: |
       ${{ env.CONAN_USER_HOME }}/.conan/data
-      !${{ env.CONAN_USER_HOME }}/.conan/data/**/conan_sources.tgz
     key: conan-${{ env.PROFILE }}-${{ hashFiles('conan.lock') }}
-- name: install conan dependencies
-  run: |
-    conan install . --lockfile conan.lock --build missing
 ```
 
 ## C# - NuGet