Skip to content

Commit 218c099

Browse files
bors[bot]syvb
andauthored
Merge #667
667: Add option to build TimescaleDB in CI r=Smittyvb a=Smittyvb Adds an option to manually run the CI using an arbitrary TimescaleDB commit. You can also optionally specify a TimescaleDB repo to test the CI with a fork of TimescaleDB. Co-authored-by: Smitty <[email protected]>
2 parents b14452c + e650ac6 commit 218c099

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed

.github/workflows/ci.yml

Lines changed: 13 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:
@@ -22,6 +30,7 @@ jobs:
2230
container:
2331
image: ${{ inputs.container-image || 'timescaledev/toolkit-builder:debian-11-amd64' }}
2432
strategy:
33+
fail-fast: false
2534
matrix:
2635
pgversion: [12, 13, 14, 15]
2736
env:
@@ -55,6 +64,10 @@ jobs:
5564
- name: chown Repository
5665
run: chown -R postgres .
5766

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+
5871
# TODO After the container image contains a primed target dir, is this still worth it?
5972
# Only possible advantage is this one is per-pg-version but what's the impact?
6073
- 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)