Skip to content

Commit f43784d

Browse files
committed
Add JNI Windows CI job
1 parent ec9cb53 commit f43784d

1 file changed

Lines changed: 122 additions & 0 deletions

File tree

.github/workflows/cpp_extra.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,128 @@ jobs:
351351
path: ccache
352352
key: jni-macos
353353

354+
jni-windows:
355+
needs: check-enabled
356+
if: needs.check-enabled.outputs.is_enabled == 'true'
357+
name: JNI Windows
358+
runs-on: windows-2022
359+
timeout-minutes: 45
360+
361+
steps:
362+
- name: Disable Crash Dialogs
363+
run: |
364+
reg add `
365+
"HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
366+
/v DontShowUI `
367+
/t REG_DWORD `
368+
/d 1 `
369+
/f
370+
371+
- name: Checkout Arrow
372+
uses: actions/checkout@v7
373+
with:
374+
persist-credentials: false
375+
fetch-depth: 0
376+
submodules: recursive
377+
378+
- name: Install msys2 (for tzdata for ORC tests)
379+
uses: msys2/setup-msys2@v2
380+
id: setup-msys2
381+
382+
- name: Install cmake
383+
shell: bash
384+
run: |
385+
ci/scripts/install_cmake.sh 4.1.2 /usr
386+
387+
- name: Install ccache
388+
shell: bash
389+
run: |
390+
ci/scripts/install_ccache.sh 4.13.6 /usr
391+
392+
- name: Setup ccache
393+
shell: bash
394+
run: |
395+
ci/scripts/ccache_setup.sh
396+
397+
- name: ccache info
398+
id: ccache-info
399+
shell: bash
400+
run: |
401+
echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
402+
403+
- name: Restore ccache
404+
uses: apache/infrastructure-actions/stash/restore@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
405+
with:
406+
path: ${{ steps.ccache-info.outputs.cache-dir }}
407+
key: jni-windows
408+
409+
- name: CMake
410+
shell: cmd
411+
run: |
412+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
413+
cmake ^
414+
-S cpp ^
415+
-B cpp.build ^
416+
--preset=ninja-release-jni-windows ^
417+
-DARROW_BUILD_TESTS=ON ^
418+
-DCMAKE_INSTALL_PREFIX=%CD%\cpp.install
419+
420+
- name: Build
421+
shell: cmd
422+
run: |
423+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
424+
cmake --build cpp.build
425+
426+
- name: Install
427+
shell: cmd
428+
run: |
429+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
430+
cmake --install cpp.build
431+
432+
- name: Test
433+
shell: cmd
434+
env:
435+
MSYS2_LOCATION: ${{ steps.setup-msys2.outputs.msys2-location }}
436+
ARROW_TEST_DATA: ${{ github.workspace }}\testing\data
437+
PARQUET_TEST_DATA: ${{ github.workspace }}\cpp\submodules\parquet-testing\data
438+
run: |
439+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
440+
set TZDIR=%MSYS2_LOCATION%\usr\share\zoneinfo
441+
442+
set exclude_tests=arrow-acero-asof-join-node-test
443+
set exclude_tests=%exclude_tests%|arrow-acero-hash-join-node-test
444+
445+
ctest ^
446+
--exclude-regex "%exclude_tests%" ^
447+
--label-regex unittest ^
448+
--output-on-failure ^
449+
--parallel %NUMBER_OF_PROCESSORS% ^
450+
--test-dir cpp.build ^
451+
--timeout 300
452+
453+
- name: Build example
454+
shell: cmd
455+
run: |
456+
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
457+
458+
cmake ^
459+
-S cpp/examples/minimal_build ^
460+
-B cpp/examples/minimal_build.build ^
461+
-GNinja ^
462+
-DCMAKE_INSTALL_PREFIX=%CD%\cpp.install
463+
464+
cmake --build cpp/examples/minimal_build.build
465+
466+
call cpp\examples\minimal_build.build\arrow-example.exe
467+
468+
- name: Save ccache
469+
if: ${{ !cancelled() }}
470+
continue-on-error: true
471+
uses: apache/infrastructure-actions/stash/save@0ba14156c9f4c3cfbe4b0c9f36339ab0f8d81e53
472+
with:
473+
path: ${{ steps.ccache-info.outputs.cache-dir }}
474+
key: jni-windows
475+
354476
odbc-linux:
355477
needs: check-enabled
356478
if: needs.check-enabled.outputs.is_enabled == 'true'

0 commit comments

Comments
 (0)