Skip to content

Commit e650ac6

Browse files
committed
Add option to build TSDB in CI
1 parent ac15e55 commit e650ac6

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ on:
1414
container-image:
1515
description: 'Container image to pull from DockerHub'
1616
required: false
17+
tsdb-commit:
18+
description: 'TimescaleDB commit to use'
19+
default: ''
20+
required: false
21+
tsdb-repo:
22+
description: 'TimescaleDB repo to use'
23+
default: 'https://github.com/timescale/timescaledb.git'
24+
required: false
1725

1826
jobs:
1927
testpostgres:
@@ -56,6 +64,10 @@ jobs:
5664
- name: chown Repository
5765
run: chown -R postgres .
5866

67+
- name: Build and install TimescaleDB
68+
if: ${{ inputs.tsdb-commit != '' }}
69+
run: ./tools/install-timescaledb '${{ matrix.pgversion }}' '${{ inputs.tsdb-repo }}' '${{ inputs.tsdb-commit }}'
70+
5971
# TODO After the container image contains a primed target dir, is this still worth it?
6072
# Only possible advantage is this one is per-pg-version but what's the impact?
6173
- name: Cache cargo target dir

docker/ci/setup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,18 @@ EOF
153153
# - libssl-dev
154154
# - make
155155
# - pkg-config
156+
# cmake and libkrb5-dev are needed to build TimescaleDB
156157
apt-get -qq install \
157158
build-essential \
159+
cmake \
158160
curl \
159161
debhelper \
160162
ed \
161163
fakeroot \
162164
gcc \
163165
git \
164166
gnupg \
167+
libkrb5-dev \
165168
libssl-dev \
166169
make \
167170
pkg-config \

tools/install-timescaledb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/sh
2+
git clone "$2" timescaledb
3+
cd timescaledb
4+
git switch --detach "$3"
5+
mkdir build
6+
cd build
7+
# this overwrites the files from the TimescaleDB package
8+
cmake .. -DUSE_OPENSSL=0 -DLINTER=0 -DCMAKE_PROGRAM_PATH=/usr/lib/postgresql/$1/bin
9+
make install

0 commit comments

Comments
 (0)