Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
8 changes: 5 additions & 3 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,12 @@ jobs:
./ci/scripts/python_wheel_unix_build.sh ${{ matrix.arch }} $(pwd) $(pwd)/build
- name: Build artifacts (Windows)
if: matrix.os == 'Windows'
# TODO(https://github.com/apache/arrow-adbc/issues/4269): remove cmd.exe usage
shell: cmd # zizmor: ignore[misfeature]
shell: pwsh
run: |
.\ci\scripts\python_wheel_windows_build.bat %cd% %cd%\build\${{ matrix.vcpkg_arch }}
.\ci\scripts\python_wheel_windows_build_drivers.ps1 `
-SourceDir $PWD.Path `
-BuildDir (Join-Path $PWD.Path "build/${{ matrix.vcpkg_arch }}") `
-Architecture "amd64"

- name: Build driver manager (Windows)
if: matrix.os == 'Windows'
Expand Down
189 changes: 163 additions & 26 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -952,16 +952,17 @@ jobs:
path: ~/logs

python-windows:
name: "Python ${{ matrix.python_version }} Windows"
runs-on: windows-latest
name: "Python ${{ matrix.arch }} Windows"
runs-on: ${{ matrix.runner }}
needs:
- source
strategy:
fail-fast: false
matrix:
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"]
include:
- { arch: amd64, python_arch: x64, runner: windows-latest }
- { arch: arm64, python_arch: arm64, runner: windows-11-vs2026-arm }
env:
PYTHON_VERSION: "${{ matrix.python_version }}"
VCPKG_ROOT: "${{ github.workspace }}/vcpkg"
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
Expand Down Expand Up @@ -999,6 +1000,26 @@ jobs:
choco install --no-progress -y cmake --installargs 'ADD_CMAKE_TO_PATH=System'
choco install --no-progress -y visualcpp-build-tools

- name: Install MSYS2
if: matrix.arch == 'arm64'
id: msys2
uses: msys2/setup-msys2@66cd2cce69caa17b53920067426061ca1de3a884 # v2.32.0
with:
msystem: CLANGARM64
update: true
install: |
mingw-w64-clang-aarch64-gcc-compat
mingw-w64-clang-aarch64-tools

- name: Add MSYS2 toolchain to PATH
if: matrix.arch == 'arm64'
env:
MSYS_LOCATION: ${{ steps.msys2.outputs.msys2-location }}
shell: pwsh
run: |
"$env:MSYS_LOCATION\clangarm64\bin" |
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install vcpkg
shell: bash
run: |
Expand All @@ -1009,28 +1030,117 @@ jobs:
with:
go-version: "${{ env.GO_VERSION }}"
check-latest: true
cache: false
cache: false # disable to protect against cache poisoning
cache-dependency-path: adbc/go/adbc/go.sum

- name: Install Python ${{ matrix.python_version }}
- name: Install Python 3.10
if: matrix.arch == 'amd64'
id: python310
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
architecture: ${{ matrix.python_arch }}
check-latest: true
python-version: ${{ matrix.python_version }}
python-version: "3.10"
update-environment: false

- name: Build wheel
# TODO(https://github.com/apache/arrow-adbc/issues/4269): remove cmd.exe usage
shell: cmd # zizmor: ignore[misfeature]
run: |
pushd adbc
set SETUPTOOLS_SCM_PRETEND_VERSION=%VERSION%
.\ci\scripts\python_wheel_windows_build.bat %cd% %cd%\build
popd
- name: Install Python 3.11
id: python311
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
architecture: ${{ matrix.python_arch }}
check-latest: true
python-version: "3.11"
update-environment: false

- name: Install Python 3.12
id: python312
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
architecture: ${{ matrix.python_arch }}
check-latest: true
python-version: "3.12"
update-environment: false

- name: Install Python 3.13
id: python313
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
architecture: ${{ matrix.python_arch }}
check-latest: true
python-version: "3.13"
update-environment: false

- name: Install Python 3.14
id: python314
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
architecture: ${{ matrix.python_arch }}
check-latest: true
python-version: "3.14"
update-environment: false

- name: Install Python 3.14t
id: python314t
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
architecture: ${{ matrix.python_arch }}
check-latest: true
python-version: "3.14t"
update-environment: false

- name: Build driver wheels
shell: pwsh
env:
PYTHON_PATH: ${{ steps.python311.outputs.python-path }}
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.VERSION }}
run: |
$PythonDir = Split-Path $env:PYTHON_PATH
$env:PATH = "$PythonDir;$env:PATH"
Set-Location adbc
.\ci\scripts\python_wheel_windows_build_drivers.ps1 `
-SourceDir $PWD.Path `
-BuildDir (Join-Path $PWD.Path "build") `
-Architecture "${{ matrix.arch }}"
if (-not $?) { throw "Failed to build driver wheels" }

