Skip to content

Apache DataFusion SQL Query Engine

ARROW-12204: [Rust][CI] Reduce size of Rust build artifacts in integration test

Andrew Lamb4a534146943a
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index af478de995..e6a756a99c 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -415,3 +415,46 @@ jobs:
export RUSTFLAGS="-C debuginfo=0"
cd rust/arrow
cargo build --target wasm32-unknown-unknown
+
+ # test the projects can build without default features
+ default-build:
+ name: AMD64 Debian 10 Rust ${{ matrix.rust }} test no defaults
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ arch: [amd64]
+ rust: [nightly-2020-11-24]
+ container:
+ image: ${{ matrix.arch }}/rust
+ env:
+ # Disable full debug symbol generation to speed up CI build
+ # "1" means line tables only, which is useful for panic tracebacks.
+ RUSTFLAGS: "-C debuginfo=1"
+ ARROW_TEST_DATA: /__w/arrow/arrow/testing/data
+ PARQUET_TEST_DATA: /__w/arrow/arrow/cpp/submodules/parquet-testing/data
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: Cache Cargo
+ uses: actions/cache@v2
+ with:
+ 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@v2
+ with:
+ path: /github/home/target
+ key: ${{ runner.os }}-${{ matrix.arch }}-target-wasm32-cache-${{ matrix.rust }}
+ - name: Setup Rust toolchain
+ run: |
+ rustup toolchain install ${{ matrix.rust }}
+ rustup override set ${{ matrix.rust }}
+ rustup component add rustfmt
+ - name: Build arrow crate
+ run: |
+ export CARGO_HOME="/github/home/.cargo"
+ export CARGO_TARGET_DIR="/github/home/target"
+ cd rust/arrow
+ cargo check --all-targets --no-default-features
diff --git a/ci/scripts/rust_build.sh b/ci/scripts/rust_build.sh
index 94cf7560ac..726ecd80f1 100755
--- a/ci/scripts/rust_build.sh
+++ b/ci/scripts/rust_build.sh
@@ -21,6 +21,10 @@ set -ex
source_dir=${1}/rust
+# This file is used to build the rust binaries needed for the
+# archery integration tests. Testing of the rust implementation
+# in normal CI is handled by github workflows
+
# Disable full debug symbol generation to speed up CI build / reduce memory required
export RUSTFLAGS="-C debuginfo=1"
@@ -32,12 +36,10 @@ rustup show
pushd ${source_dir}
-# build entire project
-cargo build --all-targets
+# build only the integration testing binaries
+cargo build -p arrow-integration-testing
-# make sure we can build Arrow sub-crate without default features
-pushd arrow
-cargo check --all-targets --no-default-features
-popd
+# Remove incremental build artifacts to save space
+rm -rf target/debug/deps/ target/debug/build/
popd
diff --git a/docker-compose.yml b/docker-compose.yml
index cdcae905dd..7ea6d0b700 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1179,6 +1179,9 @@ services:
/arrow/ci/scripts/cpp_build.sh /arrow /build &&
/arrow/ci/scripts/go_build.sh /arrow &&
/arrow/ci/scripts/java_build.sh /arrow /build &&
+ df -h &&
+ du -hx --threshold=100M / &&
+ du -hx --threshold=500M /arrow/ &&
/arrow/ci/scripts/js_build.sh /arrow /build &&
/arrow/ci/scripts/integration_arrow.sh /arrow /build"]
diff --git a/rust/datafusion/src/execution/dataframe_impl.rs b/rust/datafusion/src/execution/dataframe_impl.rs
index 62c18ebc98..dfc7a66570 100644
--- a/rust/datafusion/src/execution/dataframe_impl.rs
+++ b/rust/datafusion/src/execution/dataframe_impl.rs
@@ -15,7 +15,7 @@
// specific language governing permissions and limitations
// under the License.
-//! Implementation of DataFrame API
+//! Implementation of DataFrame API.
use std::sync::{Arc, Mutex};