Skip to content

Commit 5349e8c

Browse files
committed
Attempt to build Debian ODBC
1 parent f44c6ac commit 5349e8c

3 files changed

Lines changed: 52 additions & 7 deletions

File tree

.github/workflows/cpp_extra.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ jobs:
158158
# echo "${env}" >> .env
159159
# done
160160
# fi
161-
# archery docker run ${{ matrix.run-options || '' }} ubuntu-cpp-odbc
161+
# archery docker run ${{ matrix.run-options || '' }} ubuntu-cpp
162162
# - name: Docker Push
163163
# if: >-
164164
# success() &&
@@ -169,7 +169,7 @@ jobs:
169169
# ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
170170
# ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
171171
# continue-on-error: true
172-
# run: archery docker push ubuntu-cpp-odbc
172+
# run: archery docker push ubuntu-cpp
173173

174174
# msvc-arm64:
175175
# needs: check-labels
@@ -338,7 +338,8 @@ jobs:
338338

339339
odbc-linux:
340340
needs: check-labels
341-
name: ODBC Linux
341+
342+
name: ODBC ${{ matrix.title }}
342343
runs-on: ubuntu-latest
343344
if: >-
344345
needs.check-labels.outputs.force == 'true' ||
@@ -347,6 +348,12 @@ jobs:
347348
timeout-minutes: 75
348349
strategy:
349350
fail-fast: false
351+
matrix:
352+
include:
353+
- image: ubuntu-cpp-odbc
354+
title: AMD64 Ubuntu C++23
355+
- image: debian-cpp-odbc
356+
title: AMD64 Debian C++23
350357
env:
351358
ARCH: amd64
352359
CLANG_TOOLS: 18
@@ -367,8 +374,8 @@ jobs:
367374
uses: actions/cache@v5
368375
with:
369376
path: .docker
370-
key: ubuntu-cpp-odbc-${{ hashFiles('cpp/**') }}
371-
restore-keys: ubuntu-cpp-odbc-
377+
key: ${{ matrix.image }}-${{ hashFiles('cpp/**') }}
378+
restore-keys: ${{ matrix.image }}-
372379
- name: Setup Python on hosted runner
373380
uses: actions/setup-python@v6
374381
with:
@@ -383,7 +390,7 @@ jobs:
383390
# GH-40558: reduce ASLR to avoid ASAN/LSAN crashes
384391
sudo sysctl -w vm.mmap_rnd_bits=28
385392
source ci/scripts/util_enable_core_dumps.sh
386-
archery docker run ubuntu-cpp-odbc
393+
archery docker run ${{ matrix.image }}
387394
- name: Docker Push
388395
if: >-
389396
success() &&
@@ -394,7 +401,7 @@ jobs:
394401
ARCHERY_DOCKER_USER: ${{ secrets.DOCKERHUB_USER }}
395402
ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }}
396403
continue-on-error: true
397-
run: archery docker push ubuntu-cpp
404+
run: archery docker push ${{ matrix.image }}
398405

399406
odbc-macos:
400407
needs: check-labels

ci/docker/debian-13-cpp.dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ RUN apt-get update -y -q && \
9090
rustc \
9191
tzdata \
9292
tzdata-legacy \
93+
unixodbc-dev \
9394
zlib1g-dev && \
9495
apt-get clean && \
9596
rm -rf /var/lib/apt/lists/*

compose.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ x-hierarchy:
134134
- debian-cpp:
135135
- debian-c-glib:
136136
- debian-ruby
137+
- debian-cpp-odbc
137138
- debian-python:
138139
- debian-docs
139140
- fedora-cpp:
@@ -373,6 +374,42 @@ services:
373374
/arrow/ci/scripts/cpp_test.sh /arrow /build"
374375
# -AL- so I can define a new one for odbc-cpp too.
375376

377+
debian-cpp-odbc:
378+
# Usage:
379+
# docker compose build debian-cpp
380+
# docker compose run --rm debian-cpp
381+
# Parameters:
382+
# ARCH: amd64, arm64v8, ...
383+
# DEBIAN: 12, experimental
384+
image: ${REPO}:${ARCH}-debian-${DEBIAN}-cpp
385+
build:
386+
context: .
387+
dockerfile: ci/docker/debian-${DEBIAN}-cpp.dockerfile
388+
cache_from:
389+
- ${REPO}:${ARCH}-debian-${DEBIAN}-cpp
390+
args:
391+
arch: ${ARCH}
392+
gcc: ${GCC}
393+
llvm: ${LLVM}
394+
shm_size: *shm-size
395+
ulimits: *ulimits
396+
environment:
397+
<<: [*common, *ccache, *sccache, *cpp]
398+
ARROW_ENABLE_TIMING_TESTS: # inherit
399+
ARROW_BUILD_TYPE: RELEASE
400+
ARROW_DEPENDENCY_SOURCE: BUNDLED
401+
ARROW_DEPENDENCY_USE_SHARED: OFF
402+
ARROW_FLIGHT_SQL_ODBC: ON
403+
volumes: &debian-volumes
404+
- .:/arrow:delegated
405+
- ${DOCKER_VOLUME_PREFIX}debian-ccache:/ccache:delegated
406+
# Register ODBC before running tests
407+
command: >
408+
/bin/bash -c "
409+
/arrow/ci/scripts/cpp_build.sh /arrow /build &&
410+
sudo /arrow/cpp/src/arrow/flight/sql/odbc/install/unix/install_odbc.sh /usr/local/lib/libarrow_flight_sql_odbc.so &&
411+
/arrow/ci/scripts/cpp_test.sh /arrow /build"
412+
376413
ubuntu-cpp:
377414
# Usage:
378415
# docker compose build ubuntu-cpp

0 commit comments

Comments
 (0)