diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 613a4e270e4..bf5adacd716 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -32,7 +32,9 @@ on: jobs: coverage: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest + container: + image: ghcr.io/4paradigm/hybridsql:latest env: CTEST_PARALLEL_LEVEL: 1 # parallel test level for ctest (make test) CMAKE_BUILD_TYPE: Debug @@ -47,17 +49,17 @@ jobs: with: submodules: true - - name: download lcov - uses: actions/checkout@v4 - with: - repository: linux-test-project/lcov - ref: v1.16 - path: lcov - - - name: install lcov - working-directory: lcov - run: | - sudo make install +# - name: download lcov +# uses: actions/checkout@v4 +# with: +# repository: linux-test-project/lcov +# ref: v1.16 +# path: lcov +# +# - name: install lcov +# working-directory: lcov +# run: | +# sudo make install - name: coverage configure run: | diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 9d0d9b03817..01d36f3aa3d 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -37,9 +37,10 @@ jobs: container: image: ghcr.io/4paradigm/hybridsql:latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: build openmldb run: | + git config --system --add safe.directory $(pwd) make configure SQL_JAVASDK_ENABLE=ON CMAKE_INSTALL_PREFIX=openmldb make build SQL_JAVASDK_ENABLE=ON CMAKE_INSTALL_PREFIX=openmldb make install SQL_JAVASDK_ENABLE=ON CMAKE_INSTALL_PREFIX=openmldb @@ -55,7 +56,7 @@ jobs: - name: upload ut results if: always() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: openmldb-test-python-${{ github.sha }} path: pytest.xml diff --git a/.github/workflows/sdk.yml b/.github/workflows/sdk.yml index c605f3ecc8b..6a4e3c4fe5c 100644 --- a/.github/workflows/sdk.yml +++ b/.github/workflows/sdk.yml @@ -260,7 +260,6 @@ jobs: runs-on: ubuntu-latest container: image: ghcr.io/4paradigm/hybridsql:latest - env: env: ACTIONS_RUNNER_FORCE_ACTIONS_NODE_VERSION: node16 ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index f46793c2a03..33366bb35f2 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -3,6 +3,10 @@ # WARN: do not link in production add_library(openmldb_test_base base_test.cc util.cc) +target_compile_options(openmldb_test_base PRIVATE + $<$:-Wno-error=nonnull> + $<$:-Wno-error=nonnull> +) add_dependencies(openmldb_test_base openmldb_sdk tablet nameserver) if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1") diff --git a/third-party/CMakeLists.txt b/third-party/CMakeLists.txt index 5d8b4b4b2cd..aec99bd8200 100644 --- a/third-party/CMakeLists.txt +++ b/third-party/CMakeLists.txt @@ -117,23 +117,26 @@ endif() # Fetch hybridsql asserts if(NOT BUILD_BUNDLED) - init_hybridsql_thirdparty_urls() - - message(STATUS "Download pre-compiled hybridsql assert from ${HYBRIDSQL_ASSERTS_URL}") - if(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64)|(ARM64)|(aarch64)|(AARCH64)") - message(WARNING pre-compiled hybridsql aseerts for arm64 may out-of-date, consider build from source by '-DBUILD_BUNDLED=ON') + if (DEFINED ENV{THIRDPARTY_VERSION} AND "$ENV{THIRDPARTY_VERSION}" STREQUAL "${HYBRIDSQL_ASSERTS_VERSION}") + message(STATUS "THIRDPARTY_VERSION matches HYBRIDSQL_ASSERTS_VERSION, skipping download.") + else() + init_hybridsql_thirdparty_urls() + message(STATUS "Download pre-compiled hybridsql assert from ${HYBRIDSQL_ASSERTS_URL}") + if(CMAKE_SYSTEM_PROCESSOR MATCHES "(arm64)|(ARM64)|(aarch64)|(AARCH64)") + message(WARNING pre-compiled hybridsql aseerts for arm64 may out-of-date, consider build from source by '-DBUILD_BUNDLED=ON') + endif() + ExternalProject_Add( + hybridsql-asserts + URL ${HYBRIDSQL_ASSERTS_URL} + URL_HASH SHA256=${HYBRIDSQL_ASSERTS_HASH} + PREFIX ${DEPS_BUILD_DIR} + DOWNLOAD_DIR "${DEPS_DOWNLOAD_DIR}/hybridsql-asserts" + DOWNLOAD_NO_EXTRACT True + INSTALL_DIR ${DEPS_INSTALL_DIR} + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND bash -c "tar xzf -C ${DEPS_INSTALL_DIR} --strip-components=1") endif() - ExternalProject_Add( - hybridsql-asserts - URL ${HYBRIDSQL_ASSERTS_URL} - URL_HASH SHA256=${HYBRIDSQL_ASSERTS_HASH} - PREFIX ${DEPS_BUILD_DIR} - DOWNLOAD_DIR "${DEPS_DOWNLOAD_DIR}/hybridsql-asserts" - DOWNLOAD_NO_EXTRACT True - INSTALL_DIR ${DEPS_INSTALL_DIR} - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND bash -c "tar xzf -C ${DEPS_INSTALL_DIR} --strip-components=1") endif() if (BUILD_BUNDLED_GTEST) diff --git a/third-party/cmake/FetchZetasql.cmake b/third-party/cmake/FetchZetasql.cmake index 4e27b9aac6b..c876bc23e53 100644 --- a/third-party/cmake/FetchZetasql.cmake +++ b/third-party/cmake/FetchZetasql.cmake @@ -46,20 +46,23 @@ endfunction() if (NOT BUILD_BUNDLED_ZETASQL) - init_zetasql_urls() - - message(STATUS "Download pre-compiled zetasql from ${ZETASQL_URL}") - # download pre-compiled zetasql from GitHub Release - ExternalProject_Add(zetasql - URL ${ZETASQL_URL} - URL_HASH SHA256=${ZETASQL_HASH} - PREFIX ${DEPS_BUILD_DIR} - DOWNLOAD_DIR "${DEPS_DOWNLOAD_DIR}/zetasql" - DOWNLOAD_NO_EXTRACT True - INSTALL_DIR ${DEPS_INSTALL_DIR} - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND bash -c "tar xzf -C ${DEPS_INSTALL_DIR} --strip-components=1") + if (DEFINED ENV{ZETASQL_VERSION} AND "$ENV{ZETASQL_VERSION}" STREQUAL "${ZETASQL_VERSION}") + message(STATUS "ZETASQL_VERSION from env matches ZETASQL_VERSION, skipping download.") + else() + init_zetasql_urls() + message(STATUS "Download pre-compiled zetasql from ${ZETASQL_URL}") + # download pre-compiled zetasql from GitHub Release + ExternalProject_Add(zetasql + URL ${ZETASQL_URL} + URL_HASH SHA256=${ZETASQL_HASH} + PREFIX ${DEPS_BUILD_DIR} + DOWNLOAD_DIR "${DEPS_DOWNLOAD_DIR}/zetasql" + DOWNLOAD_NO_EXTRACT True + INSTALL_DIR ${DEPS_INSTALL_DIR} + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND bash -c "tar xzf -C ${DEPS_INSTALL_DIR} --strip-components=1") + endif() else() find_program(BAZEL_EXE NAMES bazel REQUIRED DOC "Compile zetasql require bazel or bazelisk") find_program(PYTHON_EXE NAMES python REQUIRED DOC "Compile zetasql require python")