diff --git a/.github/workflows/nightly-verify.yml b/.github/workflows/nightly-verify.yml index dfbd3f8bfa..264d7806b6 100644 --- a/.github/workflows/nightly-verify.yml +++ b/.github/workflows/nightly-verify.yml @@ -174,3 +174,18 @@ jobs: VERIFICATION_MOCK_DIST_DIR: ${{ github.workspace }}\apache-arrow-adbc-${{ env.VERSION }}-rc0 run: | .\arrow-adbc\dev\release\verify-release-candidate.ps1 $env:VERSION 0 + + source-docker: + name: "Run Docker Tests" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + path: arrow-adbc + persist-credentials: false + + - name: Run Test + run: | + pushd arrow-adbc + docker compose run --rm cpp-clang-latest diff --git a/ci/docker/cpp-clang-latest.dockerfile b/ci/docker/cpp-clang-latest.dockerfile new file mode 100644 index 0000000000..ff6e161e37 --- /dev/null +++ b/ci/docker/cpp-clang-latest.dockerfile @@ -0,0 +1,39 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +ARG VCPKG + +FROM debian:12 + +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get update -y && \ + apt-get install -y curl gnupg && \ + echo "deb http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" \ + > /etc/apt/sources.list.d/llvm.list && \ + echo "deb-src http://apt.llvm.org/bookworm/ llvm-toolchain-bookworm main" \ + >> /etc/apt/sources.list.d/llvm.list && \ + curl -L https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ + apt-get update -y && \ + apt-get install -y clang libc++abi-dev libc++-dev libomp-dev && \ + apt-get clean + +RUN export DEBIAN_FRONTEND=noninteractive && \ + apt-get install -y cmake git libpq-dev libsqlite3-dev pkg-config + +RUN curl -L -o go.tar.gz https://go.dev/dl/go1.22.5.linux-amd64.tar.gz && \ + tar -C /opt -xvf go.tar.gz && \ + echo 'export PATH=$PATH:/opt/go/bin' | tee -a ~/.bashrc diff --git a/docker-compose.yml b/docker-compose.yml index cedaf439f0..1b0f217c94 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -30,6 +30,19 @@ services: command: | /adbc/ci/scripts/csharp_pack.sh /adbc + ################################ C/C++ ####################################### + + # Build/test with latest Clang + cpp-clang-latest: + build: + context: . + dockerfile: ci/docker/cpp-clang-latest.dockerfile + args: + VCPKG: ${VCPKG} + volumes: + - .:/adbc:delegated + command: "bash -c 'export PATH=$PATH:/opt/go/bin CC=$(which clang) CXX=$(which clang++) && git config --global --add safe.directory /adbc && /adbc/ci/scripts/cpp_build.sh /adbc /adbc/build && env BUILD_ALL=0 BUILD_DRIVER_MANAGER=1 BUILD_DRIVER_SQLITE=1 /adbc/ci/scripts/cpp_test.sh /adbc/build'" + ############################ Documentation ################################### docs: