Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
WillAyd committed Nov 13, 2024
1 parent 7db51a6 commit cf0123d
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 15 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,21 @@ jobs:
if: matrix.config.label == 'windows'
shell: bash
run: |
echo "NANOARROW_CMAKE_OPTIONS=${NANOARROW_CMAKE_OPTIONS} -DNANOARROW_ARROW_STATIC=ON -DArrow_DIR=$(pwd -W)/arrow/lib/cmake/Arrow -Dgtest_force_shared_crt=ON" >> $GITHUB_ENV
cat << EOF | tr '\n' ' ' >> $GITHUB_ENV
NANOARROW_CMAKE_OPTIONS=${NANOARROW_CMAKE_OPTIONS}
-DNANOARROW_ARROW_STATIC=ON
-DNANOARROW_BUILD_TESTS_WITH_ARROW=ON
-DArrow_DIR=$(pwd -W)/arrow/lib/cmake/Arrow
-Dgtest_force_shared_crt=ON
- name: Set CMake options (POSIX)
if: matrix.config.label != 'windows'
shell: bash
run: |
echo "NANOARROW_CMAKE_OPTIONS=${NANOARROW_CMAKE_OPTIONS} -DArrow_DIR=$(pwd)/arrow/lib/cmake/Arrow" >> $GITHUB_ENV
cat << EOF | tr '\n' ' ' >> $GITHUB_ENV
NANOARROW_CMAKE_OPTIONS=${NANOARROW_CMAKE_OPTIONS}
-DNANOARROW_BUILD_TESTS_WITH_ARROW=ON
-DArrow_DIR=$(pwd)/arrow/lib/cmake/Arrow
- name: Run dev/release/verify-release-candidate.sh
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -423,8 +423,8 @@ if(NANOARROW_BUILD_TESTS)
)
include(CTest)

find_package(Arrow)
if(Arrow_FOUND)
if(NANOARROW_BUILD_TESTS_WITH_ARROW)
find_package(Arrow REQUIRED)
message(STATUS "Arrow version: ${ARROW_VERSION}")
message(STATUS "Arrow SO version: ${ARROW_FULL_SO_VERSION}")

Expand Down
1 change: 0 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"NANOARROW_BUILD_TESTS": "ON"
"NANOARROW_BUILD_TESTS_WITH_ARROW": "ON"
}
},
{
Expand Down
6 changes: 2 additions & 4 deletions dev/release/verify-release-candidate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -243,14 +243,12 @@ test_cmake_project() {

test_c() {
show_header "Build and test C library"
test_cmake_project build . -DNANOARROW_BUILD_TESTS=ON -DNANOARROW_IPC=ON \
-DNANOARROW_BUILD_TESTS_WITH_ARROW=ON
test_cmake_project build . -DNANOARROW_BUILD_TESTS=ON -DNANOARROW_IPC=ON
}

test_c_bundled() {
show_header "Build test bundled C library"
test_cmake_project build-bundled . -DNANOARROW_BUILD_TESTS=ON -DNANOARROW_IPC=ON \
-DNANOARROW_BUILD_TESTS_WITH_ARROW=ON -DNANOARROW_BUNDLE=ON
test_cmake_project build-bundled . -DNANOARROW_BUILD_TESTS=ON -DNANOARROW_IPC=ON -DNANOARROW_BUNDLE=ON
}

test_r() {
Expand Down
5 changes: 3 additions & 2 deletions src/nanoarrow/common/array_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,16 @@
#include <arrow/config.h>
#include <arrow/util/decimal.h>

#if defined(ARROW_VERSION_MAJOR) && ARROW_VERSION_MAJOR >= 12
#if defined(NANOARROW_BUILD_TESTS_WITH_ARROW && defined(ARROW_VERSION_MAJOR)&&
ARROW_VERSION_MAJOR >= 12
#include <arrow/array/builder_run_end.h>
#endif
#endif

#include "nanoarrow/nanoarrow.hpp"

#if defined(NANOARROW_BUILD_TESTS_WITH_ARROW)
using namespace arrow;
using namespace arrow;
#endif
using namespace nanoarrow::literals;
using nanoarrow::NA;
Expand Down
10 changes: 6 additions & 4 deletions src/nanoarrow/common/schema_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@ TEST(SchemaTest, SchemaInitSimple) {
ExpectSchemaInitOk(NANOARROW_TYPE_INTERVAL_MONTHS, month_interval());
ExpectSchemaInitOk(NANOARROW_TYPE_INTERVAL_DAY_TIME, day_time_interval());
ExpectSchemaInitOk(NANOARROW_TYPE_INTERVAL_MONTH_DAY_NANO, month_day_nano_interval());
#if defined(ARROW_VERSION_MAJOR) && ARROW_VERSION_MAJOR >= 15
#if defined(NANOARROW_BUILD_TESTS_WITH_ARROW && defined(ARROW_VERSION_MAJOR) && \
ARROW_VERSION_MAJOR >= 15
ExpectSchemaInitOk(NANOARROW_TYPE_STRING_VIEW, utf8_view());
ExpectSchemaInitOk(NANOARROW_TYPE_BINARY_VIEW, binary_view());
#endif
Expand Down Expand Up @@ -590,7 +591,8 @@ TEST(SchemaTest, SchemaCopyDictType) {
}

TEST(SchemaTest, SchemaCopyRunEndEncodedType) {
#if !defined(ARROW_VERSION_MAJOR) || ARROW_VERSION_MAJOR < 12
#if !defined(NANOARROW_BUILD_TESTS_WITH_ARROW || !defined(ARROW_VERSION_MAJOR) || \
ARROW_VERSION_MAJOR < 12
GTEST_SKIP() << "Arrow C++ REE integration test requires ARROW_VERSION_MAJOR >= 12";
#else
struct ArrowSchema schema;
Expand Down Expand Up @@ -957,8 +959,8 @@ TEST(SchemaViewTest, SchemaViewInitBinaryAndString) {
}

TEST(SchemaViewTest, SchemaViewInitBinaryAndStringView) {
#if defined(ARROW_VERSION_MAJOR) && ARROW_VERSION_MAJOR >= 15
struct ArrowSchema schema;
#if defined(NANOARROW_BUILD_TESTS_WITH_ARROW && defined(ARROW_VERSION_MAJOR)&&
ARROW_VERSION_MAJOR >= 15 struct ArrowSchema schema;
struct ArrowSchemaView schema_view;
struct ArrowError error;
ARROW_EXPECT_OK(ExportType(*utf8_view(), &schema));
Expand Down

0 comments on commit cf0123d

Please sign in to comment.