This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-datafusion.git
The following commit(s) were added to refs/heads/main by this push:
new de15917704 Improve cache usage in CI (#7678)
de15917704 is described below
commit de1591770445773ca5947f44c8b5fe58fec985d7
Author: Kousuke Saruta <[email protected]>
AuthorDate: Fri Sep 29 23:30:27 2023 +0900
Improve cache usage in CI (#7678)
* Improve cache usage in CI
* Trigger GA to check the effect of improvement
---
.github/workflows/rust.yml | 77 ++++++++++++----------------------------------
1 file changed, 20 insertions(+), 57 deletions(-)
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index fa5c56b43e..80de6e663f 100644
--- a/.github/workflows/rust.yml
+++ b/.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') }}
+
- name: Check workspace without default features
run: cargo check --no-default-features -p datafusion
@@ -84,12 +90,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
@@ -109,12 +109,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
@@ -211,12 +205,6 @@ jobs:
image: amd64/rust
steps:
- uses: actions/checkout@v4
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
@@ -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') }}
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
@@ -377,12 +370,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- uses: actions/setup-python@v4
with:
python-version: "3.8"
@@ -480,12 +467,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
@@ -506,12 +487,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
@@ -531,12 +506,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with:
@@ -563,12 +532,6 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- - name: Cache Cargo
- uses: actions/cache@v3
- with:
- path: /github/home/.cargo
- # this key equals the ones on `linux-build-lib` for re-use
- key: cargo-cache-
- name: Setup Rust toolchain
uses: ./.github/actions/setup-builder
with: