From eb2dc6ac0272d6a95fa22c1f014100a625c31fed Mon Sep 17 00:00:00 2001 From: MatthieuCoder Date: Wed, 4 Jan 2023 17:14:48 +0400 Subject: [PATCH] add caches to github actions --- .github/workflows/build.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fd872e3..aaa42bc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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') }} -- 2.39.5