From 8bfce258d1f3bafd3b0bf9bc18eb4ce0b539ec85 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 6 Feb 2024 11:31:54 -0800 Subject: [PATCH] ci: Add a registry cache for git protocol --- .github/workflows/ci.yaml | 5 +++++ .github/workflows/master.yaml | 5 +++++ .github/workflows/pr.yaml | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7b1a063..44bcde8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,6 +16,11 @@ jobs: ] steps: - uses: actions/checkout@v4 + - uses: actions/cache@v4 + if: startsWith(matrix.rust, '1') + with: + path: ~/.cargo/registry/index + key: cargo-${{ matrix.rust }}-git-index - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} diff --git a/.github/workflows/master.yaml b/.github/workflows/master.yaml index c284d89..68c4900 100644 --- a/.github/workflows/master.yaml +++ b/.github/workflows/master.yaml @@ -16,6 +16,11 @@ jobs: rust: [1.31.0, stable] steps: - uses: actions/checkout@v4 + - uses: actions/cache@v4 + if: startsWith(matrix.rust, '1') + with: + path: ~/.cargo/registry/index + key: cargo-${{ matrix.rust }}-git-index - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index b06639f..787f908 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -12,6 +12,11 @@ jobs: rust: [1.31.0, stable] steps: - uses: actions/checkout@v4 + - uses: actions/cache@v4 + if: startsWith(matrix.rust, '1') + with: + path: ~/.cargo/registry/index + key: cargo-${{ matrix.rust }}-git-index - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.rust }}