mirror of https://github.com/citusdata/citus.git
add integration files for circle ci
This is based on the circle ci integration we have for citus, albeit highly simplified.merge-cstore-pykello
parent
09208986ba
commit
20a8bca426
|
@ -0,0 +1,16 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euxo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
status=0
|
||||||
|
|
||||||
|
basedir="$(pwd)"
|
||||||
|
installdir="${basedir}/install-${PG_MAJOR}"
|
||||||
|
|
||||||
|
make install DESTDIR="${installdir}"
|
||||||
|
pushd "${installdir}"
|
||||||
|
find . -type f -print > "${basedir}/files.lst"
|
||||||
|
cat "${basedir}/files.lst"
|
||||||
|
tar cvf "${basedir}/install-${PG_MAJOR}.tar" $(cat "${basedir}/files.lst")
|
||||||
|
popd
|
|
@ -0,0 +1,101 @@
|
||||||
|
version: 2.1
|
||||||
|
orbs:
|
||||||
|
codecov: codecov/codecov@1.1.1
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-style:
|
||||||
|
docker:
|
||||||
|
- image: 'citus/stylechecker:latest'
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: 'Check Style'
|
||||||
|
command: |
|
||||||
|
citus_indent --check
|
||||||
|
- run:
|
||||||
|
name: 'Check if whitespace fixing changed anything, install editorconfig if it did'
|
||||||
|
command: |
|
||||||
|
git diff --exit-code
|
||||||
|
|
||||||
|
build-11:
|
||||||
|
docker:
|
||||||
|
- image: 'citus/extbuilder:11.9'
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: 'Configure, Build, and Install'
|
||||||
|
command: |
|
||||||
|
PG_MAJOR=11 .circleci/build.sh
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: .
|
||||||
|
paths:
|
||||||
|
- install-11.tar
|
||||||
|
|
||||||
|
build-12:
|
||||||
|
docker:
|
||||||
|
- image: 'citus/extbuilder:12.4'
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- run:
|
||||||
|
name: 'Configure, Build, and Install'
|
||||||
|
command: |
|
||||||
|
PG_MAJOR=12 .circleci/build.sh
|
||||||
|
- persist_to_workspace:
|
||||||
|
root: .
|
||||||
|
paths:
|
||||||
|
- install-12.tar
|
||||||
|
|
||||||
|
test-11_checkinstall:
|
||||||
|
docker:
|
||||||
|
- image: 'citus/exttester:11.9'
|
||||||
|
working_directory: /home/circleci/project
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- run:
|
||||||
|
name: 'Prepare Container & Install Extension'
|
||||||
|
command: |
|
||||||
|
chown -R circleci:circleci /home/circleci
|
||||||
|
tar xfv "${CIRCLE_WORKING_DIRECTORY}/install-${PG_MAJOR}.tar" --directory /
|
||||||
|
- run:
|
||||||
|
name: 'Run Test'
|
||||||
|
command: |
|
||||||
|
gosu circleci .circleci/run_test.sh installcheck
|
||||||
|
- codecov/upload:
|
||||||
|
flags: 'test_11,installcheck'
|
||||||
|
|
||||||
|
test-12_checkinstall:
|
||||||
|
docker:
|
||||||
|
- image: 'citus/exttester:12.4'
|
||||||
|
working_directory: /home/circleci/project
|
||||||
|
steps:
|
||||||
|
- checkout
|
||||||
|
- attach_workspace:
|
||||||
|
at: .
|
||||||
|
- run:
|
||||||
|
name: 'Prepare Container & Install Extension'
|
||||||
|
command: |
|
||||||
|
chown -R circleci:circleci /home/circleci
|
||||||
|
tar xfv "${CIRCLE_WORKING_DIRECTORY}/install-${PG_MAJOR}.tar" --directory /
|
||||||
|
- run:
|
||||||
|
name: 'Run Test'
|
||||||
|
command: |
|
||||||
|
gosu circleci .circleci/run_test.sh installcheck
|
||||||
|
- codecov/upload:
|
||||||
|
flags: 'test_12,installcheck'
|
||||||
|
|
||||||
|
workflows:
|
||||||
|
version: 2
|
||||||
|
build_and_test:
|
||||||
|
jobs:
|
||||||
|
|
||||||
|
- check-style
|
||||||
|
|
||||||
|
- build-11
|
||||||
|
- build-12
|
||||||
|
|
||||||
|
- test-11_checkinstall:
|
||||||
|
requires: [build-11]
|
||||||
|
- test-12_checkinstall:
|
||||||
|
requires: [build-12]
|
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -euxo pipefail
|
||||||
|
IFS=$'\n\t'
|
||||||
|
|
||||||
|
status=0
|
||||||
|
|
||||||
|
export PGPORT=${PGPORT:-55432}
|
||||||
|
|
||||||
|
function cleanup {
|
||||||
|
pg_ctl -D /tmp/postgres stop
|
||||||
|
rm -rf /tmp/postgres
|
||||||
|
}
|
||||||
|
trap cleanup EXIT
|
||||||
|
|
||||||
|
rm -rf /tmp/postgres
|
||||||
|
initdb -E unicode /tmp/postgres
|
||||||
|
echo "shared_preload_libraries = 'cstore_fdw'" >> /tmp/postgres/postgresql.conf
|
||||||
|
pg_ctl -D /tmp/postgres -o "-p ${PGPORT}" -l /tmp/postgres_logfile start || status=$?
|
||||||
|
if [ -z $status ]; then cat /tmp/postgres_logfile; fi
|
||||||
|
|
||||||
|
make "${@}" || status=$?
|
||||||
|
diffs="regression.diffs"
|
||||||
|
|
||||||
|
if test -f "${diffs}"; then cat "${diffs}"; fi
|
||||||
|
|
||||||
|
exit $status
|
|
@ -60,3 +60,8 @@
|
||||||
.vscode
|
.vscode
|
||||||
|
|
||||||
*.pb-c.*
|
*.pb-c.*
|
||||||
|
|
||||||
|
# ignore files that could be created by circleci automation
|
||||||
|
files.lst
|
||||||
|
install-*.tar
|
||||||
|
install-*/
|
||||||
|
|
Loading…
Reference in New Issue