Skip to content

Commit

Permalink
Don't install clang-15 for Postgres 10
Browse files Browse the repository at this point in the history
  • Loading branch information
za-arthur committed Jul 13, 2023
1 parent caa7151 commit 4ea83f6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 11 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci_dockerfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,23 @@ jobs:
strategy:
fail-fast: false
matrix:
pg: [15, 14, 13, 12, 11, 10]
include:
- clang: 15
pg: 15
- clang: 15
pg: 14
- clang: 15
pg: 13
- clang: 15
pg: 12
- clang: 15
pg: 11
- clang: none
pg: 10
name: PostgreSQL ${{ matrix.pg }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker build --tag tests --build-arg="PG_VERSION=${{ matrix.pg }}" .
- run: docker build --tag tests --build-arg="PG_VERSION=${{ matrix.pg }}" --target="clang-${{ matrix.clang }}" .
- run: docker run --rm tests

27 changes: 18 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
ARG PG_VERSION
FROM postgres:${PG_VERSION}-alpine
FROM postgres:${PG_VERSION}-alpine AS base

# Environment
ENV LANG=C.UTF-8
ENV REPO=/repo
ENV KAFKA_PRODUCER="/kafka/bin/kafka-console-producer.sh"
ENV KAFKA_TOPICS="/kafka/bin/kafka-topics.sh"

# Install dependencies
RUN apk --no-cache add make musl-dev gcc clang clang15 llvm util-linux-dev wget librdkafka-dev openjdk8-jre;

# Make postgres directories writable
RUN chmod a+rwx /usr/local/lib/postgresql && \
chmod a+rwx /usr/local/lib/postgresql/bitcode || true && \
chmod a+rwx /usr/local/share/postgresql/extension

chmod a+rwx /usr/local/share/postgresql/extension && \
# Make directories
RUN mkdir -p $REPO && \
mkdir -p $REPO && \
mkdir /kafka && \
chmod a+rwx /kafka

Expand All @@ -25,10 +21,23 @@ ADD . $REPO
RUN chown -R postgres:postgres $REPO
WORKDIR $REPO

USER postgres

# Expose zookeeper and kafka ports (may be useful for local debug)
EXPOSE 2181 9092

# clang-none target
FROM base AS clang-none

# Install dependencies
RUN apk --no-cache add make musl-dev gcc util-linux-dev wget librdkafka-dev openjdk8-jre;
USER postgres

ENTRYPOINT ["/repo/test/run_tests.sh"]

# clang-15 target
FROM base AS clang-15

# Install dependencies
RUN apk --no-cache add make musl-dev gcc clang15 llvm15 util-linux-dev wget librdkafka-dev openjdk8-jre;
USER postgres

ENTRYPOINT ["/repo/test/run_tests.sh"]

0 comments on commit 4ea83f6

Please sign in to comment.