From bb7a38dc9405be600e0a14d72e5153253c8191be Mon Sep 17 00:00:00 2001 From: Kould Date: Sun, 10 Nov 2024 18:33:45 +0800 Subject: [PATCH] ci: cache rust dependencies --- .github/workflows/ci.yml | 9 +++++++++ src/macros/mod.rs | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a2520f74..4dd7920b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,9 @@ jobs: - name: Install Protoc uses: arduino/setup-protoc@v2 + - name: cache dependencies + uses: Swatinem/rust-cache@v2 + # `cargo check` command here will use installed `nightly` # as it is set as an "override" for current directory @@ -58,6 +61,9 @@ jobs: override: true components: rustfmt, clippy + - name: cache dependencies + uses: Swatinem/rust-cache@v2 + # `cargo check` command here will use installed `nightly` # as it is set as an "override" for current directory @@ -79,6 +85,9 @@ jobs: override: true components: rustfmt, clippy + - name: cache dependencies + uses: Swatinem/rust-cache@v2 + - name: Install Protoc uses: arduino/setup-protoc@v2 diff --git a/src/macros/mod.rs b/src/macros/mod.rs index 9a326b05..76545524 100644 --- a/src/macros/mod.rs +++ b/src/macros/mod.rs @@ -149,7 +149,7 @@ macro_rules! scala_function { #[macro_export] macro_rules! table_function { ($struct_name:ident::$function_name:ident($($arg_ty:expr),*) -> [$($output_name:ident: $output_ty:expr),*] => $closure:expr) => { - static $function_name: ::std::sync::LazyLock<::fnck_sql::catalog::table::TableCatalog> = LazyLock::new(|| { + static $function_name: ::std::sync::LazyLock<::fnck_sql::catalog::table::TableCatalog> = ::std::sync::LazyLock::new(|| { let mut columns = Vec::new(); $({