Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
122 changes: 122 additions & 0 deletions .github/workflows/cpp_extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,128 @@ jobs:
path: ccache
key: jni-macos

jni-windows:
needs: check-enabled
if: needs.check-enabled.outputs.is_enabled == 'true'
name: JNI Windows
runs-on: windows-2022
timeout-minutes: 240

steps:
- name: Disable Crash Dialogs
run: |
reg add `
"HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
/v DontShowUI `
/t REG_DWORD `
/d 1 `
/f

- name: Checkout Arrow
uses: actions/checkout@v7
with:
persist-credentials: false
fetch-depth: 0
submodules: recursive

- name: Install msys2 (for tzdata for ORC tests)
uses: msys2/setup-msys2@v2
id: setup-msys2

- name: Install cmake
shell: bash
run: |
ci/scripts/install_cmake.sh 4.1.2 /usr

- name: Install ccache
shell: bash
run: |
ci/scripts/install_ccache.sh 4.13.6 /usr

- name: Setup ccache
shell: bash
run: |
ci/scripts/ccache_setup.sh

- name: ccache info
id: ccache-info
shell: bash
run: |
echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT

- name: Restore ccache
uses: apache/infrastructure-actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
with:
path: ${{ steps.ccache-info.outputs.cache-dir }}
key: jni-windows

- name: CMake
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake ^
-S cpp ^
-B cpp.build ^
--preset=ninja-release-jni-windows ^
-DARROW_BUILD_TESTS=ON ^
-DCMAKE_INSTALL_PREFIX=%CD%\cpp.install

- name: Build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake --build cpp.build

- name: Install
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
cmake --install cpp.build

- name: Test
shell: cmd
env:
MSYS2_LOCATION: ${{ steps.setup-msys2.outputs.msys2-location }}
ARROW_TEST_DATA: ${{ github.workspace }}\testing\data
PARQUET_TEST_DATA: ${{ github.workspace }}\cpp\submodules\parquet-testing\data
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
set TZDIR=%MSYS2_LOCATION%\usr\share\zoneinfo

set exclude_tests=arrow-acero-asof-join-node-test
set exclude_tests=%exclude_tests%|arrow-acero-hash-join-node-test

ctest ^
--exclude-regex "%exclude_tests%" ^
--label-regex unittest ^
--output-on-failure ^
--parallel %NUMBER_OF_PROCESSORS% ^
--test-dir cpp.build ^
--timeout 300

- name: Build example
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64

cmake ^
-S cpp/examples/minimal_build ^
-B cpp/examples/minimal_build.build ^
-GNinja ^
-DCMAKE_INSTALL_PREFIX=%CD%\cpp.install

cmake --build cpp/examples/minimal_build.build

call cpp\examples\minimal_build.build\arrow-example.exe

- name: Save ccache
if: ${{ !cancelled() }}
continue-on-error: true
uses: apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
with:
path: ${{ steps.ccache-info.outputs.cache-dir }}
key: jni-windows

odbc-linux:
needs: check-enabled
if: needs.check-enabled.outputs.is_enabled == 'true'
Expand Down
22 changes: 22 additions & 0 deletions cpp/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,28 @@
"PARQUET_REQUIRE_ENCRYPTION": "OFF",
"re2_SOURCE": "BUNDLED"
}
},
{
"name": "ninja-release-jni-windows",
"inherits": [
"base-release"
],
"displayName": "Build for JNI on Windows",
"cacheVariables": {
"ARROW_ACERO": "ON",
"ARROW_BUILD_SHARED": "OFF",
"ARROW_BUILD_STATIC": "ON",
"ARROW_CSV": "ON",
"ARROW_DATASET": "ON",
"ARROW_DEPENDENCY_USE_SHARED": "OFF",
"ARROW_ORC": "ON",
"ARROW_PARQUET": "ON",
"ARROW_S3": "ON",
"ARROW_SUBSTRAIT": "ON",
"PARQUET_BUILD_EXAMPLES": "OFF",
"PARQUET_BUILD_EXECUTABLES": "OFF",
"PARQUET_REQUIRE_ENCRYPTION": "OFF"
}
}
]
}
3 changes: 3 additions & 0 deletions cpp/src/arrow/compute/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ if(ARROW_TESTING AND ARROW_COMPUTE)
target_link_libraries(arrow_compute_testing
PUBLIC $<TARGET_OBJECTS:arrow_compute_core_testing>
PUBLIC ${ARROW_GTEST_GTEST})
if(ARROW_BUILD_STATIC AND WIN32)
target_compile_definitions(arrow_compute_testing PUBLIC ARROW_COMPUTE_STATIC)
endif()
endif()

set(ARROW_COMPUTE_TEST_PREFIX "arrow-compute")
Expand Down