Skip to content

Commit

Permalink
ci: test against latest Clang (apache#2007)
Browse files Browse the repository at this point in the history
  • Loading branch information
lidavidm committed Jul 16, 2024
1 parent f806f79 commit 8ea1ce1
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 0 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/nightly-verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
39 changes: 39 additions & 0 deletions ci/docker/cpp-clang-latest.dockerfile
Original file line number Diff line number Diff line change
@@ -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
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 8ea1ce1

Please sign in to comment.