From 09c1b7741423464518882e18e471f76e537ccaa1 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Wed, 4 Sep 2024 11:19:14 +0200 Subject: [PATCH] Cache the Rust build artifacts (#111) --- .github/workflows/build-and-release.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml index c432ce5..c875ef2 100644 --- a/.github/workflows/build-and-release.yml +++ b/.github/workflows/build-and-release.yml @@ -574,7 +574,17 @@ jobs: export CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse source "$HOME/.cargo/env" cd runtime + + # Try to restore the Rust cache from previous build: + mkdir -p /rust-cache/target + rm -fr target + cp -Rp /rust-cache/target target + cargo tauri build --target aarch64-unknown-linux-gnu --bundles deb + + # Save the built libraries for the next job: + rm -fr /rust-cache/target + mv target /rust-cache - name: Debug if: ${{ env.SKIP != 'true' }}