@@ -330,12 +330,119 @@ jobs:
330330 cd cpp/examples/minimal_build
331331 ../minimal_build.build/arrow-example
332332
333+ odbc :
334+ needs : check-labels
335+ name : ODBC
336+ runs-on : windows-2022
337+ if : >-
338+ needs.check-labels.outputs.force == 'true' ||
339+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra') ||
340+ contains(fromJSON(needs.check-labels.outputs.ci-extra-labels || '[]'), 'CI: Extra: C++')
341+ timeout-minutes : 240
342+ env :
343+ ARROW_BUILD_SHARED : ON
344+ ARROW_BUILD_STATIC : OFF
345+ ARROW_BUILD_TESTS : ON
346+ ARROW_BUILD_TYPE : release
347+ ARROW_DEPENDENCY_SOURCE : VCPKG
348+ ARROW_FLIGHT_SQL_ODBC : ON
349+ ARROW_SIMD_LEVEL : AVX2
350+ CMAKE_CXX_STANDARD : " 17"
351+ CMAKE_GENERATOR : Ninja
352+ CMAKE_INSTALL_PREFIX : /usr
353+ VCPKG_BINARY_SOURCES : ' clear;nuget,GitHub,readwrite'
354+ VCPKG_DEFAULT_TRIPLET : x64-windows
355+ steps :
356+ - name : Disable Crash Dialogs
357+ run : |
358+ reg add `
359+ "HKCU\SOFTWARE\Microsoft\Windows\Windows Error Reporting" `
360+ /v DontShowUI `
361+ /t REG_DWORD `
362+ /d 1 `
363+ /f
364+ - name : Checkout Arrow
365+ uses : actions/checkout@v6
366+ with :
367+ fetch-depth : 0
368+ submodules : recursive
369+ - name : Download Timezone Database
370+ shell : bash
371+ run : ci/scripts/download_tz_database.sh
372+ - name : Install cmake
373+ shell : bash
374+ run : |
375+ ci/scripts/install_cmake.sh 4.1.2 /usr
376+ - name : Install ccache
377+ shell : bash
378+ run : |
379+ ci/scripts/install_ccache.sh 4.12.1 /usr
380+ - name : Setup ccache
381+ shell : bash
382+ run : |
383+ ci/scripts/ccache_setup.sh
384+ - name : ccache info
385+ id : ccache-info
386+ shell : bash
387+ run : |
388+ echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT
389+ - name : Cache ccache
390+ uses : actions/cache@v4
391+ with :
392+ path : ${{ steps.ccache-info.outputs.cache-dir }}
393+ key : cpp-odbc-ccache-windows-x64-${{ hashFiles('cpp/**') }}
394+ restore-keys : cpp-odbc-ccache-windows-x64-
395+ - name : Checkout vcpkg
396+ uses : actions/checkout@v6
397+ with :
398+ fetch-depth : 0
399+ path : vcpkg
400+ repository : microsoft/vcpkg
401+ - name : Bootstrap vcpkg
402+ run : |
403+ vcpkg\bootstrap-vcpkg.bat
404+ $VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString()
405+ Write-Output ${VCPKG_ROOT} | `
406+ Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append
407+ Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | `
408+ Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append
409+ - name : Setup NuGet credentials for vcpkg caching
410+ shell : bash
411+ run : |
412+ $(vcpkg fetch nuget | tail -n 1) \
413+ sources add \
414+ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json" \
415+ -storepasswordincleartext \
416+ -name "GitHub" \
417+ -username "$GITHUB_REPOSITORY_OWNER" \
418+ -password "${{ secrets.GITHUB_TOKEN }}"
419+ $(vcpkg fetch nuget | tail -n 1) \
420+ setapikey "${{ secrets.GITHUB_TOKEN }}" \
421+ -source "https://nuget.pkg.github.com/$GITHUB_REPOSITORY_OWNER/index.json"
422+ - name : Build
423+ shell : cmd
424+ run : |
425+ set VCPKG_ROOT_KEEP=%VCPKG_ROOT%
426+ call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
427+ set VCPKG_ROOT=%VCPKG_ROOT_KEEP%
428+ bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build"
429+ - name : Register Flight SQL ODBC Driver
430+ shell : cmd
431+ run : |
432+ call "cpp\src\arrow\flight\sql\odbc\tests\install_odbc.cmd" ${{ github.workspace }}\build\cpp\%ARROW_BUILD_TYPE%\arrow_flight_sql_odbc.dll
433+ # GH-48270 TODO: Resolve segementation fault during Arrow library unload
434+ # GH-48269 TODO: Enable Flight & Flight SQL testing in MSVC CI
435+ # GH-48547 TODO: enable ODBC tests after GH-48270 and GH-48269 are resolved.
436+
437+ # GH-47787 TODO: Build ODBC installer
438+
333439 report-extra-cpp :
334440 if : github.event_name == 'schedule' && always()
335441 needs :
336442 - docker
337443 - jni-linux
338444 - jni-macos
339445 - msvc-arm64
446+ - odbc
340447 uses : ./.github/workflows/report_ci.yml
341448 secrets : inherit
0 commit comments