diff --git a/.gitea/workflows/rust-cache-test.yml b/.gitea/workflows/rust-cache-test.yml index 41f6806..c923a74 100644 --- a/.gitea/workflows/rust-cache-test.yml +++ b/.gitea/workflows/rust-cache-test.yml @@ -17,28 +17,11 @@ jobs: - name: Checkout code uses: https://gitea.com/actions/checkout@v4 - - name: Get Cargo lock hash - id: hash - run: | - echo "hash=$(cat Cargo.lock Cargo.toml | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT - - - name: Cache cargo + rustup - id: cache - uses: https://gitea.com/actions/cache@v3 + - name: Setup Rust + Cache + id: rust + uses: https://git.ericxliu.me/eric/actions-rust/.gitea/actions/rust-cache@main with: - path: | - ~/.cargo/registry - ~/.cargo/git - ~/.rustup/toolchains - ~/.rustup/settings.toml - target - key: rust-Linux-${{ steps.hash.outputs.hash }} - restore-keys: rust-Linux- - - - name: Setup Rust - run: | - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable - echo "$HOME/.cargo/bin" >> $GITHUB_PATH + toolchain: stable - name: Build run: cargo build --verbose