- name: Build driver manager wheels
shell: pwsh
env:
PYTHON_310: ${{ steps.python310.outputs.python-path }}
PYTHON_311: ${{ steps.python311.outputs.python-path }}
PYTHON_312: ${{ steps.python312.outputs.python-path }}
PYTHON_313: ${{ steps.python313.outputs.python-path }}
PYTHON_314: ${{ steps.python314.outputs.python-path }}
PYTHON_314T: ${{ steps.python314t.outputs.python-path }}
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ env.VERSION }}
run: |
$OriginalPath = $env:PATH
$Pythons = @(
@{ Version = "3.10"; Path = $env:PYTHON_310 },
@{ Version = "3.11"; Path = $env:PYTHON_311 },
@{ Version = "3.12"; Path = $env:PYTHON_312 },
@{ Version = "3.13"; Path = $env:PYTHON_313 },
@{ Version = "3.14"; Path = $env:PYTHON_314 },
@{ Version = "3.14t"; Path = $env:PYTHON_314T }
)
Set-Location adbc
foreach ($Python in $Pythons) {
if ([string]::IsNullOrEmpty($Python.Path)) {
continue
}
Write-Host "::group::Building driver manager for Python $($Python.Version)"
$env:PYTHON_VERSION = $Python.Version
$PythonDir = Split-Path $Python.Path
$env:PATH = "$PythonDir;$OriginalPath"
.\ci\scripts\python_wheel_windows_build_manager.ps1 -SourceDir $PWD.Path
if (-not $?) { throw "Failed to build the Python $($Python.Version) driver manager wheel" }
Write-Host "::endgroup::"
}

- name: Archive wheels
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: python${{ matrix.python_version }}-windows
name: python-windows-${{ matrix.arch }}
retention-days: 7
path: |
adbc/python/adbc_driver_flightsql/repaired_wheels/*.whl
Expand All @@ -1040,17 +1150,44 @@ jobs:
adbc/build/**/*.pdb

- name: Test wheel
# TODO(https://github.com/apache/arrow-adbc/issues/4269): remove cmd.exe usage
shell: cmd # zizmor: ignore[misfeature]
shell: pwsh
env:
PYTHON_VERSION: ${{ matrix.python_version }}
run: |
pushd adbc
where python.exe
python -m venv venv
CALL venv\Scripts\activate.bat
.\ci\scripts\python_wheel_windows_test.bat %cd%
popd
PYTHON_310: ${{ steps.python310.outputs.python-path }}
PYTHON_311: ${{ steps.python311.outputs.python-path }}
PYTHON_312: ${{ steps.python312.outputs.python-path }}
PYTHON_313: ${{ steps.python313.outputs.python-path }}
PYTHON_314: ${{ steps.python314.outputs.python-path }}
PYTHON_314T: ${{ steps.python314t.outputs.python-path }}
run: |
$OriginalPath = $env:PATH
$Pythons = @(
@{ Version = "3.10"; Path = $env:PYTHON_310 },
@{ Version = "3.11"; Path = $env:PYTHON_311 },
@{ Version = "3.12"; Path = $env:PYTHON_312 },
@{ Version = "3.13"; Path = $env:PYTHON_313 },
@{ Version = "3.14"; Path = $env:PYTHON_314 },
@{ Version = "3.14t"; Path = $env:PYTHON_314T }
)
Set-Location adbc
foreach ($Python in $Pythons) {
if ([string]::IsNullOrEmpty($Python.Path)) {
continue
}
Write-Host "::group::Testing wheels with Python $($Python.Version)"
$env:PYTHON_VERSION = $Python.Version
$PythonDir = Split-Path $Python.Path
$env:PATH = "$PythonDir;$OriginalPath"
$VenvDir = Join-Path $env:RUNNER_TEMP "adbc-wheel-test-$($Python.Version)"
python -m venv $VenvDir
if (-not $?) { throw "Failed to create the Python $($Python.Version) test environment" }
$env:PATH = "$(Join-Path $VenvDir 'Scripts');$env:PATH"
.\ci\scripts\python_wheel_windows_test.ps1 `
-SourceDir $PWD.Path `
-Architecture "${{ matrix.arch }}"
if (-not $?) { throw "Failed to test the Python $($Python.Version) wheels" }
Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $VenvDir
Write-Host "::endgroup::"
}

python-sdist:
name: "Python sdist"
Expand Down
3 changes: 2 additions & 1 deletion LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

--------------------------------------------------------------------------------

The files under c/vendor/backward contain code from backward-cpp.
The files under c/vendor/backward contain code from backward-cpp, commit
0bfd0a07a61551413ccd2ab9a9099af3bad40681.
backward-cpp has the following license:

Copyright 2013 Google Inc. All Rights Reserved.
Expand Down
2 changes: 1 addition & 1 deletion c/cmake_modules/GoUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ function(add_go_lib GO_MOD_DIR GO_LIBNAME)
set(EXTLDFLAGS ",--version-script=${REPOSITORY_ROOT}/c/symbols.map")
endif()

if(NOT APPLE)
if(NOT APPLE AND NOT WIN32)
set(EXTLDFLAGS "${EXTLDFLAGS},-soname,${LIB_NAME_SHARED}.${ADBC_SO_VERSION}")
endif()

