alamb commented on code in PR #7678:
URL: https://github.com/apache/arrow-datafusion/pull/7678#discussion_r1340516995


##########
.github/workflows/rust.yml:
##########
@@ -47,18 +47,24 @@ jobs:
       image: amd64/rust
     steps:
       - uses: actions/checkout@v4
-      - name: Cache Cargo
-        uses: actions/cache@v3
-        with:
-          # these represent dependencies downloaded by cargo
-          # and thus do not depend on the OS, arch nor rust version.
-          path: /github/home/.cargo
-          key: cargo-cache-
       - name: Setup Rust toolchain
         uses: ./.github/actions/setup-builder
         with:
           rust-version: stable
 
+      - name: Cache Cargo
+        uses: actions/cache@v3
+        with:
+          path: |
+            ~/.cargo/bin/
+            ~/.cargo/registry/index/
+            ~/.cargo/registry/cache/
+            ~/.cargo/git/db/
+            ./target/
+            ./datafusion-cli/target/
+          # this key equals the ones on `linux-build-lib` for re-use
+          key: cargo-cache-benchmark-${{ hashFiles('datafusion/**/Cargo.toml', 
'benchmarks/Cargo.toml', 'datafusion-cli/Cargo.toml') }}

Review Comment:
   This cache key doesn't change unless we update the dependencies, right? What 
about the local code changes?



##########
.github/workflows/rust.yml:
##########
@@ -241,9 +229,14 @@ jobs:
       - name: Cache Cargo
         uses: actions/cache@v3
         with:
-          path: /github/home/.cargo
+          path: |
+            ~/.cargo/bin/
+            ~/.cargo/registry/index/
+            ~/.cargo/registry/cache/
+            ~/.cargo/git/db/
+            ./target/
           # this key equals the ones on `linux-build-lib` for re-use
-          key: cargo-cache-
+          key: cargo-cache-benchmark-${{ hashFiles('datafusion/**/Cargo.toml', 
'benchmarks/Cargo.toml') }}

Review Comment:
   The key above also includes `'datafusion-cli/Cargo.toml'` -- is in 
intentional that these keys do not match?
   
   ```
             key: cargo-cache-benchmark-${{ 
hashFiles('datafusion/**/Cargo.toml', 'benchmarks/Cargo.toml', 
'datafusion-cli/Cargo.toml') }}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to