From 81d8809191e8dbdc21d376b1feb0931c2e10335f Mon Sep 17 00:00:00 2001 From: "Ian Clarke (aider)" Date: Tue, 10 Dec 2024 12:27:36 -0600 Subject: [PATCH] ci: Add caching for Cargo dependencies and Dioxus CLI --- .github/workflows/dioxus-build.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/.github/workflows/dioxus-build.yml b/.github/workflows/dioxus-build.yml index 403bdf7..e7f3ca0 100644 --- a/.github/workflows/dioxus-build.yml +++ b/.github/workflows/dioxus-build.yml @@ -17,6 +17,23 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo registry + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Cache Dioxus CLI + uses: actions/cache@v3 + with: + path: ~/.cargo/bin/dx + key: ${{ runner.os }}-dioxus-cli - name: Install Dioxus CLI run: cargo install dioxus-cli