Expand Down
40 changes: 37 additions & 3 deletions c/vendor/backward/backward.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -954,7 +954,7 @@ class StackTraceImpl<system_tag::current_tag> : public StackTraceImplHolder {
reinterpret_cast<void *>(uctx->uc_mcontext.gregs[REG_EIP]);
++index;
ctx = *reinterpret_cast<unw_context_t *>(uctx);
#elif defined(__arm__)
#elif defined(__arm__) // clang libunwind/arm
// libunwind uses its own context type for ARM unwinding.
// Copy the registers from the signal handler's context so we can
// unwind
Expand Down Expand Up @@ -985,6 +985,24 @@ class StackTraceImpl<system_tag::current_tag> : public StackTraceImplHolder {
}
_stacktrace[index] = reinterpret_cast<void *>(ctx.regs[UNW_ARM_R15]);
++index;
#elif defined(__aarch64__) // gcc libunwind/arm64
unw_getcontext(&ctx);
// If the IP is the same as the crash address we have a bad function
// dereference The caller's address is pointed to by the link pointer, so
// we dereference that value and set it to be the next frame's IP.
if (uctx->uc_mcontext.pc == reinterpret_cast<__uint64_t>(error_addr())) {
uctx->uc_mcontext.pc = uctx->uc_mcontext.regs[UNW_TDEP_IP];
}

// 29 general purpose registers
for (int i = UNW_AARCH64_X0; i <= UNW_AARCH64_X28; i++) {
ctx.uc_mcontext.regs[i] = uctx->uc_mcontext.regs[i];
}
ctx.uc_mcontext.sp = uctx->uc_mcontext.sp;
ctx.uc_mcontext.pc = uctx->uc_mcontext.pc;
ctx.uc_mcontext.fault_address = uctx->uc_mcontext.fault_address;
_stacktrace[index] = reinterpret_cast<void *>(ctx.uc_mcontext.pc);
++index;
#elif defined(__APPLE__) && defined(__x86_64__)
unw_getcontext(&ctx);
// OS X's implementation of libunwind uses its own context object
Expand Down Expand Up @@ -1160,19 +1178,31 @@ class StackTraceImpl<system_tag::current_tag> : public StackTraceImplHolder {
s.AddrStack.Mode = AddrModeFlat;
s.AddrFrame.Mode = AddrModeFlat;
s.AddrPC.Mode = AddrModeFlat;
#ifdef _M_X64
#if defined(_M_X64)
s.AddrPC.Offset = ctx_->Rip;
s.AddrStack.Offset = ctx_->Rsp;
s.AddrFrame.Offset = ctx_->Rbp;
#elif defined(_M_ARM64)
s.AddrPC.Offset = ctx_->Pc;
s.AddrStack.Offset = ctx_->Sp;
s.AddrFrame.Offset = ctx_->Fp;
#elif defined(_M_ARM)
s.AddrPC.Offset = ctx_->Pc;
s.AddrStack.Offset = ctx_->Sp;
s.AddrFrame.Offset = ctx_->R11;
#else
s.AddrPC.Offset = ctx_->Eip;
s.AddrStack.Offset = ctx_->Esp;
s.AddrFrame.Offset = ctx_->Ebp;
#endif

if (!machine_type_) {
#ifdef _M_X64
#if defined(_M_X64)
machine_type_ = IMAGE_FILE_MACHINE_AMD64;
#elif defined(_M_ARM64)
machine_type_ = IMAGE_FILE_MACHINE_ARM64;
#elif defined(_M_ARM)
machine_type_ = IMAGE_FILE_MACHINE_ARMNT;
#else
machine_type_ = IMAGE_FILE_MACHINE_I386;
#endif
Expand Down Expand Up @@ -4260,6 +4290,8 @@ class SignalHandling {
#elif defined(__mips__)
error_addr = reinterpret_cast<void *>(
reinterpret_cast<struct sigcontext *>(&uctx->uc_mcontext)->sc_pc);
#elif defined(__APPLE__) && defined(__POWERPC__)
error_addr = reinterpret_cast<void *>(uctx->uc_mcontext->__ss.__srr0);
#elif defined(__ppc__) || defined(__powerpc) || defined(__powerpc__) || \
defined(__POWERPC__)
error_addr = reinterpret_cast<void *>(uctx->uc_mcontext.regs->nip);
Expand All @@ -4271,6 +4303,8 @@ class SignalHandling {
error_addr = reinterpret_cast<void *>(uctx->uc_mcontext->__ss.__rip);
#elif defined(__APPLE__)
error_addr = reinterpret_cast<void *>(uctx->uc_mcontext->__ss.__eip);
#elif defined(__loongarch__)
error_addr = reinterpret_cast<void *>(uctx->uc_mcontext.__pc);
#else
#warning ":/ sorry, ain't know no nothing none not of your architecture!"
#endif
Expand Down
Loading
Loading