diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 477443f..9dc7b87 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,15 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Restore cargo cache + uses: actions/cache@v2.1.7 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ matrix.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('Cargo.lock') }} + - name: Toolchain uses: actions-rs/toolchain@v1 with: @@ -29,18 +38,6 @@ jobs: toolchain: ${{ matrix.rust }} override: true - - name: Cache cargo registry - uses: actions/cache@v1 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} - - - name: Cache cargo index - uses: actions/cache@v1 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }} - - name: Build run: cargo build --verbose @@ -61,30 +58,21 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Install latest stable + - name: Toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true components: clippy - - name: Cache cargo registry - uses: actions/cache@v1 - with: - path: ~/.cargo/registry - key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }} - - - name: Cache cargo index - uses: actions/cache@v1 - with: - path: ~/.cargo/git - key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargoo.lock') }} - - - name: Cache cargo build - uses: actions/cache@v1 - with: - path: target - key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('Cargo.lock') }} + - name: Restore cargo cache + uses: actions/cache@v2.1.7 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.lock') }} - name: Check clippy uses: actions-rs/cargo@v1 @@ -98,13 +86,22 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install latest stable + - name: Toolchain uses: actions-rs/toolchain@v1 with: toolchain: stable override: true components: rustfmt + - name: Restore cargo cache + uses: actions/cache@v2.1.7 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-stable-${{ hashFiles('Cargo.lock') }} + - name: Check format uses: actions-rs/cargo@v1 with: