Skip to content

Commit

Permalink
Fix Github Actions build
Browse files Browse the repository at this point in the history
  • Loading branch information
zilder committed Oct 15, 2021
1 parent dc252b2 commit 7ae38c7
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 13 deletions.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,22 @@ jobs:
runs-on: ubuntu-latest
container: zilder/pg-ext-check
steps:
# Install and run postgres
- run: pg-setup ${{ matrix.pg }}
- run: apt-get install -yq librdkafka-dev libz-dev

# Install packages
- run: mkdir -p /usr/share/man/man1
- run: apt-get install -yq librdkafka-dev libz-dev default-jre-headless wget

# Clone repo
- uses: actions/checkout@v2

# Install and run zookeeper/kafka
- run: mkdir /kafka
- run: ./run_kafka.sh
working-directory: ./test

# Build kafka_fdw and run tests
- run: build-check
env:
KAFKA_PRODUCER: "/kafka/bin/kafka-console-producer.sh"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI (from Dockerfile)
name: build

on:
push:
Expand All @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
pg: [14, 13, 12]
pg: [14, 13, 12, 11, 10, 9.6]
name: PostgreSQL ${{ matrix.pg }}
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN apk --no-cache add make musl-dev gcc clang llvm util-linux-dev wget librdkaf

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

# Make directories
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Kafka Foreign Data Wrapper for PostgreSQL

[![Build Status](https://travis-ci.org/adjust/kafka_fdw.svg?branch=master)](https://travis-ci.org/adjust/kafka_fdw)
[![build](https://github.com/adjust/kafka_fdw/actions/workflows/ci_dockerfile.yml/badge.svg)](https://github.com/adjust/kafka_fdw/actions/workflows/ci_dockerfile.yml)

At this point the project is not yet production ready.
Use with care. Pull requests welcome
Expand Down
8 changes: 0 additions & 8 deletions test/run_kafka.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@ DIST=$(cat /etc/os-release | grep ^ID= | sed s/ID=//)

echo

if [ $DIST != 'alpine' ]; then
# Install JRE
mkdir -p /usr/share/man/man1
apt-get update
export DEBIAN_FRONTEND=noninteractive
apt-get install -yq default-jre-headless wget
fi

# Download Apache Kafka
wget https://downloads.apache.org/kafka/${KAFKA_VERSION}/${KAFKA_ARCHIVE}
tar -xzf ${KAFKA_ARCHIVE} -C /kafka --strip-components=1
Expand Down

0 comments on commit 7ae38c7

Please sign in to comment.