From 6b1ae8b32eadb3e1e47829e03fa11cc48af9cc90 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 20 Jul 2022 14:22:48 -0400 Subject: [PATCH 1/2] Test running without caching target directory --- .github/workflows/rust.yml | 43 -------------------------------------- 1 file changed, 43 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cd24c7f081de..d6a2be59f232 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -46,13 +46,6 @@ jobs: # and thus do not depend on the OS, arch nor rust version. path: /github/home/.cargo key: cargo-cache- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - # these represent compiled steps of both dependencies and arrow - # and thus are specific for a particular OS, arch and rust version. - path: /github/home/target - key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }}- - name: Setup Rust toolchain uses: ./.github/actions/setup-builder with: @@ -107,12 +100,6 @@ jobs: path: /github/home/.cargo # this key equals the ones on `linux-build-lib` for re-use key: cargo-cache- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: /github/home/target - # this key equals the ones on `linux-build-lib` for re-use - key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }} - name: Setup Rust toolchain uses: ./.github/actions/setup-builder with: @@ -240,12 +227,6 @@ jobs: path: /github/home/.cargo # this key equals the ones on `linux-build-lib` for re-use key: cargo-cache- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: /github/home/target - # this key equals the ones on `linux-build-lib` for re-use - key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }} - uses: actions/setup-python@v3 with: python-version: "3.8" @@ -305,12 +286,6 @@ jobs: path: /home/runner/.cargo # this key is not equal because the user is different than on a container (runner vs github) key: cargo-coverage-cache3- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: /home/runner/target - # this key is not equal because coverage uses different compilation flags. - key: ${{ runner.os }}-${{ matrix.arch }}-target-coverage-cache3-${{ matrix.rust }}- - name: Run coverage run: | export CARGO_HOME="/home/runner/.cargo" @@ -351,12 +326,6 @@ jobs: path: /github/home/.cargo # this key equals the ones on `linux-build-lib` for re-use key: cargo-cache- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: /github/home/target - # this key equals the ones on `linux-build-lib` for re-use - key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }} - name: Setup Rust toolchain uses: ./.github/actions/setup-builder with: @@ -429,12 +398,6 @@ jobs: path: /github/home/.cargo # this key equals the ones on `linux-build-lib` for re-use key: cargo-cache- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: /github/home/target - # this key equals the ones on `linux-build-lib` for re-use - key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }} - name: Setup Rust toolchain uses: ./.github/actions/setup-builder with: @@ -474,12 +437,6 @@ jobs: path: /github/home/.cargo # this key equals the ones on `linux-build-lib` for re-use key: cargo-cache- - - name: Cache Rust dependencies - uses: actions/cache@v3 - with: - path: /github/home/target - # this key equals the ones on `linux-build-lib` for re-use - key: ${{ runner.os }}-${{ matrix.arch }}-target-cache-${{ matrix.rust }} - name: Setup Rust toolchain uses: ./.github/actions/setup-builder with: From 91c20f36c2e1293804d506d2029d7ffa7abea963 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Wed, 20 Jul 2022 14:24:04 -0400 Subject: [PATCH 2/2] Only check during test --- .github/workflows/rust.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index d6a2be59f232..3be92471bd9a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -23,7 +23,7 @@ on: pull_request: jobs: - # build the library, a compilation step used by multiple steps below + # Check crate compiles linux-build-lib: name: Build Libraries on AMD64 Rust ${{ matrix.rust }} runs-on: ubuntu-latest @@ -50,25 +50,25 @@ jobs: uses: ./.github/actions/setup-builder with: rust-version: ${{ matrix.rust }} - - name: Build workspace in debug mode + - name: Check workspace in debug mode run: | - cargo build + cargo check env: CARGO_HOME: "/github/home/.cargo" CARGO_TARGET_DIR: "/github/home/target/debug" - - name: Build workspace in release mode + - name: Check workspace in release mode run: | cargo check --release env: CARGO_HOME: "/github/home/.cargo" CARGO_TARGET_DIR: "/github/home/target/release" - - name: Check DataFusion builds without default features + - name: Check workspace without default features run: | cargo check --no-default-features -p datafusion env: CARGO_HOME: "/github/home/.cargo" CARGO_TARGET_DIR: "/github/home/target" - - name: Check Workspace builds with all features + - name: Check workspace with all features run: | cargo check --workspace --benches --features avro,jit,scheduler,json env: