forked from timescale/timescaledb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
138 lines (128 loc) · 8.85 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
sudo: required
language: c
os:
- linux
services:
- docker
env:
global:
- secure: "TurskgAodG44RKCUPfoUb4JlT+UZwaPjUN73MS4+2ED2ayf46iUpcMODovDf7CPQRriMAvii/5xQ9UWTGYZejJy/Si3aE0fQeSKHIOPmuHqmmBkC3jgK9A5vOMpaAwljSNvIAMfwhIjVsq87nyvxHYWReDWl5SrdxTvh91RJvOiMRNdqwBbnj2j1cC30783ICGZUazrUyhDDnXispyBJYFxlHJmQJpfs6428dTRNJY/X8nVDXFwQkRjlIXarquTsrifCfzdq40Ykb8/1CS0295R8/kdKamQqXM0aS7iIkw3JFmZIz08OHKc7wcJuv6KSnCfNSftJqy2+nb1gkyIqkr3mrpYUa+2tKVwpA6OfET2S2kC5B3bOTcyBgihhnivAOS9zG8PTouLSUzqZzo+H893xdaMlX4kX3oOrOqzbj8YvTw6Dgw8PWERfnOngpKmKJFb8yboXPmGY7luSVxOplnPnYO0jaAXPU4ESsFYL3EBG5Zo4rVIuA5g7aJ0Ex+e5GQWiHDM1ubUo2vcuVVlurs/Aj8eSpNhqo0S5MjI05Jcz82X+9+asFcP+QV81UrueiXTlQ/7buAyMyVtKOgOhZwR4ImA1zzWkJjNNbZMJqeO9tPEgU7IxrqLhMgIpBB/pn0gzJZ8LN7C2oyznMYGzS5lrYaavojFUViv8vFyAQ24="
- secure: "S8WfPsrVGg21vZPxjrmy1X19T7zpHNgaSAoqYGzJdDZcNYuZbI87+tP3VQZo4MxjP3Ag46zTI5K+6aMjCqYqFGKufZdEaSpPSLmppFbXALgSp/rOkzp1M9HhGj0QVP7QcoPbva5Bjnj3zVi9CMAo6MwtnGAvzqBLOsdtnXTxEmKYyeNgwUVbQi2nzO38GeLgabaFL4XD3f3bmHE5jG6QAwZ/L7+jajsD1biH4sOiRLCRshtvermtYxh3SK6rML2kiwATABxTd1xDdMVRO/llmDBN373tHK6mufJyIhrwG9oTprSSDDIJlEbSPCkH0uvJBGcDvOAWf9tr4TGs/beawx3ELcXqR/4EisFqvMiVL4Vpt1gMBg9gue4Y0wpHZYoBOOef2gFtuyL7PjYe9koYJAJxg9DJ29DMxIjuCLTnbHN6yLa9425pdvxcuNEJ2K2zD0ZWoLSVueL0MxLhOZJsqlMkmmrFyI7y5cj1XvJF3vcsa5yK3S7sXroKUzeLu6QMh8hO3jD/2IvdQJ7Huy5uiJk2a+KUceLzruxLbwPF4b8SEoTquJ9NFGtagCG77lbIbLltLs2fUf+JnM8ipdpoMibVRFBOahP8NZwpL/NFzG3WLH3tDncj/c3fneMiNv3FUHLf6ufOVOayQiAEidszcMct2R20qIxggXKymrjZA3k="
matrix:
# PG_VERSION (docker) and PG_GIT_TAG (Git) should be the same
- PG_VERSION=9.6.6 PG_GIT_TAG=REL9_6_6
- PG_VERSION=10.2 PG_GIT_TAG=REL_10_2
before_install:
# We need the PostgreSQL source for running the standard PostgreSQL
# regression tests
- git clone --branch ${PG_GIT_TAG} --depth 1 https://github.com/postgres/postgres.git /tmp/postgres
- docker run -d --name pgbuild -v ${TRAVIS_BUILD_DIR}:/build -v /tmp/postgres:/postgres postgres:${PG_VERSION}-alpine
install:
- docker exec -it pgbuild /bin/sh -c "apk add --no-cache --virtual .build-deps coreutils dpkg-dev gcc libc-dev make util-linux-dev diffutils cmake bison flex curl git openssl-dev && mkdir -p /build/debug"
- docker exec -it pgbuild /bin/sh -c "apk add --no-cache --virtual --update-cache --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted lcov"
# We only need to build the regress stuff
- docker exec -it pgbuild /bin/sh -c "cd /postgres && ./configure --enable-coverage --enable-debug --enable-cassert --without-readline --without-zlib && make -C /postgres/src/test/regress"
- docker exec -it pgbuild /bin/sh -c "cd /build/debug && CFLAGS=-Werror cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_CODECOVERAGE=TRUE -DPG_SOURCE_DIR=/postgres && make install && chown -R postgres:postgres /build/"
script:
- docker exec -u postgres -it pgbuild /bin/sh -c "make -C /build/debug installcheck pginstallcheck PG_REGRESS_OPTS='--temp-instance=/tmp/pgdata'"
- ci_env=`bash <(curl -s https://codecov.io/env)`
- docker exec -it $ci_env pgbuild /bin/bash -c "cd /build/debug && bash <(curl -s https://codecov.io/bash) || echo \"Codecov did not collect coverage reports\" "
after_failure:
- docker exec -it pgbuild cat /build/debug/test/regression.diffs /build/debug/test/pgtest/regressions.diffs
after_script:
- docker rm -f pgbuild
jobs:
include:
# this tests the ability to upgrade to the latest version from versions without constraint support
- stage: test
script:
- PGTEST_TMPDIR=/tmp/ bash -x ./scripts/test_updates_no_constraints.sh
# This tests the ability to upgrade to the latest version from versions with constraint support
- stage: test
script:
- PGTEST_TMPDIR=/tmp/ bash -x ./scripts/test_updates_with_constraints.sh
- if: type = cron
stage: test
script:
# There is a breakage of ABI between 10.1->10.2 so test starting at 10.2
- PG_MAJOR=10 PG_MINOR_COMPILE=2 bash -x ./scripts/docker-run-abi-test.sh
- if: type = cron
stage: test
script:
# Version >= 9.6.3 is required by TimescaleDB
- PG_MAJOR=9.6 PG_MINOR_COMPILE=3 bash -x ./scripts/docker-run-abi-test.sh
# memory spike test when running out of order random inserts into timescaledb database
- if: (type = cron) OR (branch = prerelease_test)
stage: test
env:
- PG_VERSION=10.2 PG_GIT_TAG=REL_10_2
before_script:
- git clone --progress --verbose https://$USR:[email protected]/440-labs/tsdb-dev-tools.git /tmp/tsdb-dev-tools
script:
- bash ./scripts/docker-run-memory-test.sh
# Valgrind test #1 : first 40 excluding plan_hashagg_optimized* and plan_hashagg_results*
- if: (branch = prerelease_test)
stage: test
before_script:
# clone valgrind test script
- git clone https://$USR:[email protected]/440-labs/tsdb-dev-tools.git /tmp/tsdb-dev-tools
- bash -c 'while true; do echo -e "keepalive\n"; sleep 60; done' & # print line every 60 minutes to avoid Travis timeout
script:
# TEST_MAX specifies the maximum test # to go up to
- cd /tmp/tsdb-dev-tools; TIMESCALE_DIR=$TRAVIS_BUILD_DIR TEST_MAX=40 EXCLUDE_PATTERN='plan_hashagg_optimized*|plan_hashagg_results*' bash ./test_valgrind.sh
after_script:
- kill $(jobs -p) # kill job that prints repeatedly
# Valgrind test #2: tests matching plan_hashagg_optimized*
- if: (branch = prerelease_test)
stage: test
before_script:
# clone valgrind test script
- git clone https://$USR:[email protected]/440-labs/tsdb-dev-tools.git /tmp/tsdb-dev-tools
- bash -c 'while true; do echo -e "keepalive\n"; sleep 60; done' & # print line every 60 minutes to avoid Travis timeout
script:
# TEST_MAX specifies the maximum test # to go up to
- cd /tmp/tsdb-dev-tools; TIMESCALE_DIR=$TRAVIS_BUILD_DIR INCLUDE_PATTERN='plan_hashagg_optimized*' bash ./test_valgrind.sh
after_script:
- kill $(jobs -p) # kill job that prints repeatedly
# Valgrind test #3: tests matching plan_hashagg_results*
- if: (branch = prerelease_test)
stage: test
before_script:
# clone valgrind test script
- git clone https://$USR:[email protected]/440-labs/tsdb-dev-tools.git /tmp/tsdb-dev-tools
- bash -c 'while true; do echo -e "keepalive\n"; sleep 60; done' & # print line every 60 minutes to avoid Travis timeout
script:
# TEST_MAX specifies the maximum test # to go up to
- cd /tmp/tsdb-dev-tools;TIMESCALE_DIR=$TRAVIS_BUILD_DIR INCLUDE_PATTERN='plan_hashagg_results*' bash ./test_valgrind.sh
after_script:
- kill $(jobs -p) # kill job that prints repeatedly
# Valgrind test #4 : tests from #41 to end excluding plan_hashagg_optimized* and plan_hashagg_results*
- if: (branch = prerelease_test)
stage: test
before_script:
# clone valgrind test script
- git clone https://$USR:[email protected]/440-labs/tsdb-dev-tools.git /tmp/tsdb-dev-tools
- bash -c 'while true; do echo -e "keepalive\n"; sleep 60; done' & # print line every 60 minutes to avoid Travis timeout
script:
# TEST_MIN specifies the minimum test # to go start from
- cd /tmp/tsdb-dev-tools; TIMESCALE_DIR=$TRAVIS_BUILD_DIR TEST_MIN=41 EXCLUDE_PATTERN='plan_hashagg_optimized*|plan_hashagg_results*' bash ./test_valgrind.sh
after_script:
- kill $(jobs -p) # kill job that prints repeatedly
- stage: test
env:
- secure: "jy4DQH2syPR2v13igCNPTr044h3H/ilbJk6FifDMxGZVrOZR0dnkBx3O7qJMQOkEQvNxKsoq41k6HCP16qcgt4+HjxhcZonz5hKIiF8IpcB9r+TIlZunNTx7HjSNFZ3WCnham4AvMEthBHgAttRUhscy39ELCNUEobKS/youi7OHLOEXXShc84yTh3aSuGR3SnDVK1diLN5ufX6tN20pc3QvLMGZmA/jmJFcIQHGilhWGwwiJ45LSLwM9slvgGKbTM/K6btVBMOUnjM0h5WqPjRjDUL2tF+iZLEIpY8lFN/MQCnj0vP/BryDdoVPZS3TDQYwYuvASevQ4sOmULnM770jFqzClq4zkeM2GhMq67aYMmXjblu/qcLeCjZL+vfjMKpBMUydK/bCb097HvdRWDEPA0zItKWX9Kd6lVf2XbJCCh0ljp5REJEyk+plJ2V12nLpOPwY6zTtzcoTxEN6wcvUJfHAdNovpp63hWTnbAbEZamIdxwyCqpzThDobeD354TeXFUaKvrUw00iAiIhGL2QvwapaCbhlwM6NQAmdU3tMy3nZpka6bRI1kjyTh7CXfdwXV98ZJSiPdUFxyIgFNI2dKiL3BI1pvFDfq3mnmi3WqzZHCaQqDKNEtUrzxC40swIJGLcLUiqc5xX37P47jNDWrNIRDs8IdbM0tS9pFM="
before_install:
- echo -n | openssl s_client -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-
- sudo apt-get install -y postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6 postgresql-server-dev-9.6 cmake3
install: echo "Success"
script: echo "Success"
addons:
postgresql: "9.6"
coverity_scan:
project:
name: "timescale/timescaledb"
description: "TimescaledDB an open-source time-series DB"
notification_email: [email protected]
build_command_prepend: "./bootstrap -DCMAKE_BUILD_TYPE=Debug && cd build"
build_command: "make"
branch_pattern: coverity_scan