]> git.puffer.fish Git - matthieu/nova.git/commitdiff
add caches to github actions
authorMatthieuCoder <matthieu@matthieu-dev.xyz>
Wed, 4 Jan 2023 13:14:48 +0000 (17:14 +0400)
committerMatthieuCoder <matthieu@matthieu-dev.xyz>
Wed, 4 Jan 2023 13:14:48 +0000 (17:14 +0400)
.github/workflows/build.yml

index fd872e351e2e4483bec0aa716e5d10d76bc72ba6..aaa42bc58bf445f999bbf6db9760ebfb62bc92c4 100644 (file)
@@ -24,6 +24,15 @@ jobs:
           components: clippy
       - name: Build | Lint
         run: cargo clippy
+      - uses: actions/cache@v3
+        with:
+          path: |
+            ~/.cargo/bin/
+            ~/.cargo/registry/index/
+            ~/.cargo/registry/cache/
+            ~/.cargo/git/db/
+            target/
+          key: lint
   
   build_macos:
     name: 'Build for MacOS'
@@ -65,6 +74,15 @@ jobs:
         with:
           name: macos
           path: artifacts/*
+      - uses: actions/cache@v3
+        with:
+          path: |
+            ~/.cargo/bin/
+            ~/.cargo/registry/index/
+            ~/.cargo/registry/cache/
+            ~/.cargo/git/db/
+            target/
+          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
 
   build_windows:
     name: 'Build for Windows'
@@ -102,6 +120,15 @@ jobs:
         with:
           name: windows
           path: artifacts/*
+      - uses: actions/cache@v3
+        with:
+          path: |
+            ~/.cargo/bin/
+            ~/.cargo/registry/index/
+            ~/.cargo/registry/cache/
+            ~/.cargo/git/db/
+            target/
+          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
 
   build_linux:
     name: 'Build for Linux'
@@ -140,3 +167,12 @@ jobs:
         with:
           name: linux_glibc
           path: artifacts/*
+      - uses: actions/cache@v3
+        with:
+          path: |
+            ~/.cargo/bin/
+            ~/.cargo/registry/index/
+            ~/.cargo/registry/cache/
+            ~/.cargo/git/db/
+            target/
+          key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}