From 121337a37310d2751e474e276f82a1bbacea564a Mon Sep 17 00:00:00 2001 From: toast Date: Mon, 8 Jan 2024 02:45:40 +1100 Subject: [PATCH] Add cache workflow, not sure if it works but fullsending it. --- .gitea/workflows/cache.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/cache.yml diff --git a/.gitea/workflows/cache.yml b/.gitea/workflows/cache.yml new file mode 100644 index 0000000..cf34a6b --- /dev/null +++ b/.gitea/workflows/cache.yml @@ -0,0 +1,31 @@ +name: Cache Rust dependencies +on: + push: + branches: + - master +jobs: + build: + runs-on: ubuntu-22.04-node + steps: + - uses: actions/checkout@v2 + + - name: Cache cargo registry + uses: actions/cache@v2 + with: + path: ~/.cargo/registry + key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo index + uses: actions/cache@v2 + with: + path: ~/.cargo/git + key: ${{ runner.os }}-cargo-git-${{ hashFiles('**/Cargo.lock') }} + + - name: Cache cargo build + uses: actions/cache@v2 + with: + path: target + key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }} + + - name: Build + run: cargo build -r --verbose