From 1d61cf4ba599105022bad65490be29897ba639e8 Mon Sep 17 00:00:00 2001 From: Ben Date: Fri, 20 Oct 2023 23:10:45 +0100 Subject: [PATCH 1/2] Add caching for cargo directory between builds. --- .github/workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5a2e248..e581b95 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,6 +12,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cache Cargo packages + uses: actions/cache@v3 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/cargo.lock') }} + - name: Setup Rust uses: actions-rs/toolchain@v1 with: @@ -58,6 +69,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cache Cargo packages + uses: actions/cache@v3 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/cargo.lock') }} + - name: Setup Rust for x86_64-pc-windows-msvc uses: actions-rs/toolchain@v1 with: @@ -99,6 +121,17 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Cache Cargo packages + uses: actions/cache@v3 + continue-on-error: false + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/cargo.lock') }} + - name: Update packages run: sudo apt-get update From 1f77cdd5da3724811253a33635261c2f6803f45b Mon Sep 17 00:00:00 2001 From: Ben Date: Sat, 21 Oct 2023 00:08:39 +0100 Subject: [PATCH 2/2] Fix file name case. --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e581b95..c48d823 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,7 +21,7 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/cargo.lock') }} + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Setup Rust uses: actions-rs/toolchain@v1 @@ -78,7 +78,7 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/cargo.lock') }} + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Setup Rust for x86_64-pc-windows-msvc uses: actions-rs/toolchain@v1 @@ -130,7 +130,7 @@ jobs: ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ - key: ${{ runner.os }}-cargo-${{ hashFiles('**/cargo.lock') }} + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Update packages run: sudo apt-get update