- Notifications
You must be signed in to change notification settings - Fork49
Attempt to revive Travis.#53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Open
sokolcati wants to merge2 commits intopostgrespro:masterChoose a base branch fromsokolcati:master
base:master
Could not load branches
Branch not found:{{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline, and old review comments may become outdated.
Uh oh!
There was an error while loading.Please reload this page.
Open
Changes from1 commit
Commits
Show all changes
2 commits Select commitHold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
PrevPrevious commit
Second attempt to revive Travis + update copyright.
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions.dockerignore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Don't send some content to the Docker host when building | ||
travis | ||
.git | ||
.travis.yml | ||
*.gcno | ||
*.gcda | ||
*.gcov | ||
*.so | ||
*.o |
32 changes: 17 additions & 15 deletions.travis.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
os: linux | ||
dist: jammy | ||
language: c | ||
services: | ||
- docker | ||
env: | ||
- PG_VER=17 | ||
- PG_VER=16 | ||
- PG_VER=15 | ||
- PG_VER=14 | ||
- PG_VER=13 | ||
- PG_VER=12 | ||
- PG_VER=11 | ||
- PG_VER=10 | ||
#- PG_VER=9.6 | ||
#- PG_VER=9.5 | ||
#- PG_VER=9.4 | ||
jobs: | ||
allow_failures: | ||
- env: PG_VER=12 | ||
- env: PG_VER=11 | ||
- env: PG_VER=10 | ||
before_install: cp travis/* . | ||
install: | ||
- ./mk_dockerfile.sh | ||
- docker-compose build | ||
script: docker-compose run $(bash <(curl -s https://codecov.io/env)) tests |
2 changes: 1 addition & 1 deletionLICENSE
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsonb_gin_ops.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery_constr.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery_extract.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery_gram.y
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery_io.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery_op.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery_scan.l
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletionjsquery_support.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletionstravis/Dockerfile.in
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM postgres:${PG_VERSION}-alpine | ||
# Install dependencies | ||
RUN apk add --no-cache \ | ||
linux-headers \ | ||
openssl curl \ | ||
perl perl-ipc-run perl-dev perl-app-cpanminus perl-dbi \ | ||
make musl-dev gcc bison flex coreutils \ | ||
zlib-dev libedit-dev \ | ||
pkgconf icu-dev clang clang15 clang-analyzer; | ||
# Environment | ||
ENV LANG=C.UTF-8 PGDATA=/pg/data | ||
# Make directories | ||
RUNmkdir -p ${PGDATA} && \ | ||
mkdir -p /pg/testdir | ||
COPY run_tests.sh /run.sh | ||
RUN chmod 755 /run.sh | ||
COPY . /pg/testdir | ||
WORKDIR /pg/testdir | ||
# Grant privileges | ||
RUNchown postgres:postgres ${PGDATA} && \ | ||
chown -R postgres:postgres /pg/testdir && \ | ||
chown postgres:postgres /usr/local/include/postgresql/server/ && \ | ||
chmod a+rwx /usr/local/lib/postgresql && \ | ||
chmod a+rwx /usr/local/share/postgresql/extension | ||
USER postgres | ||
ENTRYPOINT LEVEL=${LEVEL} /run.sh |
4 changes: 0 additions & 4 deletionstravis/dep-ubuntu-postgres.sh
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
3 changes: 3 additions & 0 deletionstravis/docker-compose.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
services: | ||
tests: | ||
build: . |
16 changes: 16 additions & 0 deletionstravis/mk_dockerfile.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
if [ -z ${PG_VERSION+x} ]; then | ||
echo PG_VERSION is not set! | ||
exit 1 | ||
fi | ||
if [ -z ${LEVEL+x} ]; then | ||
LEVEL=standard | ||
fi | ||
echo PG_VERSION=${PG_VERSION} | ||
echo LEVEL=${LEVEL} | ||
sed \ | ||
-e 's/${PG_VERSION}/'${PG_VERSION}/g \ | ||
-e 's/${LEVEL}/'${LEVEL}/g \ | ||
Dockerfile.in > Dockerfile |
21 changes: 0 additions & 21 deletionstravis/pg-travis-test.sh
This file was deleted.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
50 changes: 50 additions & 0 deletionstravis/run_tests.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) 2024, Postgres Professional | ||
# | ||
# supported levels: | ||
#* standard | ||
# | ||
set -ev | ||
status=0 | ||
# show pg_config just in case | ||
pg_config | ||
# build and install extension (using PG_CPPFLAGS and SHLIB_LINK for gcov) | ||
make USE_PGXS=1 PG_CPPFLAGS="-coverage" SHLIB_LINK="-coverage" install | ||
# initialize database | ||
initdb -D $PGDATA | ||
# set appropriate port | ||
export PGPORT=55435 | ||
echo "port = $PGPORT" >> $PGDATA/postgresql.conf | ||
# restart cluster 'test' | ||
pg_ctl start -l /tmp/postgres.log -w || status=$? | ||
# something's wrong, exit now! | ||
if [ $status -ne 0 ]; then cat /tmp/postgres.log; exit 1; fi | ||
# run regression tests | ||
export PG_REGRESS_DIFF_OPTS="-w -U3" # for alpine's diff (BusyBox) | ||
make USE_PGXS=1 installcheck || status=$? | ||
# show diff if it exists | ||
if test -f regression.diffs; then cat regression.diffs; fi | ||
# something's wrong, exit now! | ||
if [ $status -ne 0 ]; then exit 1; fi | ||
# generate *.gcov files | ||
gcov src/*.c src/*.h | ||
set +ev | ||
# send coverage stats to Codecov | ||
bash <(curl -s https://codecov.io/bash) |
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.