From 44039c1aa0feb6fec1d5c67efcdd748a8094b5ba Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:29:58 +1000 Subject: [PATCH 1/2] Speedup regenerate-target-info.yml Create lockfile so that rust-cache knows if a new cache needs to be saved. Also enables cache-all-crates since the regenerate-target-info itself rarely changes. --- .github/workflows/regenerate-target-info.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/regenerate-target-info.yml b/.github/workflows/regenerate-target-info.yml index a9334a57d..9d30a4a18 100644 --- a/.github/workflows/regenerate-target-info.yml +++ b/.github/workflows/regenerate-target-info.yml @@ -21,8 +21,13 @@ jobs: - name: Install rust run: | rustup toolchain install stable nightly --no-self-update --profile minimal + + - name: Create lockfile + run: cargo update - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: 'true' - name: Regenerate target info run: cargo run -p gen-target-info From 11a960780b5458c9e1fb3b882cdae70a5b126ffa Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:30:31 +1000 Subject: [PATCH 2/2] Speedup regenerate-windows-sys.yml Create lockfile so that rust-cache knows if a new cache needs to be saved. Also enables cache-all-crates since the regenerate-windows-sys itself rarely changes. --- .github/workflows/regenerate-windows-sys.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/regenerate-windows-sys.yml b/.github/workflows/regenerate-windows-sys.yml index df6695c87..8fabbe30b 100644 --- a/.github/workflows/regenerate-windows-sys.yml +++ b/.github/workflows/regenerate-windows-sys.yml @@ -18,7 +18,13 @@ jobs: run: | git checkout -b regenerate-windows-sys-${{ github.run_id }} + - name: Create lockfile + run: cargo update + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: 'true' + - name: Regenerate windows sys bindings run: cargo run -p gen-windows-sys-binding