From d01ee847818a9c6af094ea9674d5b6e5d35c3d98 Mon Sep 17 00:00:00 2001
From: Justin Carpentier <justin.carpentier@inria.fr>
Date: Sat, 4 Sep 2021 19:39:24 +0200
Subject: [PATCH] ci: use ccache

---
 .github/workflows/macos-linux-conda.yml | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/macos-linux-conda.yml b/.github/workflows/macos-linux-conda.yml
index b551e032..f0bcbf19 100644
--- a/.github/workflows/macos-linux-conda.yml
+++ b/.github/workflows/macos-linux-conda.yml
@@ -4,8 +4,10 @@ on: [push,pull_request]
 
 jobs:
   eigenpy-conda:
-    name: CI - EigenPy on ${{ matrix.os }} via Conda
+    name: CI on ${{ matrix.os }} via Conda
     runs-on: ${{ matrix.os }}
+    env:
+      CCACHE_DIR: /github/home/.ccache # Enable ccache
 
     strategy:
       fail-fast: false
@@ -14,10 +16,8 @@ jobs:
 
     steps:
     - uses: actions/checkout@v2
-
-    - name: Checkout submodules
-      run: |
-        git submodule update --init
+      with:
+        submodules: recursive
 
     - uses: conda-incubator/setup-miniconda@v2
       with:
@@ -26,6 +26,11 @@ jobs:
         environment-file: .github/workflows/conda/environment.yml
         python-version: 3.8
 
+    - uses: actions/cache@v2
+      with:
+        path: ${{ env.CCACHE_DIR }}
+        key: ccache-${{ matrix.env.ROS_DISTRO }}-${{ matrix.env.ROS_REPO }}
+
     - name: Install cmake and update conda
       shell: bash -l {0}
       run: |
-- 
GitLab