Browse Source

cache dependencies

Valentin Madrid 2 years ago
parent
commit
d53ac6f95e
1 changed files with 12 additions and 0 deletions
  1. 12 0
      .github/workflows/anchor.yml

+ 12 - 0
.github/workflows/anchor.yml

@@ -45,6 +45,18 @@ jobs:
       - name: Checkout code
         uses: actions/checkout@v3
 
+      - name: Cache cargo registry
+        uses: actions/cache@v2
+        with:
+          path: ~/.cargo/registry
+          key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
+
+      - name: Cache target
+        uses: actions/cache@v2
+        with:
+          path: target
+          key: ${{ runner.os }}-cargo-target-${{ hashFiles('**/Cargo.lock') }}
+
       - name: Install dependencies
         run: |
           sh -c "$(curl -sSfL https://release.solana.com/stable/install)"