From aaaf2bf79aeb3510a61276430c5f1bb4b6e5bd54 Mon Sep 17 00:00:00 2001 From: yangchuan Date: Mon, 23 Oct 2023 11:12:02 +0800 Subject: [PATCH] fix fix fix --- .github/workflows/velox_be.yml | 2 +- cpp/velox/CMakeLists.txt | 10 +++++----- dev/builddeps-veloxbe.sh | 2 +- ep/build-velox/src/build_velox.sh | 14 +++++++++++--- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/velox_be.yml b/.github/workflows/velox_be.yml index 6ce202ef8b7f..f7f4be1d5a9d 100644 --- a/.github/workflows/velox_be.yml +++ b/.github/workflows/velox_be.yml @@ -57,7 +57,7 @@ jobs: docker exec ubuntu2004-test-$GITHUB_RUN_ID bash -c ' cd /opt/gluten/ep/build-velox/src && \ ./get_velox.sh --velox_home=/opt/velox && \ - ./build_velox.sh --velox_home=/opt/velox --enable_ep_cache=ON' + ./build_velox.sh --velox_home=/opt/velox --enable_ep_cache=ON --build_tests=ON' - name: Build Gluten CPP library run: | docker exec ubuntu2004-test-$GITHUB_RUN_ID bash -c ' diff --git a/cpp/velox/CMakeLists.txt b/cpp/velox/CMakeLists.txt index d49f63df65ca..ece87e6b5675 100644 --- a/cpp/velox/CMakeLists.txt +++ b/cpp/velox/CMakeLists.txt @@ -133,20 +133,20 @@ macro(ADD_VELOX_DEPENDENCIES) if(ENABLE_S3) add_velox_dependency(connector::hive::s3fs "${VELOX_COMPONENTS_PATH}/connectors/hive/storage_adapters/s3fs/libvelox_s3fs.a") endif() - add_velox_dependency(dwio::dwrf::test_utils "${VELOX_COMPONENTS_PATH}/dwio/dwrf/test/utils/libvelox_dwrf_test_utils.a") add_velox_dependency(dwio::dwrf::writer "${VELOX_COMPONENTS_PATH}/dwio/dwrf/writer/libvelox_dwio_dwrf_writer.a") add_velox_dependency(dwio::dwrf::reader "${VELOX_COMPONENTS_PATH}/dwio/dwrf/reader/libvelox_dwio_dwrf_reader.a") add_velox_dependency(dwio::dwrf::utils "${VELOX_COMPONENTS_PATH}/dwio/dwrf/utils/libvelox_dwio_dwrf_utils.a") add_velox_dependency(dwio::dwrf::common "${VELOX_COMPONENTS_PATH}/dwio/dwrf/common/libvelox_dwio_dwrf_common.a") - add_velox_dependency(dwio::common::utils "${VELOX_COMPONENTS_PATH}/dwio/common/tests/utils/libvelox_dwio_common_test_utils.a") add_velox_dependency(parquet "${VELOX_COMPONENTS_PATH}/dwio/parquet/libvelox_dwio_parquet_reader.a") add_velox_dependency(parquet::reader::native "${VELOX_COMPONENTS_PATH}/dwio/parquet/reader/libvelox_dwio_native_parquet_reader.a") - add_velox_dependency(parquet::reader::duckdb_conversion "${VELOX_COMPONENTS_PATH}/duckdb/conversion/libvelox_duckdb_conversion.a") - add_velox_dependency(duckdb::duckdb "${VELOX_COMPONENTS_PATH}/external/duckdb/libduckdb.a") if(BUILD_TESTS) + add_velox_dependency(dwio::common::utils "${VELOX_COMPONENTS_PATH}/dwio/common/tests/utils/libvelox_dwio_common_test_utils.a") + add_velox_dependency(dwio::dwrf::test_utils "${VELOX_COMPONENTS_PATH}/dwio/dwrf/test/utils/libvelox_dwrf_test_utils.a") + add_velox_dependency(parquet::reader::duckdb_conversion "${VELOX_COMPONENTS_PATH}/duckdb/conversion/libvelox_duckdb_conversion.a") + add_velox_dependency(duckdb::duckdb "${VELOX_COMPONENTS_PATH}/external/duckdb/libduckdb.a") add_velox_dependency(tpch::gen "${VELOX_COMPONENTS_PATH}/tpch/gen/libvelox_tpch_gen.a") + add_velox_dependency(dbgen "${VELOX_COMPONENTS_PATH}/tpch/gen/dbgen/libvelox_dbgen.a") endif() - add_velox_dependency(dbgen "${VELOX_COMPONENTS_PATH}/tpch/gen/dbgen/libvelox_dbgen.a") add_velox_dependency(parquet::reader::thrift "${VELOX_COMPONENTS_PATH}/dwio/parquet/thrift/libvelox_dwio_parquet_thrift.a") diff --git a/dev/builddeps-veloxbe.sh b/dev/builddeps-veloxbe.sh index 871ef5ead2d1..4845971827d1 100755 --- a/dev/builddeps-veloxbe.sh +++ b/dev/builddeps-veloxbe.sh @@ -103,7 +103,7 @@ if [ "$SKIP_BUILD_EP" != "ON" ]; then cd $GLUTEN_DIR/ep/build-velox/src ./get_velox.sh --enable_hdfs=$ENABLE_HDFS --build_protobuf=$BUILD_PROTOBUF --enable_s3=$ENABLE_S3 ./build_velox.sh --enable_s3=$ENABLE_S3 --build_type=$BUILD_TYPE --enable_hdfs=$ENABLE_HDFS \ - --enable_ep_cache=$ENABLE_EP_CACHE --build_benchmarks=$BUILD_BENCHMARKS + --enable_ep_cache=$ENABLE_EP_CACHE --build_tests=$BUILD_TESTS fi ## compile gluten cpp diff --git a/ep/build-velox/src/build_velox.sh b/ep/build-velox/src/build_velox.sh index 8f421bfbcc9f..862b0ae19061 100755 --- a/ep/build-velox/src/build_velox.sh +++ b/ep/build-velox/src/build_velox.sh @@ -23,6 +23,7 @@ BUILD_TYPE=release VELOX_HOME="" ENABLE_EP_CACHE=OFF ENABLE_BENCHMARK=OFF +ENABLE_TESTS=OFF RUN_SETUP_SCRIPT=ON OS=`uname -s` @@ -50,6 +51,10 @@ for arg in "$@"; do ENABLE_EP_CACHE=("${arg#*=}") shift # Remove argument name from processing ;; + --build_tests=*) + ENABLE_TESTS=("${arg#*=}") + shift # Remove argument name from processing + ;; --build_benchmarks=*) ENABLE_BENCHMARK=("${arg#*=}") shift # Remove argument name from processing @@ -92,9 +97,12 @@ function compile { fi fi - COMPILE_OPTION="-DVELOX_ENABLE_PARQUET=ON" - if [ $ENABLE_BENCHMARK == "OFF" ]; then - COMPILE_OPTION="$COMPILE_OPTION -DVELOX_BUILD_TESTING=OFF -DVELOX_BUILD_TEST_UTILS=ON" + COMPILE_OPTION="-DVELOX_ENABLE_PARQUET=ON -DVELOX_BUILD_TESTING=OFF -DVELOX_BUILD_TEST_UTILS=OFF -DVELOX_ENABLE_DUCKDB=OFF" + if [ $ENABLE_BENCHMARK == "ON" ]; then + COMPILE_OPTION="$COMPILE_OPTION -DVELOX_BUILD_BENCHMARKS=ON" + fi + if [ $ENABLE_TESTS == "ON" ]; then + COMPILE_OPTION="$COMPILE_OPTION -DVELOX_BUILD_TESTING=ON " fi if [ $ENABLE_HDFS == "ON" ]; then COMPILE_OPTION="$COMPILE_OPTION -DVELOX_ENABLE_HDFS=ON"