Apache DataFusion SQL Query Engine
Improve cache usage in CI (#7678)
Kousuke Sarutade1591770445
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex fa5c56b43e..80de6e663f 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -47,18 +47,24 @@ jobs:image: amd64/ruststeps:- 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 toolchainuses: ./.github/actions/setup-builderwith: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 featuresrun: cargo check --no-default-features -p datafusion@@ -84,12 +90,6 @@ jobs:- uses: actions/checkout@v4with: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 toolchainuses: ./.github/actions/setup-builderwith:@@ -109,12 +109,6 @@ jobs:- uses: actions/checkout@v4with: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 toolchainuses: ./.github/actions/setup-builderwith:@@ -211,12 +205,6 @@ jobs:image: amd64/ruststeps:- 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 toolchainuses: ./.github/actions/setup-builderwith:@@ -241,9 +229,14 @@ jobs:- name: Cache Cargouses: actions/cache@v3with:- 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 toolchainuses: ./.github/actions/setup-builderwith:@@ -377,12 +370,6 @@ jobs:- uses: actions/checkout@v4with: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@v4with:python-version: "3.8"@@ -480,12 +467,6 @@ jobs:- uses: actions/checkout@v4with: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 toolchainuses: ./.github/actions/setup-builderwith:@@ -506,12 +487,6 @@ jobs:- uses: actions/checkout@v4with: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 toolchainuses: ./.github/actions/setup-builderwith:@@ -531,12 +506,6 @@ jobs:- uses: actions/checkout@v4with: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 toolchainuses: ./.github/actions/setup-builderwith:@@ -563,12 +532,6 @@ jobs:- uses: actions/checkout@v4with: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 toolchainuses: ./.github/actions/setup-builderwith: