From f77cf4993e2ea1864d29bf9007f17bbe8cf9e771 Mon Sep 17 00:00:00 2001 From: Cai Yudong Date: Fri, 21 Jan 2022 14:22:49 +0800 Subject: [PATCH] Rename directory build to scripts (#59) --- .github/workflows/release.yaml | 2 +- .github/workflows/ut.yaml | 2 +- README.md | 2 +- build.sh | 33 +++++++++++------------------- {build => scripts}/install_deps.sh | 0 5 files changed, 15 insertions(+), 24 deletions(-) rename {build => scripts}/install_deps.sh (100%) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d3168d422..512da3ec3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -27,7 +27,7 @@ jobs: uses: actions/checkout@v2 - name: Install Dependency run: | - ./build/install_deps.sh + ./scripts/install_deps.sh - name: Build env: ARTIFACT_NAME: ${{ env.RELEASE_NAME }}-${{ matrix.os }} diff --git a/.github/workflows/ut.yaml b/.github/workflows/ut.yaml index d00964cbf..678019849 100644 --- a/.github/workflows/ut.yaml +++ b/.github/workflows/ut.yaml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v2 - name: Install Dependency run: | - ./build/install_deps.sh + ./scripts/install_deps.sh - name: Run Unittest run: | ./build.sh -t Release -u && cmake_build/unittest/test_knowhere diff --git a/README.md b/README.md index 58949da61..490a217f6 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Here's a list of verified OS types where Knowhere can successfully build and run #### Install Dependencies ```bash -$ ./build/install_deps.sh +$ ./scripts/install_deps.sh ``` #### Build From Source Code diff --git a/build.sh b/build.sh index 73b3d9e67..c2ebc4ab6 100755 --- a/build.sh +++ b/build.sh @@ -27,30 +27,22 @@ SUPPORT_GPU="OFF" #defaults to CPU version while getopts "p:t:cglruzh" arg; do case $arg in c) - BUILD_COVERAGE="ON" - ;; + BUILD_COVERAGE="ON" ;; g) - SUPPORT_GPU="ON" - ;; + SUPPORT_GPU="ON" ;; l) - RUN_CPPLINT="ON" - ;; + RUN_CPPLINT="ON" ;; p) - INSTALL_PREFIX=$OPTARG - ;; + INSTALL_PREFIX=$OPTARG ;; r) - MAKE_CLEAN="ON" - ;; + MAKE_CLEAN="ON" ;; t) - BUILD_TYPE=$OPTARG # BUILD_TYPE - ;; + BUILD_TYPE=$OPTARG ;; u) - echo "Build and run unittest cases" ; - BUILD_UNITTEST="ON"; - ;; + echo "Build and run unittest cases" + BUILD_UNITTEST="ON" ;; z) - SUPPORT_PROFILING="ON" - ;; + SUPPORT_PROFILING="ON" ;; h) # help echo " @@ -68,12 +60,10 @@ parameter: usage: ./build.sh -t \${BUILD_TYPE} [-c] [-g] [-l] [-r] [-u] [-z] " - exit 0 - ;; + exit 0 ;; ?) echo "unknown argument" - exit 1 - ;; + exit 1 ;; esac done @@ -95,6 +85,7 @@ cd ${BUILD_OUTPUT_DIR} CMAKE_CMD="cmake -DBUILD_UNIT_TEST=${BUILD_UNITTEST} \ -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ +-DBUILD_COVERAGE=${BUILD_COVERAGE} \ -DCMAKE_CUDA_COMPILER=${CUDA_COMPILER} \ -DMILVUS_ENABLE_PROFILING=${SUPPORT_PROFILING} \ -DKNOWHERE_GPU_VERSION=${SUPPORT_GPU} \ diff --git a/build/install_deps.sh b/scripts/install_deps.sh similarity index 100% rename from build/install_deps.sh rename to scripts/install_deps.sh