Skip to content

Commit

Permalink
ci: add Dockerfile for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sjinks committed Sep 20, 2024
1 parent b8f6540 commit 22c1dc4
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*
!.clang-format
!.clang-tidy
!cmake
!CMakeLists.txt
!include
!src
!test
24 changes: 24 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM alpine:3.20.3

RUN apk add --no-cache clang18 cmake git gtest-dev make

ENV CXX=clang++-18
ENV CC=clang-18

WORKDIR /build

ENV OPENTELEMETRY_CPP_VERSION=v1.16.1
RUN \
git clone https://github.com/open-telemetry/opentelemetry-cpp.git \
--depth=1 -b "${OPENTELEMETRY_CPP_VERSION}" --single-branch && \
cd opentelemetry-cpp && \
cmake \
-B build \
-DWITH_DEPRECATED_SDK_FACTORY=OFF -DWITH_NO_DEPRECATED_CODE=ON -DWITH_OTLP_HTTP=OFF \
-DBUILD_TESTING=OFF -DWITH_BENCHMARK=OFF -DWITH_FUNC_TESTS=OFF -DWITH_EXAMPLES=OFF && \
cmake --build build -j "$(nproc)" && \
cmake --install build

WORKDIR /build/opentelemetry_exporter_syslog_logs
COPY . .
RUN cmake -B build && cmake --build build && cmake --install build && ctest --test-dir build

0 comments on commit 22c1dc4

Please sign in to comment.