about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2022-07-09 21:36:23 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2022-07-10 12:43:33 +0200
commit28b11119e720f1af0e9f3dd854ee2e4618ff185d (patch)
treeaa51c86990f22b19ddd408ea4a16ad1ce8bdb68f
parent7c9db86fa1c6800bfbfbffd8036a29870ce1745a (diff)
downloadrust-28b11119e720f1af0e9f3dd854ee2e4618ff185d.tar.gz
rust-28b11119e720f1af0e9f3dd854ee2e4618ff185d.zip
Add cache for rust repository
-rw-r--r--.github/workflows/ci.yml9
1 files changed, 9 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 22f67a04e0b..8b36fa0c1c7 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -95,6 +95,15 @@ jobs:
         path: target
         key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('rust-toolchain') }}
 
+    - name: Cache rust repository
+      # We only clone the rust repository for rustc tests
+      if: ${{ contains(matrix.commands, 'rustc') }}
+      uses: actions/cache@v2
+      id: cache-rust-repository
+      with:
+        path: rust
+        key: ${{ runner.os }}-packages-${{ hashFiles('rust/.git/HEAD') }}
+
     - name: Build
       run: |
         ./prepare_build.sh